January 17, 2020 at 3:36 am
Hi
Currently we are running DBCC CheckDB script in our server using SQL JOb every week
Concern is it takes 3 hours and affect Tempdb Size grows massively after 4 times running in a row ( first time was successful and the rest is failed )
I am thinking to adjust the parameter so it can run faster and minimize impact of Tempdb size
example :
Running DBCC CheckDB with Physical Only
Please let me know your thoughts
Your feedback is much appreciated
January 17, 2020 at 10:47 am
If I recall correctly, DBCC CHECKDB uses a snapshot, and pages that change while it is running are copied to tempdb. If you are seeing abnormal growth of tempdb while DBCC CHECKDB is running, that is probably due to the volume of changes being made to the database being checked.
DBCC CHECKDB really needs to run when there is little or no activity on the database, certainly no batch jobs or ETL jobs.
HH
January 17, 2020 at 11:36 am
check out this article by Paul Randall: https://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-complete-description-of-all-checkdb-stages/
Also very helpfull is the pluralsight https://app.pluralsight.com/library/courses/sqlserver-database-corruption/description
(i hope i dont break any rules by posting those two links that i consider mandatory for every serious DBA.
January 17, 2020 at 6:29 pm
There's another strong and unavoidable issue with TempDB. They've made it so that it follows the same rules as if you invoked Trace Flag 1117 (equal file growth of all files in the file group) and it cannot be disabled for TempDB even on a temporary basis. If you normally have, say, 8 files of 2GB each and the drive is limited to only, say, 100GB, it only takes 1 operation that grows 1 file to a little more than 12.5GB and BOOM!!! You're system is out of space and whatever you were doing rollsback, etc, etc.
I do sometimes wish that MS would stop trying to help and, at the very least, provide an override for such help.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 21, 2020 at 4:52 pm
You can use this as an alternative, DBCC CheckDB PHYSICAL_ONLY; it is a limited check but doesn't use that much TempDb
January 21, 2020 at 10:22 pm
Thanks so much for the advice All !
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply