Showing posts with label Restore Failed For Server. Show all posts
Showing posts with label Restore Failed For Server. Show all posts
Exclusive access could not be obtained because the database is in use
Posted by Raj
System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use.
Error:
Restore Failed For Server 'MyServer' (Microsoft.SqlServer.Smo)
Additional information:
System.Data.SqlClient.SqlError: Exclusive access could not be obtained
because the database is in use. (Microsoft.SqlServer.Smo)
Solution:
1.execute SP_WHO
EXEC sp_who
2.Execute KILL 53 /Kill 116
3.Restore from another database.
Right click on database which you want to restore
4.Done.
Error:
Restore Failed For Server 'MyServer' (Microsoft.SqlServer.Smo)
Additional information:
System.Data.SqlClient.SqlError: Exclusive access could not be obtained
because the database is in use. (Microsoft.SqlServer.Smo)
Solution:
1.execute SP_WHO
EXEC sp_who
2.Execute KILL 53 /Kill 116
3.Restore from another database.
Right click on database which you want to restore
4.Done.