Category Archives: XML

Monitoring SQL Server database status changes using T-SQL and PowerShell scripts

Monitoring a SQL Server database is a critical component of database administration. Ninety percent of the organizations expect the number of databases to increase over the next twelve months. An increase in data volumes can have negative effects on the … Continue reading

Posted in SQL, T-SQL, XML | Tagged , , , | Leave a comment

SQL – Backup Report

The simple query to find the database backup status The select statment consists of ServerName dbname BackupStartDate BackupFinishDate BackupAge Size status Type The query will only run from sql 2005 and later version. Select    SERVERPROPERTY(‘ServerName’),   db.name,   CONVERT(VARCHAR(10), b.backup_start_date, 103) +   + convert(VARCHAR(8), b.backup_start_date, 14) backup_start_date,   CONVERT(VARCHAR(10), b.backup_finish_date, 103) +   + convert(VARCHAR(8), b.backup_finish_date, 14) backup_finish_date,    case          when (DATEDIFF(hour, b.backup_start_date, getdate())<24)then ‘Success’  … Continue reading

Posted in SQL, XML | Tagged | 4 Comments