"System.Data.SqlClient.SqlError: RESTORE cannot process database because it is
in use by this session. It is recommended that the master database be used
when performing this operation."
If you are using Microsoft.SqlServer.SMO set SqlServer.ConnectionContext.DatabaseName to "master".
If you are using TSQL, select master database (USE master).
Keys: error, smo, tsql, c#.
Sunday, June 22, 2008
Subscribe to:
Post Comments (Atom)
3 comments:
If you're still experiencing problems, try to restart the service.
Recover corrupt SQL database and easily get restore on SQL Server by utlizing SQL recovery tool. Get more information http://www.sqlrepairtool.org
Use SQL Database Repair application which can retrieve MDF and NDF file from SQL server database. This application is compatible with all SQL version such as 2012, 2008R2, 2008, 2005 & 2000. Get more detail: http://www.filesrecoverytool.com/sql-database-repair.html
Post a Comment