Close

September 30, 2013

T-SQL: List Databases with torn pages

select
name, page_verify_option_desc, log_reuse_wait_desc
FROM
sys.databases
WHERE
log_reuse_wait_desc <>’NOTHING’
and
page_verify_option_desc<>’CHECKSUM’
ORDER BY
name,
page_verify_option_desc,
log_reuse_wait_desc asc

Other useful commands:

  • dbcc checkdb(‘db’)
  • dbcc checkalloc(‘db’)