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

SQL Server is running slow

1. Check number of connections(SP_Who2)

2. Check the processor usage not above 80% of utilization

3. Check the memory usage not above 40-45% of utilization

4. Check the Disk utilization using Perfmon

5. Use profiler to check for the users and current SQL activities and jobs running which might be a problem

6. Finally run UPDATE_STATISTICS command to update the indexes 

7. Need to check fragmentation and rebuild or reorg the indexes if it is required.  

Disk drive full-Troubleshooting

1. We will purge the old data or files
2. We will raise request to Wintel Team to add more space
3. If database log file occupied more space will shrink the log file process