Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm using log shipping for the first time. I've got it working between my primary and secondary server, on the secondary server the database is Restoring... which I understand basically means it is waiting to be activated.

I will run RESTORE DATABASE MyDatabase WITH RECOVERY to activate it, but then what happens next time the job runs to do log shipping? Will it fail? Should I disable the job manually? Will it overwrite my database and set it back to Restoring... ?

Thanks

share|improve this question
2  
Well if you've failed over manually, you should also turn off log shipping. If the secondary is now going to serve as primary, initialize log shipping in the other direction. –  Aaron Bertrand Jun 20 at 17:11
1  
You can also look at the links Kin posted: dba.stackexchange.com/questions/49928/… –  RLF Jun 20 at 17:16
add comment

1 Answer 1

I will run RESTORE DATABASE MyDatabase WITH RECOVERY to activate it, but then what happens next time the job runs to do log shipping? Will it fail? Should I disable the job manually? Will it overwrite my database and set it back to Restoring... ?

Yes they will run. Logshipping is simple copy and movement of logs so when you bring secondary database online it just brings the database online it does not affects any job running. So you should disable all backup,copy,restore and alerts jobs. When next time on primary, backup job wil run it will succeed even copy job will succeed on secondary but restore job would fail on secondary as database is online and logs cannot be restored more over log chain would be broken.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.