order of executing rebuild/chekdb after upgrade to 2012

what is the order of executing rebuild/checkdb after attaching database in SQL 2012 from 2008R2.

1. change compatibility mode

2. run dbcc checkdb

3. alter index rebuild all on <table> with fillfactor=90

Is above order ok? or there is no particular order to execute above 3 steps after upgrade.

August 28th, 2015 3:34am

Hi

You can proceed with above Order..

1. change compatibility mode

2. run dbcc checkdb

3. alter index rebuild all on <table> with fillfactor=90

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 4:29am

I dont think there would be any order for checkdb its aim is to find inconsistency and it would do anytime if it finds.Although I agree to the order you have mentioned. regarding fill factor we need to know the workload or if you already knwo it you can go with 90

August 28th, 2015 7:19am

Thank you.

One more question, if i understand correctly rebuilding indexes update statistics too correct? I do not have to explicitly execute update stats after indexes are rebuild.

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 6:16pm

Yes..No need to running Update Stats after Index Rebuild.

If You have scheduled to Run your Index Rebuild weekly once, For better performance you can Update Stats

Daily basis

August 28th, 2015 9:54pm

Thank you.

One more question, if i understand correctly rebuilding indexes update statistics too correct? I do not have to explicitly execute update stats after indexes are rebuild.

No you have to update stats *selectively* after rebuilding index. Its common misconception that rebuild index for the table with full can updates stats for complete table. Actually when you rebuild index stats is ONLY updated for that index not for complete table. Please read this Blogs.msdn article

You don't need to worry about how to find stats that are not updated after rebuild if you use Ola Hallengren solution for index maintenance

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 12:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics