Ignoring Triggers
I am trying to get readyroll to ignore some Triggers. I followed the advice from this thread viewtopic.php?f=199&t=79386
Looking in the .sqlproj, I can see the section in question:
I can see that it includes a regular expression for Trigger. So, I set my project setting to
In the end, I am looking for the option "Ignore DML triggers" in SQL Compare, which works exactly as expected.
Any help at all will be appreciated.
Looking in the .sqlproj, I can see the section in question:
<ExcludeObjectsFromImport> Assembly=[myschemaname]; Credential=[mycredential]; DatabaseDdlTrigger=[ddltriggername]; Default=[dbautil].[(.*?)]; PartitionFunction=[mypartitionfunction]; PartitionScheme=[mypartitionfunction]; Role=[myrole]; Rule=[dbautil].[(.*?)]; Schema=[dbautil]; Sequence=[dbautil].[(.*?)]; StoredProcedure=[dbautil].[(.*?)]; Synonym=[dbautil].[(.*?)]; Table=[dbautil].[(.*?)]; [b] Trigger=[dbautil].[(.*?)];[/b] User=[myusername]; UserDefinedDataType=[dbautil].[(.*?)]; UserDefinedFunction=[dbautil].[(.*?)]; View=[dbautil].[(.*?)]; XmlSchemaCollection=[dbautil].[(.*?)]; Contract=[myservicebrokercontract]; EventNotification=[myservicebrokereventnotification]; MessageType=[myservicebrokermessagetype]; Queue=[myservicebrokerqueue]; RemoteServiceBinding=[myservicebrokerremotebinding]; Route=[myservicebrokerroute]; Service=[myservicebrokerservice]; </ExcludeObjectsFromImport>
I can see that it includes a regular expression for Trigger. So, I set my project setting to
<ExcludeObjectsFromImport> Trigger=(.*?); Synonym=(.*?); </ExcludeObjectsFromImport>I also tried
<ExcludeObjectsFromImport> Trigger=[dbo].[(.*?)]; Synonym=(.*?); </ExcludeObjectsFromImport>Synonyms are correctly excluded, but my triggers are still being included. I need to handle the trigger separately because it updates a foreign database via synonym and at initial install that database does not exist yet. I cannot install the foreign database first because it too has references back to this database.... (Don't ask why, I just inherited this mess and need to get the installers working).
In the end, I am looking for the option "Ignore DML triggers" in SQL Compare, which works exactly as expected.
Any help at all will be appreciated.
Tagged:
Comments
As you've suggested, there is an "ignore DML triggers" option available within SQL Compare. Unfortunately this is not currently available through the .sqlproj file settings, however I will raise this with the team as a high priority and will get back to you shortly.
Product Manager
Redgate Software
http://download.ready-roll.com/ReadyRoll.SQLServer.1.13.12.1537.exe
You can now exclude all DML triggers from your ReadyRoll project by including the following SQL Compare option within your .sqlproj file: It would be great to hear if this resolves the issue for you. This fix should be generally available in the next week or so.
Product Manager
Redgate Software
http://www.red-gate.com/dynamic/product ... l/download
Thanks for bringing this issue to our attention!
Product Manager
Redgate Software
Any chance you can introduce DmlTrigger section in ExcludeObjectsFromImport?
https://readyroll.uservoice.com/forums/204125-readyroll-product-feedback/suggestions/19598578-script-dml-triggers-separately-to-the-parent-table
Product Manager
Redgate Software