Restore is shutting the sql server down.

John Steele 41 Reputation points
2025-03-05T23:48:45.47+00:00

In the past when ever I restored the training system with backup of our production SIS I had to turn off the service and shut down the application pool or the restore would not be able to lock the DB's. Today I accidentally started the restore process without shutting down the service and app pool and the restore began to process. Now I can see this being a problem if who ever is doing the restore isn't careful and paying attention to where they are sending the files and restore over the production system loosing all that days work. SQL Server is 2022 This did not happen prior to the last server update. Anyone seen this and if so how did you fix it.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,662 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 41,286 Reputation points
    2025-03-06T02:12:11.57+00:00

    Hi @John Steele

    This did not happen prior to the last server update.

    Could you please rollback the CU update to the older one to check if the issue is the effect of recent changes in SQL Server 2022 in your test environment.

    Also, there is a workaround to get exclusive access to restore SQL Server database.

    If these all do not work, open a support ticket to report the behavior and seek a fix or workaround from Microsoft Team for the issue is affecting your Prod Environment.

    https://support.microsoft.com/en-us/assistedsupportproducts

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 119K Reputation points MVP
    2025-03-06T23:02:37.2033333+00:00

    To overwrite an existing database with RESTORE, you need to have exclusive access to it. If, by chance, no one was active when you ran the restore so you could get exclusive access to the database, you were able to run the store without shutting down the application pool.

    Now, I don't know how your restore process actually looks like. You may be running a script that actively kicks out active users by forcing the data to single-user mode. That is something you need to handle locally at your site.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.