i cannot....its a "manual" log shipping process controlled by a windows task and using powershell.
during the night when there is a string of log restores we are getting the following error logged in the restore log:
Processed 0 pages for database 'IM_Money_Analysis', file 'IM_Money' on file 1.
Processed 0 pages for database 'IM_Money_Analysis', file 'IM_Money_SYSINTERNAL' on file 1.
Processed 0 pages for database 'IM_Money_Analysis', file 'IM_Money_YODLEETXNS' on file 1.
Processed 246415 pages for database 'IM_Money_Analysis', file 'IM_Money_log' on file 1.
RESTORE LOG successfully processed 246415 pages in 108.151 seconds (17.800 MB/sec).
Msg 3101, Level 16, State 1, Server TSUNAMI, Line 2
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Server TSUNAMI, Line 2
RESTORE LOG is terminating abnormally.
So in a chain of restores we get successful, successful, failure!
At that point we dont have the logic in place to handle this and wait.
We cannot use SQL log shipping as there is no trusted link between the two domains due to security (financial).
We start the restore with the command:
ALTER DATABASE IM_Money_Analysis SET SINGLE_USER WITH ROLLBACK IMMEDIATE
Each restore in the chain is running using the STANDBY file....i was wondering if we could remove these STANDBY commands and just use it at the end of the chain?? The only other alternative is to repeat the SET SINGLE_USER WITH ROLLBACK IMMEDIATE command before each restore??