Recovery of database

  • How can we check the corruption of database with out running dbcc check db

  • You could try and restore it and see if it fails.
    Why don't you want to run DBCC CHECKDB? it is the best way of checking for corruption.

    Thanks

  • DBCC CHECKDB command is the main command to detect the inconsistency in the database. It is an amalgamation of other DBCC CHECKDB command, CHECK CATALOG, CHECKALLOC and DBCC CHECKTABLE. Running CHECKDB includes all these commands so you don't need to run these commands separately.  If the corruption is in indexes then you need to run other DBCC CHECKDB undocumented command ie DBCC INDID. The root of finding the database corruption is DBCC CHECKDB only. 
    Go through this link:
    https://www.red-gate.com/simple-talk/sql/database-administration/finding-data-corruption/

  • You don't. Run CheckDB.

    NorthernSoul - Thursday, October 11, 2018 6:43 AM

    You could try and restore it and see if it fails.

    Nah, I've seen enough corrupt DBs restore fine (with corruption in them)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster - Monday, October 15, 2018 1:25 AM

    You don't. Run CheckDB.

    NorthernSoul - Thursday, October 11, 2018 6:43 AM

    You could try and restore it and see if it fails.

    Nah, I've seen enough corrupt DBs restore fine (with corruption in them)

    Never truer words have been said. You can even download some sample backups of corrupted databases here: https://www.sqlskills.com/sql-server-resources/sql-server-demos/

    If a database is corrupted that doesn't mean it can't still successfully be backed up and restored; and if it is (corrupted) then the corruption will be in both the backup and the restored database.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I have seen people having software that integrates with the SAN for taking database snapshots/backups at the block level, should the user still run checkdb at the main database or is it enough to run checkdb from the snapshot/database restore with the software?

  • Depends on how that snapshot is taken. Is it a block-by-block copy it's fine to checkDB.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply