
Step 2: After connecting to the database, Object Explorer panel will appear on the left side of the SSMS window. To close existing connections to SQL db, follow these steps: Method 1 – Close the existing connections to the database If you don’t want to notify users, skip to method 2. For detailed information on sp_who, refer to this link. If you find users performing some important tasks, notify those users before disconnecting them. NOTE: Before disconnecting the users, use SQL stored procedure ‘sp_who’ to check all users currently using the db. You can do so, by following any of these methods: To resolve the issue, you will need to disconnect the active users. If someone is using the database, the restore operation will fail.

When attempting to restore SQL Server db, make sure there are no active connections. How to Fix ‘can’t restore SQL database because it is in use’ Problem? You will need SQL Server Management Studio (SSMS) installed on your computer.SQL Server, of any version, must be installed on your system.The software supports SQL Server 2019, 2017, 2016, 2014, 2012, & older versions.īefore proceeding with resolving the error – exclusive access could not be obtained because the database is in use, make sure to meet the following prerequisites: Use Stellar Toolkit for MS SQL software that comes with an efficient SQL backup extractor tool designed to help database administrators recover SQL database from corrupted backup (.BAK) file. But, the database restore operation may fail if the. Tip: SQL Server database can be restored from the backup (.bak) file.

Now, we will discuss solutions to fix the error.

You are connected to the database you are trying to restore.Restored failed for Server ‘xxx’ ()Īdditional Information: : Exclusive access could not be obtained because the database is in use.įigure 1: SQL Database Restore Failed Error Message Reasons behind ‘SQL Database Restore Failed, Database in Use’ Errorīelow are some reasons that could interfere with the restore process and throw the ‘ restore of database failed because the database is in use’ error: When trying to restore SQL Server database from backup, it is common to receive an error message that reads as follows: How to Fix ‘can’t restore SQL database because it is in use’ Problem?.

