September 28, 2010 at 4:13 am
IS there any optionn to create an alert wen the log file is full
September 28, 2010 at 7:55 am
You can create new alerts under SQL Server Agent, right-click Alerts and choose New.
Or, like this:
IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Full Log - 9002'))
---- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @name = N'Full Log - 9002'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @name = N'Full Log - 9002', @message_id = 9002, @severity = 0, @enabled = 1, @delay_between_responses = 300, @include_event_description_in = 1, @category_name = N'[Uncategorized]'
END
go
exec sp_altermessage 9002, 'WITH_LOG', 'true'
go
You will also need to create an operator and setup database mail if you want the alert firing to email you directly. Or, you could have the alert kick off a job.
Sincerely,
Dan B
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply