Multiple sp_settriggerorder calls
Tim01
Posts: 1 New member
in SQL Compare
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
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
As discussed by email, we've filed a JIRA for this issue and will also keep here updated!
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Tianjiao Li | Redgate Software
Have you visited our Help Center?