Category: SQL Server Administration
This category contains all the articles and posts related to SQL Server administration.
-
Identifying SQL Server cross-database dependencies when migrating
Are you moving a database to a different SQL Server? Worried the database might have cross-database dependency on other databases that are not part of this move? This post will show you how to identify any cross-database dependencies as part of your pre-checks for the migration
-
dutyDBA Case Files #2 – Who dropped the tables and deleted/recreated stored procedures on the production database?
In this edition of dutyDBA case files, I show you how to investigate an unauthorised production database change to figure out who made the changes. This walks you through the process of recovering from the application outage, and identifying the root cause.
-
How to compare the server configuration and settings (sp_configure settings) of two SQL instances and identify the differences?
Have you ever wanted to compare the server configuration settings of two SQL Servers, but struggled with creating linked servers between the servers or by manually comparing the data? No longer! This post provides you with a PowerShell script, that takes two SQL Server names as input parameters, quickly compares the server configuration and highlights…
-
SQL Server ‘max server memory (MB)’ – the magic formula for calculating buffer pool size
As an SQL Server DBA, have you got a formula for calculating the value for ‘max server memory (MB)’ parameter, that restricts the memory used by SQL Server buffer pool? If not, read on and use the script provided in this post, to come up with a suitable value using various different formulae.
-
Too many Extended Events sessions? Take control, see what’s running and stop unnecessary sessions
Have you got too many extended events sessions running on your production server? Not sure which ones are running and which ones are needed? Read this article and learn how to take control of your extended events sessions
-
dutyDBA Case Files #1 – Unable to change the database owner on secondary replicas to sa
This case notes is from a real world incident, where a DBA account could not be dropped because it owns the databases on an Always On secondary replica. I investigate how it happened and show you how to resolve it, and prevent it from happening again.
-
Audit SQL Server login activity with Extended Events: Who connected, when, from where, how often & verify connection pooling
This article provides you with a stored procedure that sets up an Extended Events session in SQL Server to track all the successful logins. It then summarises the data from the .XEL file into usable format, so you can see which logins are connecting from where, via which application, how often they connect, is connection…
-
Reclaim wasted disk space! Have you got gigabytes of unwanted database files quietly eating storage on your SQL Server disks?
This article provides you with a script that identifies all the unwanted, unused files sitting on your SQL Server data and transaction log disks without your knowledge. It also provides you the necessary commands for deleting the junk files.
-
Using Extended Events, how to track who is using a table/view/stored procedure etc. in my SQL Server database?
This article will show you how to identify which user, application or login is using a database object (table/view/stored procedure etc.) in your database. This technique uses the lock_acquired event via extended events. Very useful if you are looking to find out is anyone is using a database object, before dropping it.
-
Script to generate the setspn commands required to create/register SPNs for Always On & standalone SQL Server service accounts
This article offers a script that generates all the necessary setspn commands required to create the SPNs for Always On and standalone SQL Server instance service accounts. Once you run these setspn commands, the SPNs get created and registered in the Active Directory (AD)
Latest Articles


