Sunday , December 22 2024

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.

Loading

About Ekrem Önsoy

The original article was written in Turkish by Ekrem Önsoy and translated to English by dbtut with the consent of the author. The copyright of the article belongs to the author. The author shall not be liable in any way for any defect caused by translation.

Leave a Reply

Your email address will not be published. Required fields are marked *