IT Consultancy & WebSite Creation

Main menu

Post navigation

Performance Tuning MSSQL

MSSQL has many excellent tools which can be used for discovering performance bottlenecks.

Sp_monitor and dbcc perfmon

To get a snapshot of what the SQL Server is doing then these commands are very usefull.

Run sp_monitor twice with a gap of 30 seconds in between to get a high level overview of how busy the sql server is.

dbcc perfmon will give you much more detailed information on the state of the sql server but the command has been supervised by various SQL Server counters which can be used in the System monitor.

SSMS Reports

Sql Server has a set of excellent reports which are generated from the Dynamic Management Views, these are both at the server and database level. If you right click on the server or an individual database in the SQL Server Management Studio then you can select which report to run. You can even export the report output to a pdf. This will highlight any problems which you can then focus on.

System monitor

To drill down further the first port of call should be system monitor or perfmon, which is started by typing perfmon into the run box.

One excellent feature of this is that you can export to a Counter Log at the same time as running a SQL Profiler session, (discussed later), you can then merge them which will let you see how bad queries affect the CPU, memory etc or vice versa.