We are using SQL Mirroring as an HA solution and Log Shipping as a DR solution.
Recently, the mirror database has been configured as a log shipping primary (the mirror/primary database) to allow log shipping to continue after database mirroring fails over, using the same configuration we used for the primary on the principal database.
Now the problem is every so often the restore job fails due to:
Exclusive access could not be obtained because the database is in use.
This is because two restore jobs (one from principal/Primary, and one from the mirror/primary) start at the same time. I have changed the job schedules to be run at different times, however.
For example, the restore job from the principal/Primary is scheduled for every 13 minutes and the restore job from mirror/Primary is scheduled for every 10 minutes. But there are still some times that they start at the same time.
Is there any way to prevent this?