Comments
1 comment
-
Have you considered using the DISCONNECT_EXISTING option to disconnect all existing users to the database so that the restore can proceed? E.g.
EXEC master..sqlbackup '-sql "RESTORE LOG AdventureWorks FROM DISK = [g:\backups\AdventureWorks_log_*.sqb] WITH STANDBY = [g:\standby\AdventureWorks.und], DISCONNECT_EXISTING"'
Add comment
Please sign in to leave a comment.
When I try to do this, it seems to restore the database but will be stuck in single user mode. I think this is because the alter database statement attempts before the restore is complete. Any thoughts or ideas?