Red Gate forums :: View topic - DisableAndReenableDMLTriggers not found in SDK
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

DisableAndReenableDMLTriggers not found in SDK

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
aufder



Joined: 08 Jul 2010
Posts: 2

PostPosted: Thu Jul 08, 2010 4:09 pm    Post subject: DisableAndReenableDMLTriggers not found in SDK Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6644

PostPosted: Fri Jul 09, 2010 5:47 pm    Post subject: Reply with quote

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:
                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.
Back to top
View user's profile Send private message
aufder



Joined: 08 Jul 2010
Posts: 2

PostPosted: Fri Jul 09, 2010 6:04 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6644

PostPosted: Mon Jul 12, 2010 5:08 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group