Amazing SQL server tools every DBA must have!!! – Part 2

This post is continuation of my post Post

In the previous post, I discussed about Database and OS configuration tools and in this post I will discuss about performance monitoring tools.

Performance monitoring and troubleshooting : In performance monitoring we have a great set of tools which are free of cost and can be easily accessible.  I won’t go in much details of these tools as there is already lots of stuff available. The main intent is to collate all the tools list at one place. It will help to know what tools are available for free and how best they can fit in your environment.

Performance monitoring and troubleshooting can be done in two ways. 1. Live 2. postmortem.

lets take an example of High CPU issue, if DBAs are asked to troubleshoot live on such issues – they need a very deep understanding of how SQL server work and need lots of SQL scripts/perfmon counters handy to find out the issue. But for DBAs who have level 100-200, they will end up either restarting the SQL server or killing the sessions with heavy queries.

Now, lets say the issue is not fixed in live troubleshooting and the management team wants to know the root cause of the issue i.e. postmortem analysis. If DBA know lots of DMV’s it still can be figured out though still the chances are very less but for the new DBA it will be very difficult to find out something.

To cater to both the needs of live and postmortem analysis, we have enough tools available.

For postmortem performance troubleshooting (These tools can be used for performance baseline as well) , the tools which we have are :
1.MDW – Management Data Warehouse

For Live troubleshooting and monitoring the tools we have, are:
1. Activity monitor
2. UCP
3. Standard SQL reports

Postmortem performance analysis tools

1. Management Data Warehouse (MDW) : – This was the new tool introduced in SQL server 2008. It’s gained a lot of popularity for the postmortem analysis. Basically, It has predefined set of data collectors which can be used to collect and upload the data to MDW database.  It captures query statistics,disk activity and server activity. Even Utility control point(will discuss in the next sections) tool uses this in the background.

Here are the reports screenshot which could be used to find out the cause of the issue:

Overall Server Summary:


Query Statistics report where you could see the reports based on CPU/IO/Duration.


Disk summary report


These reports help to find out the issue proactively. After studying it little deeper, I found that they have SSIS packages built to fetch the data from the server and upload it to the data warehouse database.

To read the packages in detail you could open and fetch the packages from SQL server integration services and understand what it does:


Note:  Change the job frequency accordingly as the default frequency may not be appropriate for your environment.

2. PSSDIAG / SQLNexus : This is the set of tools which helps to do postmortem analysis. I will discuss briefly about both of them.

PSSDIAG: It’s a framework you could configure the kind of data you want to capture.  The dashboard looks like:

In the screenshot, you could see various sections like profiler trace, perfmon, SQLDIAG and other SQL scripts.  In this blog, I have discussed about how to configure the pssdiag for the high CPU issue: . you could refer this blog for reference to configure the tool.

Once the tool is configured and you save the configuration, it will create a which could use to capture the logs. You have to follow the below steps to run it during the time of the issue:

Steps to run the PSSDIAG:

a. Create a folder named PSSDIAG on your SQL server machine.  This folder should be on a drive with plenty of space as diagnostic file collections can be quite large
b. Download the PSSDIAG from FTP site.
c. Open a command prompt.  Change the current directory to your PSSDIAG folder and run pssd.exe to extract its contents.
d. Run PSSDIAG.cmd at the command prompt to start the collection process.
e. Once PSSDIAG displays the message, “PSSDIAG Started,” attempt to reproduce your issue.
f. Stop PSSDIAG by pressing CTRL+C.

Please make sure you collect the data for 10-15 minutes minimum to get the complete understanding of the issue.

Note : – Please make sure you configure profiler traces to minimal level. It can cause production outage if not configured appropriately.

Reference links:
Freely downloadable tool, the PSSDIAG: –
Configure PSSDIAG : –
More information on PSSDIAG: –

After collecting the logs ,you may think – how to analyze the data. To help us with that, there is another tool SQLNEXUS.

SQLNexus :  SQLNEXUS is tool which helps to analyze the logs captured by PSSDIAG utility. The PSSDIAG logs are uploaded to SQLNEXUS tool and it shows the performance bottlenecks, slow queries, blocking in graphical reports. It provides effective and detailed analysis of the issue, if any.

We have to upload the PSSDIAG data on the dashboard like this: Click on import and give the path of the PSSDIAG output folder:


Reports of SQLNexus look like:


Steps to install and run the SQLNEXUS tool:

Download RML –
Download SQLNexus –
How to run SQLNexus –

For manual PSSDIAG analysis, you could follow this blog:

Above mentioned tools are boon to the DBAs to find out RCA. If you are confused about when to use which tool , let me explain you little more about it:

MDW : – This tool can be left configured and can be used for post mortem analysis. The limitation of this tool is that, it won’t give you missing indexes list , complilation / recompliation details etc. It will give you enough details to find out the issue but if you want to go in granular level, then this tool may not give you complete information.

To get more details , you will need to run the PSSDIAG. To run the PSSDIAG, you will have to first install the dashboard where you will configure the package. Once the configuration is done, you could pickup that .cab/exe file and take it to the server where you want to run it.

There you will follow the steps mentioned in PSSDIAG section above and capture the data. Once the data is captured you will need to feed that to SQLNexus so that it could show the reporting in more detailed format to find out the issue.

