January 29, 2015 at 9:27 pm
Hi
what are most important DBCC commands that a DBA must run at every night jobs?
(DBCC checkDB is enough?)
January 30, 2015 at 1:39 am
None.
Nightly may to be too frequent for integrity checks, unless you only keep your backups for 1 day. It's certainly not something that has to be run every day.
As for DBCC statements in general, have a read through the list of documented ones and see what they do.
https://msdn.microsoft.com/en-us/library/ms188796.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 31, 2015 at 12:52 am
I read It.
the most important and repeatedly Advise is :
Dont use Repair option (If you have Backup). because ....
The impression from this recommendation can be
1- I must run only DBCC checkDB 'DBName' about once a week. (without option)
this command cover most of the validation DBCc commands. (This is ok.)
2- I must check the report of this Command. (ok.)
But I dont know What do I do, If :
3- I Found some error on DBCC report. In microsoft text, recommanded restore backup and dont use repair, If you have backup.
If I read the error on 10 oclock, I should restore database ? restore to which time?
January 31, 2015 at 3:03 am
sm_iransoftware (1/31/2015)
I read It.the most important and repeatedly Advise is :
Dont use Repair option. because ....
The impression from this recommendation can be
1- I must run only DBCC checkDB 'DBName' about once a week. (without option)
this command cover most of the validation DBCc commands.
2- I must check the report of this Command.
But I dont know What do I do, If :
3- I Found some error on DBCC report. In microsoft text, recommanded restore backup and dont use repair, If you have backup.
If I read the error on 10 oclock, I should restore database ? restore to which time?
1. The standard database consistency check command of Checkdb runs both logical and physical checks across the database files and inside the database.
2. Yes. Otherwise, why run it.
3. Assuming you're also taking log backups, restore to a point in time prior to the corruption of your database.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 2, 2015 at 1:30 am
Help, my database is corrupt. Now what? [/url]
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply