patternsqlMinor
Historical dbcc checkdb results
Viewed 0 times
resultsdbcccheckdbhistorical
Problem
Is there a better way of accessing historical
SQL Server 2008 or later.
dbcc checkdb result history (if output logging was not used at runtime) than xp_readErrorLog?EXEC xp_readErrorLog {0-20}, 1, N'CHECKDB';SQL Server 2008 or later.
Solution
Method 1: Easy way
The Best way that i am using as of now is ola hallengren's SQL server Maintenance solution for SQL Server Integrity Check.
Within this solution it gives you an option of storing the output or logging it to a table as per you're convenience:
LogToTable
Log commands to the table
Please read the complete web link as highlighted in above answer to know how you can make use of it:
Method 2:
To insert the DBCC results into a readable and manageable format, you can use the 'WITH TABLERESULTS' option for DBCC CHECKDB to get an output that can be piped to a table for analysis:
1) Collect the Data:- via creating a table to store the output from created SP as explained in this link.
2) Schedule the job
3) Analyse the data from the table.
Also, would suggest you to read CHECKDB From Every Angle: When did DBCC CHECKDB last run successfully?
The Best way that i am using as of now is ola hallengren's SQL server Maintenance solution for SQL Server Integrity Check.
Within this solution it gives you an option of storing the output or logging it to a table as per you're convenience:
LogToTable
Log commands to the table
dbo.CommandLog.Please read the complete web link as highlighted in above answer to know how you can make use of it:
Method 2:
To insert the DBCC results into a readable and manageable format, you can use the 'WITH TABLERESULTS' option for DBCC CHECKDB to get an output that can be piped to a table for analysis:
1) Collect the Data:- via creating a table to store the output from created SP as explained in this link.
2) Schedule the job
3) Analyse the data from the table.
Also, would suggest you to read CHECKDB From Every Angle: When did DBCC CHECKDB last run successfully?
Context
StackExchange Database Administrators Q#106922, answer score: 4
Revisions (0)
No revisions yet.