SUSPECT DATABASE in SQL Server

EXEC sp_resetstatus 'DBname';

ALTER DATABASE DBname SET EMERGENCY

DBCC checkdb('DBname')

ALTER DATABASE DBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

DBCC CheckDB ('DBname', REPAIR_ALLOW_DATA_LOSS)

ALTER DATABASE DBname SET MULTI_USER

ALTER DATABASE DBname SET SINGLE_USER

DBCC CheckDB ('DBname', REPAIR_REBUILD)

ALTER DATABASE yourDBname SET MULTI_USER

Application is running slow

1. Check with the application team from when it is running slow.

2. Check my pinging the server.

3. Check network latency (contacting with N/W admin).

4. Check improper responsiveness or OS related issue (Wintel team).

5. If nothing is found, we can ask app team, to verify whether the application is running from other machine or not.

6. Check for Blocking.

7. Kill the process with approval  .

Database Issues - Troubleshooting

1. Offline

i. ALTER DATABASE <DBNAME> SET ONLINE

ii. EXEC SP_RESET STATUS

iii. Before doing this make sure that we inform the DB Users that we are going to work on it to make necessary troubleshooting steps.

iv. Reason can be found in SQL Server Logs why/how/who has taken the database offline.

User Unable to connect

Slow response from the DB when user connected

Suspect

DB Corrupt

DB is in Restoring state