November 5, 2020 at 11:38 am
Hi
I'm belated changing the page verification option for a database from NONE to CHECKSUM. I'm aware this only affects future writes to the database, and existing pages won't have that checksum calculated until they are updated or the relevant tables or indexes are rebuilt.
My question is: would an ALTER INDEX ... REORGANIZE also cause checksums to be calculated? If not, why not?
Thanks
Gary
November 5, 2020 at 1:13 pm
I'd say that REORGANIZE is unlikely to because it touches so few pages normally when it changes indexes. A REBUILD on the other hand, that might do it. I only say "might" because I haven't tested it. I'm pretty sure, rebuilding all indexes, rewrites most of the pages in a 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
November 5, 2020 at 1:41 pm
Thanks Grant - you're right, a REBUILD will write far more pages than a REORGANIZE, probably all of them in the table/index concerned. I was just hoping that those few pages moved by a reorg might have had their checksums set, to incrementally increase the amount of corruption detection slowly over time. It wouldn't cost a lot to do so.
November 5, 2020 at 3:17 pm
also to be kept in mind: heaps.
You should rebuild heaps too, to activate the checksum mechanism.
Alter table [yourschema].[yourtable] rebuild
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
December 22, 2020 at 6:23 am
This was removed by the editor as SPAM
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply