msdb.dbo.backupset does not contain Red Gate backup metadata
lculley2011
Posts: 10
For certain databases I backed up using red gate backup outside of a sql job and for the rest I have them in a regularly scheduled job. For those backed up inside of a job, I get a record in msdb.dbo.backupset. For those dbs backed up in SSMS via the same syntax as in the job, I do not get a row in backupset. Why is this and where can I see my backup metadata for my non-job Red Gate backups? I have verified that the backup files exist btw.
Why do I need this information? I'm trying to create some scripts in order to see if there are any dbs that have not been backed up and should be and noticed that some dbs were not showing in backupset and therefore look like they are not backed up but in fact are.
Why do I need this information? I'm trying to create some scripts in order to see if there are any dbs that have not been backed up and should be and noticed that some dbs were not showing in backupset and therefore look like they are not backed up but in fact are.
Comments
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
DECLARE @exitcode int
DECLARE @sqlerrorcode int
EXECUTE master..sqlbackup '-SQL "BACKUP DATABASES [model] TO DISK = ''\\MIAUTP01\sqlbackup\MIASQP01\<DATABASE>\<AUTO>.sqb'' WITH ERASEFILES = 2, MAILTO_ONERRORONLY = ''group@company.com'', DISKRETRYINTERVAL = 30, DISKRETRYCOUNT = 10, THREADCOUNT = 3, VERIFY"', @exitcode OUT, @sqlerrorcode OUT
IF (@exitcode >= 500) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('SQL Backup failed with exit code: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END
If you do not find any records in those tables, you should check the SQL Server error log for any errors pertaining to SQL Server failing to write the backup history records.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8