 |
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.
|