Home > Development, SQL > Exclusive Access can’t obtained error when restoring SQL database

Exclusive Access can’t obtained error when restoring SQL database

October 15th, 2011 Leave a comment Go to comments

When you try restoring a SQL database, you may get an error message saying “Exclusive access can’t obtained, database is in use”.   First, of course, stop all Syteline service, like IDO, Taskman.  If it still doesn’t work, try the below to set it to single user mode

Use Master

Alter Database Database_Name  SET SINGLE_USER With ROLLBACK IMMEDIATE

You may run Exec sp_who2 to see the user connection to database.

If this still doesn’t work, try detach/reattach the database.

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.