Today, after the SQL2000 database is reinstalled, an error occurs when the master database is restored. The prompt is "when trying to restore the master database, you must use restoredatabase in single-user mode, the Restore database operation is terminated abnormally ". I searched the internet and found a detailed introduction. I did solve this problem (I have tested it on the VM). The full text of this article is as follows:
The recovery of the system database is summarized as follows:
In SQL Server databases, system information is stored in system databases. The main system databases include:
Master-controls user database and SQL server operations as a whole. After creating any User-Defined Object, you must back up it.
Model-provides templates and prototypes for new databases
MSDB-contains information about jobs, alarms, and operators
If the media that contains the system database changes, you must re-build the system database. If you can still start the SQL Server service, you can use the restore statement to restore the database from the backup of the system database.
If the master node fails and the system cannot be started, follow the steps below to restore it.
1. Rebuild the system database and run C:/MSSQL7/binn/rebuildm.exe. Follow the prompts,
The path of the system database sample is required during the process, which can be found on the installation disc;
2. After rebuilding the system database, start the SQL Server service and use the backup of the system database to restore the database.
The recovery sequence is usually master-> MSDB-> model.
When restoring the backup of the master node, note that the backup must be performed in single user mode.
A. Method for entering the single-user mode:
1. In command line mode, enter sqlservr-C-F-M or sqlservr-M.
Among them,-C can shorten the startup time, and SQL server is not started as a Windows NT Service.
-F use the minimum configuration to start SQL Server
-Start SQL Server in m single-user mode
2. You can enter-C-F-M or-m in the startup parameters of control panel-service-MSSQLServer, and click Start.
3. Restore the master database
A. go directly to the query analyzer and have a prompt to ignore it.
Enter the recovery statement to restore the database:
Restore database master from disk = 'C:/specific Backup Filename'
B. You can also enter it at the command prompt. Note the case sensitivity.
For "Windows Authentication", enter iSQL/E
For "SQL Server and Windows Authentication", enter the iSQL/u User Name "/P" password"
Then input the following prompt (Note 1>, 2> yes ):
1> Restore database master from disk = 'C:/specific backup file'
2> go
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.