DisableAndReenableDMLTriggers not found in SDK

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

DisableAndReenableDMLTriggers not found in SDK

Postby aufder » Thu Jul 08, 2010 4:09 pm

Hi.
The command line for SQLDataCompare.exe has an Options option that allows DisableAndReenableDMLTriggers which emits SQL for Disabling and Enabling DML triggers. However the DisableAndReenableDMLTriggers value is not found in any of the options enums in the SDK 8. I'm trying to reproduce behavior via the SDK and get similar output as the command line app, but the SDK code doesn't produce Disable/Enable statements for DML triggers. Is there a way to do this via the SDK?

I have SQL Data Compare 8.1.0.4, and the version of the RedGate.SQLDataCompare.Engine.dll in SDK8 folder is 7.1.0.230 (which seems odd to be 7...)

Thanks
aufder
 
Posts: 2
Joined: Thu Jul 08, 2010 3:55 pm

Postby Brian Donahue » Fri Jul 09, 2010 5:47 pm

Hi Alan,

Just to clarify, the comparison SDK is still shipping with SQL Data Compare v7 components because the product is versioned after the SQL Compare components, which were at version 8 at the time. If you require the latest components, there is an untested beta available (cumulative patch) for you to use.

Anyway, to get the DML triggers disabled in the migration SQL, you may add "DisableTriggers" setting to the SqlOptions you're using. For example:
Code: Select all
                provider.Options = new EngineDataCompareOptions(
                    MappingOptions.Default,
                    ComparisonOptions.TrimTrailingSpaces | ComparisonOptions.Default,
                    SqlOptions.Default | SqlOptions.DisableTriggers);
Please feel free to let us know if this works for you.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby aufder » Fri Jul 09, 2010 6:04 pm

Hi,
Just disabling isn't enough. We'd want the generated script to re-enable afterward.
In the end it's no rush, since the first table we're supporting with this isn't critical to have the DML triggers disabled. But in the future we'd look forward to having the SDK supporting disable/enable.

Thanks for the quick reply.
aufder
 
Posts: 2
Joined: Thu Jul 08, 2010 3:55 pm

Postby Brian Donahue » Mon Jul 12, 2010 5:08 pm

Hi Alan,

The option is meant to script a drop and recreate of the triggers.

Maybe you have found a bug and you could try using the latest patch to the SDK?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests