Skip to content

T-SQL

SQL Server: Get email notifications for Error Log entries

Introduction In a previous blog post, I did a T-SQL script reading Audit files to send emails with valuable information about instance changes. In this one, you will see how to get nice emails from critical errors or specific events occurring on the instance using the ErrorLog. A common best practice for any DBA is to configure SQL Server Agent… 

SQL Server: How to delete the msdb backup history kindly

This week I noticed some slowness on queries related to backup history. The instance had a huge msdb database (more than 10GB size), the backup history had never been purged. I already wrote a post on this topic and provided a small PowerShell script using dbatools to clean the backup history. The issue with sp_delete_backuphistory or Remove-DbaDbBackupRestoreHistory is that the… 

SQL Server 2016: native support for JSON

A lot of discussions and most important, a feature requests in the Microsoft connect site here with more than 1000 votes is the origin of this new feature in SQL Server 2016. A lot of NoSQL have already this function and PostgreSQL for example have the json_extract_path_text functionality and you can at every time ask my colleague Daniel Westermann one of… 

dbi services wishes you a Merry Christmas with this SQL Server script

The end of the year approachs and soon it will be time to celebrate Christmas with your family and friends. At dbi services, we wish you a merry christmas via SQL Server with the following script, to execute in your SQL Server Management Studio for example (supported only by SQL Server 2012 and SQL Server 2014). You will find a…