This Error occurs due to – Site unable to connect it’s Database. To make sure, look at the event viewer and you can find the error log saying ‘Cannot open database’, ‘The login failed’ etc.,
HTTP/1.1 200 OK
Follow the Steps if you get the above error:
- Login Database with Admin user credentials.
- Check whether the Database of the Site Exists.
- Check the Site-Admin User has proper privileges over the Database.
- Check whether the Database is marked as Suspect and try to resolve the problem – by following as below:
Description for Suspect Status:
A SQL Server database can become marked suspect for several reasons. Possible causes include:
- Denial of access to a database resource by the operating system.
- Anti-virus/3rd party software blocking access.
- The hardware/network issue or corruption of database file(s)
Query – To give the detail of the problem:
DBCC CHECKDB (‘YOUR_DB_NAME’) WITH NO_INFOMSGS, ALL_ERRORMSGS;
Query – To Resolve the Problem:
ALTER DATABASE YOUR_DB_NAME SET EMERGENCY
ALTER DATABASE YOUR_DB_NAME SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘YOUR_DB_NAME’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE YOUR_DB_NAME SET MULTI_USER
- Run the above queries in Query Analyzer.
- Replace your Database name with YOUR_DB_NAME from above Queries.
- Here , REPAIR_ALLOW_DATA_LOSS, is a one way operation i.e. once the database is repaired all the actions performed by these queries can’t be undone. There is no way to go back to the previous state of the database. So as a precautionary step you should take backup of your database before executing above mentioned queries.