TSQL to get comprehensive SQL server backup report

Many times while trouble shooting backup issues on SQL server we have to check manually that when was the latest backup taken , where it was taken and for which all databases it happened . This requires a lot of manual clicks and script typing. To ease this , I have developed a script that … Read more

SQL Server Encrypted Backup and Restore

SQL Server encrypted backup is a feature of both standard and enterprise edition in SQL Server 2019. You can refer below link for more details: https://learn.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2019?view=sql-server-ver15 Taking encrypted backups and restoring those backups on another SQL instance requires some additional steps to be followed. Take Encrypted Backup Above encrypted backups could be restored on same … Read more

Taking SQL Server Backups in yyyymmdd_hhmmss format

When we configure native log shipping, it takes log backups in yyyymmdd_hhmmss format. Recently, we had requirement where customer wanted us to take other native backups in yyyymmdd_hhmmss format. We used below code for taking different backups in required format. Full Backup Differential Backup Log backup

OLA Backup job not deleting old Transaction Log Backups

Recently I encountered one issue where OLA Hallengren transaction log backup job was not deleting old backup files for one particular user database. While for other databases it was deleting the files as per retention period mentioned against “CleanupTime” parameter. “CleanupTime” parameter was mentioned as 48 hours but there were log backup files older than … Read more

Log file full due to snapshot replication

Log File Truncation Pending for Replication in Snapshot Replication

SQL Server on Azure VM. Cannot Perform a Differential Backup for Database “xyz”, Because a Current Database Backup Does not Exist.

When you are a DBA, sometimes a problem which might seem so trivial from the error description may not really be so when you dig deeper. Recently we got alerted from our monitoring system that ‘XYZ’ database was missing a differential backup with error statement as “Cannot perform a differential backup for database “XYZ”, because … Read more