In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
To proactively detect database side page corruption and ensure database logical and physical integrity, DBCC CHECKDB is scheduled to be executed every Saturday morning at 6:00 a.m. against all system and user databases on the production master database, logging the results to tables.
The theoretical basis is as follows:
SQL Server databases can detect page corruption, which can take the form of one of three errors:
An 823 error, known as a hard IO error, can be interpreted as SQL Server expecting to read a page, and Windows telling SQL Server that it cannot read the page.
An 824 error, also known as a soft IO error, can be understood as SQL Server has read the page, but by calculating the CheckSum equivalent, it finds a mismatch, so SQL Server believes that the page has been corrupted.
825 error is called a Retry error.
SQL Server detects errors in two ways: when reading pages and when backing up (which is essentially reading pages). But if we want to be more thorough about checking data consistency, we should use CheckDB regularly to check data consistency, rather than detecting errors when data is read at production time.
CheckDB command in the enterprise version will use multithreading to do, will be the consistency check of the entire database, in the process, using the built-in database snapshot way, so do not cause blocking, but CheckDB will consume a lot of CPU, memory and IO. CheckDB therefore has to choose between maintenance window time or system idle time.
CheckDB is essentially a collection of commands that check the logical and physical integrity of all objects in a given database by doing the following:
initial check system table
Allocation unit checking (DBCC CHECKALLOC)
Complete inspection system table
Logical consistency check on all tables (DBCC CHECKTABLE)
Metadata Inspection (DBCC CHECKCATALOG)
SSB inspection
Indexed View, XML Index, etc. Check
Microsoft Best Practice Recommendations
"It is recommended that you use the PHYSICAL_ONLY option so that you can check your production system frequently. Using PHYSICAL_ONLY can greatly reduce the runtime of DBCC CHECKDB against large databases. It is also recommended that you periodically run DBCC CHECKDB without options. How often these operational tasks should be performed will depend on the individual enterprise and its production environment.
"Quoted from:
https://docs.microsoft.com/zh-cn/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql
mature program
You can use https://ola.hallengren.com/
Implement backup, integrity check, index, and statistics maintenance packages.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.