Tag: How to
This tag groups together all the SQL Server “How to” artciles.
-
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
-
Management Studio tip – A menu driven RunAs launcher batch file to open SSMS using multiple different login credentials
Tired of repeatedly launching SQL Server Management Studio (SSMS) with different Windows accounts? This post provides a lightweight, menu-driven batch file that lets you choose the required security context and open SSMS instantly. It’s a simple productivity tool that’s ideal for DBAs and developers who regularly work across multiple domains, environments, or privileged accounts.
-
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…
-
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
-
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.
-
In a distributed Always On AG setup, how to check the database synchronisation and health status across all nodes/replicas?
This post shows you how to check the synchronisation and health status of your databases and replicas across a distributed Always On setup. The built-in Always On dashboard does not show this information for distributed Always On setups.
-
SQLScriptRunner – A free PowerShell tool for deploying/executing scripts across multiple SQL Servers
Need to run or deploy scripts across multiple SQL Servers in your estate? This page provides you with a free PowerShell script that can be used to deploy or execute SQL Server scripts across any number of SQL Servers in your estate.
-
How to identify and fix all logins with invalid default databases? (Error 4064)
This article shows you how to identify all those logins on your SQL Server instances which have an invalid default dataabase that no longer exists. This article also shows you how to manage this situatoin, and provides you a stored procedure that resolves the issue.
Latest Articles


