Template Script: msdb\Create alert operator notification_method list.sql

SELECT 'insert [msdb].[dbo].[sysnotifications] (alert_id, operator_id, notification_method)
select (select id FROM [msdb].[dbo].[sysalerts] WHERE NAME = '''
 + a.name + ''') as alert_id,
(select id from [msdb].[dbo].[sysoperators] o where name = '''
 + o.name + ''') as operator_id,
'
 + CAST(n.notification_method AS VARCHAR) + ' as notification_method
GO'

FROM [msdb].[dbo].[sysnotifications] n INNER JOIN [msdb].[dbo].[sysoperators] o ON n.operator_id = o.id
INNER JOIN [msdb].[dbo].[sysalerts] a ON n.alert_id = a.id

Description for Template Script: msdb\Create alert operator notification_method list.sql

Todo
Site Map | Printable View | © 2008 - 2012 NuRoN Consulting, INC | Powered by mojoPortal | HTML 5 | CSS | Original design by Andreas Viklund
Share This Using Popular Bookmarking Services