How can we help you today? How can we help you today?

Log-shipping: "Restoring" instead of "Standby/Readonly"

This works -- when done calling it, I get my database restored as "Standby/Readonly" and I can access the tables within it.

EXEC master..sqlbackup
'-sql "RESTORE DATABASE CALL FROM DISK = [h:\db\restore\call\*FULL*.sqb]
LATEST_FULL WITH STANDBY = [h:\db\restore\call\call_undo.dat]"'

This DOESN'T work ... after executing it my database is marked "Restoring" and I can't access my tables:

EXEC master..sqlbackup
'-sql "RESTORE LOG call FROM DISK = ''h:\db\restore\call\log_to_restore\*.sqb''
WITH NORECOVERY, MOVETO = ''h:\db\restore\call\log_restored''"'

Any suggestions would be much appreciated. I have to have the databases in standby mode after applying the interim logs.
DanMoran
0

Comments

1 comment

  • petey
    You need to use the STANDBY option with the RESTORE LOG process too e.g.
    EXEC master..sqlbackup '-sql "RESTORE LOG call FROM DISK = ''h:\db\restore\call\log_to_restore\*.sqb'' 
    WITH STANDBY = ''h:\db\restore\call\call_undo.dat'', MOVETO = ''h:\db\restore\call\log_restored''"'
    
    petey
    0

Add comment

Please sign in to leave a comment.