Restoring ksubscribers backup from sql management studio does not proceed ahead giving error "exclusive access cannot be obtained because the database is in use"

Problem:

Restoring ksubscribers backup from sql management studio does not proceed ahead giving error "exclusive access cannot be obtained because the database is in use"

 

000441.jpg


Cause:

ksubscribers db is still being used


Resolution:

Step 1: Please stop all the kaseya service

Step 2: Please open command prompt in administrative rights

step 3: Please stop IIS

iisreset /stop

Step 4: Please restart SQL service

If you are not comfortable restarting SQL service, please run this below query in sql management studio

SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext

Please find out what session_id is still using ksubscribers db and then run this next query


KILL [session_id]

Step 5: Proceed ahead with the restore

Step 6: Please start IIS and kaseya services

iisreset /start

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section