December 23, 2009 at 4:46 am
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 ?
December 23, 2009 at 4:53 am
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
December 23, 2009 at 4:57 am
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
December 24, 2009 at 6:04 am
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