MS SQL Server Suspect Query


This is trouble shoot guide for SQL Server suspected database caused by storage issue. Using the Server Studio run the following script

EXEC sp_resetstatus 'yourDBname';


ALTER DATABASE yourDBname SET EMERGENCY

DBCC checkdb('yourDBname')

ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

DBCC CheckDB ('yourDBname', REPAIR_ALLOW_DATA_LOSS)

ALTER DATABASE yourDBname SET MULTI_USER

Replace the yourDBName with suspected databasee.

Comments

Popular posts from this blog

Zustland : a minimal data store to consider for the Next React Project

How to run HugginFace models in Python

Build a Flask-Python web App