﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / T-SQL (SS2K8)  / TSQL to check database backup status / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 21:33:51 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: TSQL to check database backup status</title><link>http://www.sqlservercentral.com/Forums/Topic1381652-392-1.aspx</link><description>[quote][b]sapen (11/7/2012)[/b][hr]Thanks for the script[/quote] You're Welcome Sapen. :-)</description><pubDate>Wed, 07 Nov 2012 20:48:48 GMT</pubDate><dc:creator>vinu512</dc:creator></item><item><title>RE: TSQL to check database backup status</title><link>http://www.sqlservercentral.com/Forums/Topic1381652-392-1.aspx</link><description>[quote][b]capnhector (11/7/2012)[/b][hr]if your just looking for a report of backups you can query msdb.dbo.backupset which contains allot of information[code="sql"]select top 10 b.database_name, b.backup_start_date, b.backup_finish_date  from msdb.dbo.backupset b[/code]with a join to sys.databases you can eliminate system databases if you dont care about them or can get more detailed info about the databases.  no need to run through the error log with a cursor.[/quote]I was able to pull that information already. But wanted to identify the status of a database backup (failed/succeeded) which doesnt get logged in msdb.</description><pubDate>Wed, 07 Nov 2012 14:55:11 GMT</pubDate><dc:creator>Sapen</dc:creator></item><item><title>RE: TSQL to check database backup status</title><link>http://www.sqlservercentral.com/Forums/Topic1381652-392-1.aspx</link><description>if your just looking for a report of backups you can query msdb.dbo.backupset which contains allot of information[code="sql"]select top 10 b.database_name, b.backup_start_date, b.backup_finish_date  from msdb.dbo.backupset b[/code]with a join to sys.databases you can eliminate system databases if you dont care about them or can get more detailed info about the databases.  no need to run through the error log with a cursor.</description><pubDate>Wed, 07 Nov 2012 13:52:47 GMT</pubDate><dc:creator>CapnHector</dc:creator></item><item><title>RE: TSQL to check database backup status</title><link>http://www.sqlservercentral.com/Forums/Topic1381652-392-1.aspx</link><description>Thanks for the script</description><pubDate>Wed, 07 Nov 2012 11:52:15 GMT</pubDate><dc:creator>Sapen</dc:creator></item><item><title>RE: TSQL to check database backup status</title><link>http://www.sqlservercentral.com/Forums/Topic1381652-392-1.aspx</link><description>You can use the following script to query the Error Log and get result for all Database backups and restores:[code="sql"]Declare @ArchiveNum Int Declare @Arch_Temp Table(ArchiveNo Int, Date DateTime, LogFileSize BigInt)Declare @Err_temp Table(LogDate DateTime, ProcessInfo NVarchar(30), Text Nvarchar(MAX)) Insert Into @Arch_Temp 	Execute xp_enumerrorlogs Declare Arch_Cursor Cursor LOCAL STATIC FORWARD_ONLY For Select ArchiveNo From @Arch_Temp Open Arch_Cursor Fetch NEXT From Arch_Cursor Into @ArchiveNum While(@@FETCH_STATUS = 0) 	Begin		 Insert Into @Err_temp 			EXEC sys.xp_readerrorlog @ArchiveNum 					 Fetch NEXT From Arch_Cursor Into @ArchiveNum 	End Close Arch_Cursor DeAllocate Arch_Cursor Select * From @Err_temp Where ProcessInfo = 'Backup'[/code] You can alter the Script according to your requirement. Hope this is close to what you are looking for.</description><pubDate>Wed, 07 Nov 2012 04:50:28 GMT</pubDate><dc:creator>vinu512</dc:creator></item><item><title>TSQL to check database backup status</title><link>http://www.sqlservercentral.com/Forums/Topic1381652-392-1.aspx</link><description>Hello,I am trying to generate a monthly report for sql database backup job.  Is there a script that I can use to query msdb to check the backup success or failure status of a specific database?Thanks for your inputs</description><pubDate>Tue, 06 Nov 2012 09:52:44 GMT</pubDate><dc:creator>Sapen</dc:creator></item></channel></rss>