Site icon Database Tutorials

Exclusive access could not be obtained because the database is in use

 

ERROR MESAGGE:

“Exclusive access could not be obtained because the database is in use.”

EXPLANATION:

You can get this error because you can’t put an exclusive lock on the database because there are other sessions that use the database when you try to restore a database.

SOLUTION:

You can perform operations after killing active sessions in database.

Or you can perform this operation with the help of the following script. Note that this script will kill all sessions in the database.

Exit mobile version