Read Statistics Histogram using DMV

DMV: sys.dm_db_stats_histogram (object_id, stats_id)  For a long time, the DBCC SHOW_STATISTICS command was the only way to get information about statistics. It displays current query optimization statistics for a table or indexed view. It was always a painful task, if you wanted to capture output of the DBCC SHOW_STATISTICS for all tables in one go. […]

Read more
After migrating SQL Server from 2005 to higher version, the waits type PAGELATCH_UP increased

Recently, I experienced an interesting issue where I found SQL Server wait type PageLatch_UP went up drastically after migration. Let’s walk through to understand the problem and its solution. Problem After migrating SQL Server 2005 instances to higher versions – SQL 2008/SQL 2008 R2/SQL 2012/SQL 2014 and SQL 2016, I found the most of (not all) […]

Read more
SQL Server Service Information

DMV: sys.dm_server_services Microsoft SQL Server 2008 R2 SP1 and SQL Server 2012 has a new set of DMVs. One of them is “sys.dm_server_services” which  return a whole host of important information relating to the SQL Server services that includs; Service Name Startup Type Startup_Type_Desc Status Status_Desc Process_id Last Startup Time Service Account, File Name Is_Clustered Cluster […]

Read more
Disk Space Monitoring using SQL Server DMV

DMV : sys.dm_os_volume_stats Being a SQL Server database administrator, you may often receive alerts or asked by Senior DBAs to check, if the disk space is running out of space on SQL Server. Before SQL Server 2008 R2 SP1, the best way to check on available disk space from within SQL Server is to use the undocumented […]

Read more
When was SQL Server installed?

In this blog post. Let us learn about how to retrieve date and time when the SQL Server was installed. To retrieve the SQL Server Installation date, we have to check the login “NT Authority\System” creation date which gets created at the time of SQL Server installation. You can check the SQL Server installation date and time […]

Read more
Identifying Blocking Chain in SQL Server

HAPPY NEW YEAR 2017!! I hope you all had a good Christmas and New Year. I always try to review my skills as a DBA and explore different options to make my job easier. Recently, I was working on the blocking issue of SQL Server and found that there were a lot of sessions which were being blocked. Sometimes, […]

Read more
Uninstall SQL Server Tools on Ubuntu System

If you remember, Installing SQL Server on Linux does not install SQL Server tools by default. You have to install it separately. The same way when you uninstall SQL Server, it won’t uninstall mssql-tools, you have to uninstall separately. In the previous blog post, we discuss how to uninstall mssql-server on Ubuntu System. Here, we […]

Read more
Uninstall SQL Server on Ubuntu System

There are scenarios where you want to uninstall the SQL Server vNext CTP1. This blog describes how to uninstall Microsoft SQL Server on Ubuntu system. It will completely remove Microsoft SQL Server along with repository, data directories,  and binary of the SQL Engine. Note: During uninstall mssql-server package, it does not remove all the files […]

Read more