Top Function – Performance Gain

Recently, I presented at Singapore SQL Pass Chapter on the topic T-SQL Fun, and the most of the attendees were a developer. During the session, I discussed TOP function, and I throw a question to the audience – “Not using Top function especially when you can use it – Can it cause performance problem or […]

Read more
Log File Space Issue Monitoring Using SQL Server DMV

As a continuation of “Database Monitoring using DMV” series, this blog will cover how quickly you can address the log file space related issue. Below are the previous blogs which you may find useful in your everyday job. Disk Space Monitoring Using SQL Server DMV SQL Database File Wise Disk Space Monitoring To address the […]

Read more
Setting Up a Subscription

In the last two blogs, we went through Configure Distribution Database and Publication Creation. If you haven’t read them, I will request you to go through before you start exploring this blog. If you don’t have the Subscription database, You must create your subscription database. Once you created the database, you’re ready to create your […]

Read more
Setting Up a Publication for Transaction Replication

In the previous blog, we discussed how to Configure Distribution Database. Once you setup your Distribution database successfully, you can create a publication. Here, we will learn how to create a publication for Transaction Replication and how many jobs get created after the publication setup. Create Publication I’ll walk you through step by step process […]

Read more
SQL Database File Wise Disk Space Monitoring

As a DBA, you get alerts many times regarding the database file space issue. To address the issue, you may be following the steps. Which is the particular database file in the database which is having less space? How much disk space available on the physical disk where the file resides? The below script will […]

Read more
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