Please Copy the below query into SQL Query Analyzer execute the same to recover SQL database in Post Offices. Execute the query in case of DB suspect or other error with the help of concerned System Administrator.
- Database set to Emergency Mode then Check the database for DB Error
- Then DB will set as Single User
- Now Repair the database with dataloss option before that you ensure the previous backup.
- Now bring the repaired Database into multiuser as Normal Mode.
Incase of eMO database
ALTER DATABASE emo SET EMERGENCYIncase of Postman Database
DBCC checkdb('emo')
ALTER DATABASE emo SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('emo', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE emo SET MULTI_USER
ALTER DATABASE postman SET EMERGENCYIncase of Counter Database
DBCC checkdb('postman')
ALTER DATABASE postman SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('postman', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE postman SET MULTI_USER
ALTER DATABASE counter SET EMERGENCY
DBCC checkdb('counter')
ALTER DATABASE counter SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('counter', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE counter SET MULTI_USER
Comments :
0 comments to “SQL Database Recovery Query for SQL 2005 / SQL 2008 / SQL 2008 R2”
Post a Comment