For manual PSSDIAG analysis, you could follow this blog:

The drawback of PSSDIAG over MDW is , you will have to run it manually every time when the issue occurs but MDW will keep running in the background and fetch the data for you.

Live troubleshooting tools :

Activity Monitor : This is a very good tool to troubleshoot live issues. It has four sections as shown the below screenshot:


To see this tool you need to right click on the instance name and select activity monitor:


It can be used best for blocking issues or may be other query issues. Under processes you can get the output of sys.dm_exec_requests joined with some other DMVs which can be traced in profiler trace or we can check the query text:


Same way, we could use the other options to get resource waits , IO stats and expensive queries. It can help to at least find out the direction , you need to go.

It will be more effective if used with the standard reports mentioned below:

Standard SQL reports : There is a great set of reports which could be leveraged to do live troubleshooting for performance issues. Here is how find them:

Right click on the instance name as shown in the screenshot:

here is the screenshot of Server Dashboard report :

Similarly, there are lots of other reports which can help to find out high CPU/IO/time queries.  To read more about it , please check : and

UCP (Utility Control point): I have seen very few DBAs aware of this utility but can be very useful to track CPU,DB space and disk space on the servers.

Let me explain the best use of this utility by giving an example. lets say you have 10 applications hosted on SQL environment and there is high CPU caused by one of them. Could you think of any method of tracking which application’s query is causing the issue.

May be the answer will be, find out the query causing the issue and then find out which application this query belongs to. But If we use UCP , we can find out the application wise CPU consumption with just few clicks. But we will have deploy the application using data tier project using BIDS then only we will get the list under data tier application.

Application wise resource usage as shown in below screenshot :


This article explains about how to configure the UCP and it’s benefits :

The dashboard of UCP looks like :


I have got this question many times, We have all the tools available then why do people go for paid tools for DB monitoring. The answer is , the paid tools give us one integrated framework where we can monitor all this. But almost same work can be accomplished by using all the above mentioned tools but the only difference is we have to hop between these tools to drive a conclusion.  These tools are boon for the organizations which don’t have budgets to spend on the monitoring tools.


Amazing SQL server tools every DBA must have!!! – Part 1

After visiting to many customer locations I have found there is a great set tools , which many DBAs are not aware of. They struggle a lot while troubleshooting performance issues. So, I decided to blog on the subject matter so that it could help DBAs to troubleshoot the performance issues faster. This blog targets the audience with the knowledge level 100-200. All the tools discussed in this article are either free or inbuilt in SQL server installation:

There are majorly two sections of this blog:

    1. Database and OS configuration
    2. Performance monitoring

Database and OS configuration : There are 2 major tools which we have available :

  • BPA(Best Practice Analyzer): BPA tool is used to find the discrepancies in the system and SQL level configuration. It helps to unveil the critical issues before it causes serious outage. It has some great set of rules which it runs against the collected data. This tool is deprecated in SQL 2012 as it’s taken over by system center advisor which we will discuss in the next section:

It shows critical errors : If consistency checks are not being done on regular basis, If backups are outdated and there are some critical issues in the server etc. Please check the demo in the links mentioned below to get familiarity in depth:

This tool can be great help to understand the issues proactively and take necessary actions before it’s too late.

Here is the screenshot of the recommendations by BPA:


For more details check the link:

Download and Install MBCA  –

Download and install BPA –

Steps to run BPA –

Demo of how BPA works  –


System Center Advisor(SCA) : This tool , which is now released for public , helps to identify the discrepancies in the SQL configuration. Not only this, it can help to find out the unsupported features and patch levels of SQL server instances. This tool can be of great help for the customers who can’t purchase the Microsoft premier services.

It pretty much comes under the proactive work for the SQL environment. As more than 30% approx. the performance issues in the SQL environment are due to the wrong configuration. It also helps to proactively find out, if the backups are outdated or consistency checks are not done etc.

How it works: 

There are two major components of this tool :

1. Gateway
2. Agent

1. Gateway: – This component has to be installed on the machine from where you will upload the logs to the MS cloud service. It can be a centralized place from where the data is uploaded to the cloud service or can be installed on every individual machine to upload.

2. Agent : – This component must be installed on the machine on which you want to collect the data.


This is how the reports look like :



In most of the environments, the production servers can’t be exposed to internet and the ports can’t be opened without critical purpose. For this tool to upload the data to cloud service ,we need to open a port (port no. 80) . To avoid any complications there is a provision to setup a remote gateway to which all the data will be provided and it will upload the logs to the cloud service.  As shown the first screenshot under this section, multiple agents can report to one gateway and it can be given internet access to upload the logs.

To read more about it , please check this post:

Performance monitoring, I will discuss in my next post. Please click here to read about it

System centre Advisor is now free!!!

Some of you who are not aware about system center advisor, here is what it is:
System Center Advisor is a cloud service that enables IT Professionals to proactively avoid problems resulting from server configuration issues. It can help you resolve issues faster by providing access to current and historical configuration data for a deployment. Additionally, System Center Advisor reduces downtime by providing suggestions for improvement and notifying users of key updates specific to their configuration

To read more about it , please refer this article: