When SQL Server restores the database, it prompts: the database is in use and cannot be operated

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

Well, I have to restore the database again this time. The problem persists: the database is in use and cannot be recovered. Use the previous articleArticleMethod "SQL Server prompts when restoring the database: the database is in use and cannot be operated" does not work.

I analyzed the reason, because the database connection was successful last time because it was issued by the SQL Server Management studio analyzer. However, this connection is actually an IIS server, and a website uses this database. I killed the database connection process,

IIS immediately launched a new connection. I'm dizzy. I really admire IIS! So I found another method. Haha, I think it is more convenient and more powerful.

1. Open SQL Server Management studio, find the database to be restored, right-click the database, select restrict access in the properties-> options-> other options list, and then select single_user.

The system prompts that the connection will be closed, haha. OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.