Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto Restore Script
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01121208
Message ID:
01121383
Views:
8
>Dear All,
>
>I have created a Autorestore Job with the following script
>
>RESTORE DATABASE WMS_UPDATE from DISK='E:\WMS_UPDATE_DAILY' with REPLACE
>
>this script run just fine in SQL QUERY Analyzer but when ever I try to use it on an scheduled JOB an error occured saying
>
>"Exclusive Access could not be obtained because database is in use"
>
>Can anyone give me idea on how can I correct my script so as I can use it to autorestore my database.
>
>MSSQL 2000 on Win2K3 server. this is not an active database it is only a standby server in case the primary went down.

your getting an error that says "exclusive access to the database cannot be obtained because the database is in use"?

That translates to :
You are logged on to that database, therefore your cannot run that command.

So in order to run that command change databases or connect to the Master database and then execute that command.

HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform