Dynamically Generate Replication Tasks with Biml and Custom Connectors
This article walks through using Biml with 3rd party connectors to replicate external data to SQL Server in SSIS.
2021-02-19 (first published: 2019-03-21)
1,764 reads
/* Typical SQL Alerts to deal with REplication. */ USE [msdb] GO --1. EXEC msdb.dbo.sp_add_alert @name=N'Replication Warning: Long merge over dialup connection (Threshold: mergeslowrunduration)', @message_id=14163, @severity=0, @enabled=1, @delay_between_responses=30, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --2. EXEC msdb.dbo.sp_add_alert @name=N'Replication Warning: Long merge over LAN connection (Threshold: mergefastrunduration)', @message_id=14162, @severity=0, @enabled=1, @delay_between_responses=30, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --3. EXEC msdb.dbo.sp_add_alert @name=N'Replication Warning: Slow merge over dialup connection (Threshold: mergeslowrunspeed)', @message_id=14165, @severity=0, @enabled=1, @delay_between_responses=30, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --4. EXEC msdb.dbo.sp_add_alert @name=N'Replication Warning: Slow merge over LAN connection (Threshold: mergefastrunspeed)', @message_id=14164, @severity=0, @enabled=1, @delay_between_responses=30, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --5. EXEC msdb.dbo.sp_add_alert @name=N'Replication Warning: Subscription expiration (Threshold: expiration)', @message_id=14160, @severity=0, @enabled=1, @delay_between_responses=30, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --6. EXEC msdb.dbo.sp_add_alert @name=N'Replication Warning: Transactional replication latency (Threshold: latency)', @message_id=14161, @severity=0, @enabled=1, @delay_between_responses=30, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --7. EXEC msdb.dbo.sp_add_alert @name=N'Replication: agent custom shutdown', @message_id=20578, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --8. EXEC msdb.dbo.sp_add_alert @name=N'Replication: agent failure', @message_id=14151, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --9. EXEC msdb.dbo.sp_add_alert @name=N'Replication: agent retry', @message_id=14152, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --10. EXEC msdb.dbo.sp_add_alert @name=N'Replication: agent success', @message_id=14150, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --11. EXEC msdb.dbo.sp_add_alert @name=N'Replication: expired subscription dropped', @message_id=14157, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --12. EXEC msdb.dbo.sp_add_alert @name=N'Replication: Subscriber has failed data validation', @message_id=20574, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --13. EXEC msdb.dbo.sp_add_alert @name=N'Replication: Subscriber has passed data validation', @message_id=20575, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO --14. EXEC msdb.dbo.sp_add_alert @name=N'Replication: Subscription reinitialized after validation failure', @message_id=20572, @severity=0, @enabled=1, @delay_between_responses=0, @include_event_description_in=5, @category_name=N'Replication', @job_id=N'00000000-0000-0000-0000-000000000000' GO