Report on failure of the transaction log backup

  • Is it possible to report on transaction log backups failures (not the failure of the job, but the failure of the transaction log backup) in T-SQL ?

  • I assume that you have different job for Transaction log backup, if so then you can set the Notifications / Alerts on Job failed.

    Abhijit - http://abhijitmore.wordpress.com

  • A log backup failure will get logged in the error log... You can query the log to get this info with the following code:

    */

    CREATE TABLE #ErrorLog (

    LogDate DATETIME,

    ProcessInfo NVARCHAR(255),

    LogText NVARCHAR(MAX)

    );

    GO

    INSERT INTO #ErrorLog (

    [LogDate],

    [ProcessInfo],

    [LogText]

    )

    EXEC xp_readerrorlog 0, 1, 'Backup Failed';

    SELECT * FROM #ErrorLog

    --WHERE LOGDATE > GETDATE() -1

    DROP TABLE #ErrorLog

    Not sure if that helps you at all

    Gethyn Elliswww.gethynellis.com

  • You could set up an alert using error number 3041. That one is for when a backup fails.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply