July 22, 2005 at 9:07 am
I'm doing a full backup from one server and trying to restore to a different server. Both servers have the same OS and database. I'm following step-by-step instructions, SQL Server 2000 Backup and Restore, provided by Microst TechNet. When I try to restore I keep getting the following exception (error) message:
Microsoft SQL-DMO(ODBC SQL State: 42000)
Wxclusive access could not be obtained because the database is in use.
RESTORE DATABASE is terminating abnormally.
What does this mean and how can I fix it?
Thanks,
cjb
July 22, 2005 at 9:56 am
Looks like a stray user is blocking your way. It could even be yourself if you have EM and Query Analyzer open. I would kill all open connections and set the target db to single user mode and try it again.
July 22, 2005 at 10:04 am
EM (Enterprise Manager) is how I'm doing the restore. Not using Query Analyzer. How do I kill open connections and set the target database to single user mode. I'm very new at this.
Thanks for you reply.
cjb
July 22, 2005 at 10:14 am
I like to use sp_who2 to view my open connections and kill any open spid's connected to that db.
OR, in EM go to Current Activity and right click on an open process and choose kill.
Then execute alter database 'name' set single_user
OR in EM right click the db and choose properties go to Options and select Restrict Access to single user
Restore the db
Then execute alter database 'name' set multi_user or uncheck restrict access
July 25, 2005 at 8:55 am
just thought you'd like to know that I've restored the database.
Thanks for your help!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply