Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the damage of master Database

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you how to solve the master database damage, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

After the SQL Server 2008 master database is corrupted, the SQL SERVER service fails to start. Check the error log and you will see the following error message:

2015-10-27 10 spid6s 15 spid6s 21.01 spid6s Starting up database 'master'.2015-10-27 10 10 spid6s error: 9003, severity: 20, status: 1. 2015-10-27 10 master' is not valid 15 master' is not valid 23.01 spid6s The log scan number (227-418 master' is not valid 1) This error may indicate data corruption or that the log file (.ldf) does not match the data file (.MDF). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.2015-10-27 10-10 spid6s Cannot recover the master database 15-23. 01. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.

If the database version is the Chinese version, you will see an error message similar to the following:

The log scan number passed to the log scan operation in the database 'master' is invalid. This error may indicate data corruption or a mismatch between the log file (.ldf) and the data file (.mdf). If this error occurs during replication, recreate the publication. Otherwise, if the problem causes an error during startup, restore from backup.

There are roughly three ways to resolve the corruption of the master database at this time:

1: restore master database from backup

The prerequisite for restoring a master database is that your master is backed up. Keep in mind that master must also be backed up. In many cases, some people will ignore these system databases when backing up. General master, msdb backup is necessary.

2: copy the master database template

If you don't have a master backup, go back and choose to copy the master database file from the Templates of the installation directory to the corresponding directory. If you install SQLSERVER on disk C without modifying the installation path, it may be C:\ Program Files\ Microsoft SQL Server\ MSSQL10.MSSQLSERVER\ MSSQL\ Binn\ Templates

3: rebuild the master database

Find the installation media of SQL Server 2008 (insert the CD or copy the media to the corresponding directory), change the directory to the directory where the setup.exe file is located in the command window, and then run the following command (modify the relevant parameters according to the actual situation)

Setup.exe/QUIET/ACTION=REBUILDDATABASE/INSTANCENAME=instance_name/SQLSYSADMINACCOUNTS= accounts[ / SAPWD=password] [/ SQLCOLLATION=collation_name]

Of course, there are a lot of details, and if the database has been patched or upgraded after installation, you may need to reapply these patches.

The above is how to solve the corruption of master database. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report