Multiple sp_settriggerorder calls

Tim01Tim01 Posts: 1 New member
I am using SQL Compare to save the schema of a database to scripts saved to a folder.  One annoying thing is that the Create Table scripts sometimes repeat the trigger order call.  Here is an example:
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null
GO
EXEC sp_settriggerorder N'[dbo].[tblJob_Audit_Delete]', 'last', 'delete', null

The script works.  But it also keeps growing and is annoying because every time it grows it shows up in our source code change tracking as a change when nothing really changed.

Here is my command line call:
SQLCompare.exe /Server1:SQL03.silverstar.local /Database1:ERP3 /Scripts2:"D:\Source\ERP3\Db Scripts" /exclude:Role /exclude:User /Include:Identical /Synchronize /options:DecryptPost2KEncryptedObjects,IgnoreFillFactor,IgnoreWhiteSpace,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName
Tagged:

Answers

Sign In or Register to comment.