MSSQL Repair Database Corruption

Posted: 01/07/2018 in MSSQL, Windows
Tags: , , , , , , ,
  • DBCC DBCC CHECKDB (<db name>)
  • DBCC CHECKDB
  • DBCC CHECKDB (<db name>, REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD)
  • DBCC CHECKCONSTRAINTS
  • search constraints in DB by name:
    SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
    WHERE CONSTRAINT_NAME =’FK_Documents_Finance’

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s