Server put the website is normal, is remote connect not, anxious pity dorado things, let the machine room person to restart the server, there is generally directly shut down, then boot, hard restart.
There have been no anomalies before, but today after the hard restart, found that the site error, a look at the original database status of "suspicious", can not be used, it was a surprise to me, the first time encountered this problem.
Search on the Internet, find a solution, it works, very good, record a bit.
Home IIS and some database services to stop, 80 and 1433 ports in the firewall is also forbidden to connect, meaning is not to allow access, not to affect the speed of execution.
Replace the dbname with the bad database name, the current database selected master, the steps are as follows:
1, modify the database for emergency mode
ALTER DATABASE DbName SET EMERGENCY
2. Turn the database into single-user mode
ALTER DATABASE DbName SET single_user
3. Repair the database log rebuild, this command checks the allocation, structure, logical integrity and errors in all database objects. When you specify "Repair_allow_data_loss" as the DBCC CHECKDB command parameter, the program examines and fixes the reported errors. However, these fixes may cause some data loss.
DBCC CheckDB (DbName, Repair_allow_data_loss)
4. Turn the database back into multi-user mode
ALTER DATABASE DbName SET multi_user
It takes only four steps to get there.