Blog Archives

Live Query Statistics – SQL Server 2016

SQL Server Management Studio (SSMS) 2016 has a handy new feature to View Live Query Statistics. This feature also works when connected to a 2014 instance using SSMS 2016. Why use it? Previously, similar stats were available by doing so:

Tagged with: , , , , , , , , , , , ,
Posted in Database, SQL Server

Export data from DocumentDB / CosmosDB to SQL Server

CosmosDB is Microsoft’s latest NoSQL database offering, a metamorphosed form of DocumentDB, so to speak. Read more about CosmosDB here. Here is a quick note on how to export data from CosmosDB to SQL and do data comparison. This is

Tagged with: , , , , , , , , , , , ,
Posted in CosmosDB, Database


In 2005 version of SQL Server, XQuerying was introduced. It’s a powerful feature and when used together with a CTE, it helps to keep code simple and clean. I use XML extensively in my code and many a time, I

Tagged with: , , , , , , , ,
Posted in Database, SQL Server

Retrieve unsaved query

I was working on a remote machine and while I was away, the machine was restarted. Lost the scripts I had not saved, or so I thought; and then I came up with this – was a life saver!

Tagged with: , , , , , , , , ,
Posted in Database, SQL Server

Find tables which are most commonly used in Stored Procedures

When you start working on a new project, one of the important tasks as a database developer is to get used to the table names. Here’s a script which will help you identify the most commonly used tables (assuming that

Tagged with: , , , , ,
Posted in Database, SQL Server