Home | Contact | Index | SenSource, Inc.
Guides | How To | Errors | Troubleshoot | FAQ | Glossary Search Start Searching...
Home > Home > Errors > SQL Server: Restore failed for Server 'Server_Name'

SQL Server: Restore failed for Server 'Server_Name'

Last Updated: 3/29/2010 4:49:44 PM

Symptom
When attempting to restore/upload a database to an existing or new database, SQL Server returns the following error:

Restore failed for Server 'Server_Name'. (Microsoft.SqlServer.Smo)System.Data.SqlClient.SqlError: RESTORE cannot process database 'DbName' because it is in use by this session. It is recommended that the master database be used when performing this operation.
 
Cause

  • An application is currently connected to the SQL database you are attempting to restore.
  • Another user is currently connected to the SQL database you are attempting to restore.
  • You have the SQL database you are attempted to restore selected.
Resolution
  • Do not have the database selected when attempted to restore it.
    • If you do not have another database listed, select System Databases, and then the Master database.
    • View the following video for visual assistance.
  • Verify that no users are connected to the database.
  • Verify that no software applications are connected to the specified database.
    • If you are still unable to perform a restore, make another database the default in order to force SQL Server to close all connections.
    • View the following video for visual assistance.
 
Guides | How To | Errors | Troubleshoot | FAQ | Glossary | Contact | Index | SenSource, Inc.
© 2010 SenSource, Inc. All Rights Reserved. 3890 Oakwood Ave. Youngstown, OH 44515