We are in the process of troubleshooting a database corruption issue that happened due to a RAID 1 array failure on an older SBS 2003 R2 server configured with a pair of software RAID 1 arrays.
When we went to restore the database from the most recent .BAK file we always ended up with the following error:
Microsoft SQL Server Management Studio
Restore failed for Server 'Name'. (Microsoft.SqlServer.Smo)
Additional Information:
System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use. (Microsoft.SqlServer.Smo)
It took a number of searches to finally come up with the answer:
Following the steps listed by pogo69:
- Right-click on the database name
- Click on Properties context menu item
- Click on Options menu item on the left
- In the grid, scroll down to the bottom
- Change 'Restrict Access' to SINGLE_USER
Once we ran the above steps we were able to restore the database successfully.
Microsoft SQL Server Management Studio
The restore of database 'NAME' completed successfully.
We were then back into our client's LoB.
Philip Elder
MPECS Inc.
Microsoft Small Business Specialists
Co-Author: SBS 2008 Blueprint Book
*Our original iMac was stolen (previous blog post). We now have a new MacBook Pro courtesy of Vlad Mazek, owner of OWN.
Thank you, This helped me out. - Figs
ReplyDelete