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.