is there any way of dropping a DB prior to a scheduled restore?
I don’t think there is an option to do this but is there a simple way to capture the list of drops a drop them ahead of the restore starting?
is there any way of dropping a DB prior to a scheduled restore?
I don’t think there is an option to do this but is there a simple way to capture the list of drops a drop them ahead of the restore starting?
Best answer by Chris Hollis
Apologies
Confirming your query was answered under a support incident.
Issue Findings:
Support determined that there is something creating a constant logon request for that DB, meaning it is always in use regardless of the paramaters leveraged in our restore process.
Unfortunately, there is no option built into SQL agent to drop the DB prior to restore. If this is going to be a scheduled operation then to resolve this particular issue, you can look at scripting the restore with a pre-process script. You can wrap a SQLCMD call in a .bat file.
I would be interested in finding out if you managed to try this and if this worked as you hoped?
Thanks,
Chris
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.