how-to-repair-a-suspect-database-in-mssql

How To Repair A Suspect Database In MSSQL

Possible Causes

The database could have become corrupted.
There is not enough space available for the SQL Server to recover the database during startup.
The database cannot be opened due to inaccessible files or insufficient memory or disk space.
The database files are being held by operating system, third party backup software etc.
There was an unexpected SQL Server Shutdown, power failure or a hardware failure.

Solution: 

EXEC SP_resetstatus databaseName
ALTER DATABASE databaseName SET EMERGENCY
DBCC checkdb databaseName
ALTER DATABASE databaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CHECKDB (databaseName, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE databaseName SET MULTI_USER
Next PostNewer Post Previous PostOlder Post Home

1 comment:

  1. Water Hack Burns 2 lb of Fat OVERNIGHT

    Well over 160000 men and women are using a easy and SECRET "liquids hack" to lose 1-2 lbs every night as they sleep.

    It is painless and works all the time.

    This is how you can do it yourself:

    1) Get a clear glass and fill it with water half glass

    2) Then follow this weight losing hack

    so you'll be 1-2 lbs lighter the next day!

    ReplyDelete