Tag: SQL Server Scripts

SQL Server Scripts to help with Production DBA tasks, shared by an experienced Microsoft SQL Server Database Administrator.


  • Show Only the Domain of an Email Address in SQL Server

    When working with email data in SQL Server, you may often need to show only the domain of an email address. Extracting email domains is useful for analyzing trends, identifying invalid emails, or finding the most frequent domains in your dataset. In this guide, I’ll demonstrate how to…

    Read More


  • SQL Server Script: Get Database Growth Events

    In SQL Server, database growth events occur when the database files automatically expand to accommodate more data. These events are essential to monitor because frequent auto-growth can impact performance, causing fragmentation and increased disk I/O during expansions. Proper configuration of file growth settings is crucial to maintaining optimal…

    Read More


  • Show Available Disk Space in SQL Server

    This blog post is to share a script that you can run in SQL Server (versions 2008 R2 and above) which shows the available disk space for all local volumes on a SQL Server host. I’m also including a quick note on how to get this information with…

    Read More


  • Get Estimated Database Backup/Restore Time Script

    This post contains a SQL script to get estimated completion times and process information for your currently running database backups & restores in SQL Server. Backing up a database can often take a very long time. It depends on various factors, one obvious reason being, that the bigger…

    Read More