How to avoid saving replication triggers to folder?
OJ
Posts: 3
I'm trying to use the Compare SDK to save my database objects to a disk folder. However I do not want replication triggers included. Have tried with Options.IgnoreReplicationTriggers (see below) but it does not seem have any effect.
Is this possible at all??
Is this possible at all??
using System; using System.Collections.Generic; using System.Linq; using System.Text; using RedGate.SQLCompare.Engine; using RedGate.SQLCompare.Engine.ReadFromFolder; namespace SourceGrabber { class Program { static void Main(string[] args) { RedGate.SQLCompare.Engine.Database db; using (db = new Database()) { db.Register(new ConnectionProperties(@"TheServer", "TheDatabase"), Options.Default | Options.IgnoreReplicationTriggers); db.SaveToFolder(@"TheDiskFolder", new WriteToFileOptions()); } } } }
Comments
It looks like you have to compare the database to the script folder and then merge the changes in order to skip the replication trigger. Loading the database and saving it to disk doesn't seem to respect options.
However I concider it a defect, that the Register method does not respect the Options passed in.