LOG_REUSE_WAIT_DESC shown as Availability_Replica even after DB is removed from AG

Issue

One of our customers has an availability group server with two nodes and four databases. He received a warning stating that the log file for one of the larger databases was full.

Customer failed to check AG sync status and removed the database from AG, assuming that this would fix the problem and allow the log file to be truncated. The log file was not truncating even after the database was removed from AG. He contacted our DBA team, requesting assistance because the system was in production and the log file drive was rapidly filling up.

Continue reading

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

When you’re a DBA, a problem that appears to be insignificant based on the error description may not be so when you probe further.
Our monitoring system just warned us that the ‘XYZ’ database was missing a differential backup, with an error message as follows:

“Cannot perform a differential backup for database “XYZ”, because a current database backup does not exist. Perform a full database backup by reissuing BACKUP DATABASE, omitting the WITH DIFFERENTIAL option. [SQLSTATE 42000]”

Continue reading

SQL Script to find disk space on the server including mount point space

DBAs are frequently confronted with the problem of needing to obtain storage capacity data on a server, if the server has mount points configured then xp_fixeddrives does not provide complete information.

In such circumstances, I use the script below to retrieve free disc space on the servers, as well as mount point space. This script has been updated to output in the format below.

Keep On Reading

Change the Default installation path for SQL Server management Studio using Command Prompt

I previously wrote a blog post about using PowerShell and the registry editor to modify the default installation path for SQL Server Management Studio here.
Since then, I’ve tried a few alternative approaches, and now I’m back with a new method for installing SQL Server Management Studio via the command line to a user-specified location.

Keep On reading