Monday, April 17, 2017

how to execute dbcc checkdb for all databases in sql server?

exec sp_MSforeachDB 'DBCC CHECKDB (?) WITH ALL_ERRORMSGS, EXTENDED_LOGICAL_CHECKS, DATA_PURITY'

No comments: