Enable all alerts
SELECT 'exec msdb..sp_update_alert @name = '''+NAME+''', @enabled = 1'
FROM MSDB..SYSALERTS
Disable all alerts
SELECT 'exec msdb..sp_update_alert @name = '''+NAME+''', @enabled = 0'
FROM MSDB..SYSALERTS
Enable all alerts
SELECT 'exec msdb..sp_update_alert @name = '''+NAME+''', @enabled = 1'
FROM MSDB..SYSALERTS
Disable all alerts
SELECT 'exec msdb..sp_update_alert @name = '''+NAME+''', @enabled = 0'
FROM MSDB..SYSALERTS