>I think you have to at least choose the last Log backup or both of them, but not only the first one, to get the STOPAT clause generated. At least that's the way it seemed to work for me.
>
>However, I still get errors when I try to run it. Not knowing anything about this particular syntax for restoring a database, I can't off the top of my head figure out what's wrong with the generated statements.
>
>~~Bonnie
>
>
Hi Bonnie,
I re-tried again and I now got three lines of code the last one with the STOPAT. But pressing Restore produces:
Msg 3101, Level 16, State 1, Line 1
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Msg 3117, Level 16, State 4, Line 1
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
Msg 3117, Level 16, State 4, Line 1
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
So, it's not that easy.
If it's not broken, fix it until it is.
My Blog