SQL-Server-First-Responder-Kit icon indicating copy to clipboard operation
SQL-Server-First-Responder-Kit copied to clipboard

sp_DatabaseRestore: problem with StopAt when backup file is in different time zone from restoring server

Open edmundoriviera opened this issue 3 years ago • 2 comments

I perhaps haven't named the variables particularly well. In my local copy I've changed @StopAt to be @StopAtUtc for clarity.

This was causing me a problem as the file list would be limited in UTC but the @StopAt passed to restore was being treated as Local time. In my case my server backups are in BST and the files are in UTC.

edmundoriviera avatar Jun 16 '22 09:06 edmundoriviera

Howdy! When you want to make a change in the First Responder Kit, can you create an issue first describing the change you'd like to make? Then, other folks can chime in with whether this proposed change works for them, and if there's anything we need to think about in the design process. It's documented in the readme here: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/tree/main#how-to-get-support

I don't actually use sp_DatabaseRestore at this time, so I'm leaving this pull request open to see if anyone else can test it and confirm that it has the desired effect. Another thing you could do is do a walkthrough of what changes you made, and why, and then other folks might be able to give it a double-check.

BrentOzar avatar Jul 18 '22 16:07 BrentOzar

Hey,

Sure no worries. Sorry about that, I only really dip in to this stuff occasionally so thought I'd send a possible fix and move on.

Will take a look at doing something a little more robust.

Thanks for supporting the community.

Best

Ed

On Mon, 18 Jul 2022, 17:47 Brent Ozar, @.***> wrote:

Howdy! When you want to make a change in the First Responder Kit, can you create an issue first describing the change you'd like to make? Then, other folks can chime in with whether this proposed change works for them, and if there's anything we need to think about in the design process. It's documented in the readme here: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/tree/main#how-to-get-support

I don't actually use sp_DatabaseRestore at this time, so I'm leaving this pull request open to see if anyone else can test it and confirm that it has the desired effect. Another thing you could do is do a walkthrough of what changes you made, and why, and then other folks might be able to give it a double-check.

— Reply to this email directly, view it on GitHub https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/pull/3113#issuecomment-1187734843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2ZW4OKDXH4U43LUMWOSCTVUWDBLANCNFSM5Y6DWE3Q . You are receiving this because you authored the thread.Message ID: @.*** .com>

edmundoriviera avatar Jul 18 '22 20:07 edmundoriviera

Because we didn't get testers or an issue, closing this one. Thanks anyway!

BrentOzar avatar Dec 11 '22 18:12 BrentOzar