backup, restore

1. First, start the "Task Manager", kill the SQL Server process, or stop the SQL Server service.

2. Make a copy of the database file (to be on the safe side, backup), of course, you can also cut it to the specified file.
The sql2005 database file is in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA

3. Delete the original error database file (read-only/recovering).
 
4. Restart the SQL Server service, open Express, and the database will become [read-only].
 
5. Delete the [read-only] database and reattach the previously backed up database file.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326235486&siteId=291194637