" system.data.sqlclient.sqlerror:exclusive access could not be obtained because the database is in use. "

from message above i sure , you have been restoring the database while that have the application is in use so i have script for find out the problem .
1. Log in to sql server -> create new query -> key in the script
use Database name
exec sp_who -- if you need to check who have been using the database.
From a picture . Sured, the database is in use.

2. Stop Service of Application to use the MS SQL server 2005 | Express | 2008

3. Run Restore against . I have sured , you can restore the database MS SQL 2005 ,Express , 2008

No comments:
Post a Comment