SharePoint 2010 Database Integrity checks

Zack used Ask the Experts™
Hi EE,

We are doing an in-place upgrade of a SharePoint 2010 SQL instance and we want to do some database integrity analysis post upgrade.

Since we have limited number of people to look check the database integrity post upgrade what would be the most important databases to review?

Any assistance is appreciated.

Thank you
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Analyst
You could run the code below against the SQL Server where all sharepoint databases are located and this will give you the integrity report for all databases excluding tempdb which is rebuilt everytime SQL restarts. If you want to skip any other system database you could add then to the NOT IN list.

DECLARE @sqlcmd VARCHAR(max);
SET @cmd1 = 'if ''?'' NOT IN (''tempdb'')  DBCC CHECKDB([?]) WITH NO_INFOMSGS;';
EXEC sp_MSforeachdb @command1 = @sqlcmd;

Open in new window

ZackGeneral IT Goto Guy


Hi Icohan,

Cheers for the answer for anyone else out there who want do some further integrity checks, the queries in this post are really handy:


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial