Ignore triggers with certain text in name
NeilN1
Posts: 2 New member
in SQL Compare
Is there a way to ignore triggers with certain text in the name? In my case it's ApexSQLAudit and these are the types of triggers:
CREATE TRIGGER [dbo].[dbo_Autopayment_ApexSQLAudit_Delete] ON [dbo].[Autopayment]
WITH EXECUTE AS CALLER
FOR DELETE
AS EXTERNAL NAME [ApexSQL.Audit.BeforeAfter.MOBILECRM.dbo.Autopayment.Delete].[ApexSQL.Audit.BeforeAfterClr.BeforeAfterTrigger].[Delete]
GO
CREATE TRIGGER [dbo].[dbo_Autopayment_ApexSQLAudit_Insert] ON [dbo].[Autopayment]
WITH EXECUTE AS CALLER
FOR INSERT
AS EXTERNAL NAME [ApexSQL.Audit.BeforeAfter.MOBILECRM.dbo.Autopayment.Insert].[ApexSQL.Audit.BeforeAfterClr.BeforeAfterTrigger].[Insert]
GO
CREATE TRIGGER [dbo].[dbo_Autopayment_ApexSQLAudit_Update] ON [dbo].[Autopayment]
WITH EXECUTE AS CALLER
FOR UPDATE
AS EXTERNAL NAME [ApexSQL.Audit.BeforeAfter.MOBILECRM.dbo.Autopayment.Update].[ApexSQL.Audit.BeforeAfterClr.BeforeAfterTrigger].[Update]
GO
WITH EXECUTE AS CALLER
FOR DELETE
AS EXTERNAL NAME [ApexSQL.Audit.BeforeAfter.MOBILECRM.dbo.Autopayment.Delete].[ApexSQL.Audit.BeforeAfterClr.BeforeAfterTrigger].[Delete]
GO
CREATE TRIGGER [dbo].[dbo_Autopayment_ApexSQLAudit_Insert] ON [dbo].[Autopayment]
WITH EXECUTE AS CALLER
FOR INSERT
AS EXTERNAL NAME [ApexSQL.Audit.BeforeAfter.MOBILECRM.dbo.Autopayment.Insert].[ApexSQL.Audit.BeforeAfterClr.BeforeAfterTrigger].[Insert]
GO
CREATE TRIGGER [dbo].[dbo_Autopayment_ApexSQLAudit_Update] ON [dbo].[Autopayment]
WITH EXECUTE AS CALLER
FOR UPDATE
AS EXTERNAL NAME [ApexSQL.Audit.BeforeAfter.MOBILECRM.dbo.Autopayment.Update].[ApexSQL.Audit.BeforeAfterClr.BeforeAfterTrigger].[Update]
GO
Tagged:
Answers
Thanks for reaching out to us regarding this!
Aside from the comparison options to ignore triggers, there is no way to filter out triggers with certain text/characters in the name from the comparison process.
It is however possible to apply filters after the comparison process is complete to stop certain triggers from being deployed:
Dan Jary | Redgate Software
Have you visited our Help Center?
No problem at all. I'm sorry these options won't work in your case.
Dan Jary | Redgate Software
Have you visited our Help Center?