Reasons and procedure
Anyone who works with databases in the MS SQL server is certainly familiar with this problem. After an unexpected event, a database can no longer be reached and is marked as suspect. The reasons for this can be manifold:
- The database is corrupted (marked as "corrupt").
- There is not enough memory for the SQL server to restore the database at start-up.
- The database cannot be opened due to insufficient memory or hard disk space because of defective files.
- The database files are locked by the operating system, third-party backup software, etc.
- An unplanned termination of the SQL server service, a power failure or a hardware error.
- Open Microsoft SQL Server Management Studio.
- Establish a connection to the affected SQL server instance
- Open a new query
- Copy the following script into the query and replace
"[defective database]" with the name of your database marked as defective.
- Run the query [vc_single_image image="10521" img_size="full"]