SQL Server database can become marked suspect for several reasons, therefore regular database backup is mandatory. Possible causes include: 1. Denial of access to a database resource by the operating system 2. Anti-virus/3rd party software blocking access 3. The hardware/network issue or corruption of database file(s ) Prior to resetting the status, the database file issue should be resolved. First check error logs and Event Viewer for related messages. If logs offer no help, then one way of resolution: create an empty database, copy over the damaged database files and restart the server. The (copied over) database may come up in the suspect mode. The recovery methods below are last resort only. At minimum the server should be rebooted (Windows restart - hardboot), if possible at all, a database copy should be created. If backup files exist, point-in-time recovery is preferred to emergency repair. The following script resets the...
Comments
Post a Comment