Ask the Community
Groups
Restoring ksubscribers backup from sql management studio does not proceed ahead giving error "exclusive access cannot be obtained because the database is in use" - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>Problem: </strong></p> <p>Restoring ksubscribers backup from sql management studio does not proceed ahead giving error "exclusive access cannot be obtained because the database is in use"</p> <p> </p> <p><img src="/attachments/token/nAml4Y5RVpgAnziaxquKiBZkA/?name=000441.jpg" alt="000441.jpg" class="embedImage-img importedEmbed-img"></img></p> <p><br><strong>Cause: </strong></p> <p>ksubscribers db is still being used</p> <p><br><strong>Resolution:</strong></p> <p>Step 1: Please stop all the kaseya service</p> <p>Step 2: Please open command prompt in administrative rights</p> <p>step 3: Please stop IIS</p> <p>iisreset /stop</p> <p>Step 4: Please restart SQL service</p> <p>If you are not comfortable restarting SQL service, please run this below query in sql management studio</p> <p>SELECT sqltext.TEXT,<br>req.session_id,<br>req.status,<br>req.command,<br>req.cpu_time,<br>req.total_elapsed_time<br>FROM sys.dm_exec_requests req<br>CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext</p> <p>Please find out what session_id is still using ksubscribers db and then run this next query</p> <p><br>KILL [session_id]</p> <p>Step 5: Proceed ahead with the restore</p> <p>Step 6: Please start IIS and kaseya services</p> <p>iisreset /start</p> </article> </main>