Transactions
si_he
Posts: 25
You have the option to omit the use of transactions in the SQL script via the "Synchronisation behavior" options tab in the gui.
How do you do this using the API?
I can output the SQL statements required but I don't want them executed as part of a transaction.
Many thanks
How do you do this using the API?
I can output the SQL statements required but I don't want them executed as part of a transaction.
Many thanks
Comments
Wherever an 'Options' enumeration is used, specify the NoSQLPlumbing option as part of the enumeration.
Dim provider As New SqlProvider
Dim block As ExecutionBlock = provider.GetMigrationSQL(session, True)
Console.WriteLine("Migration SQL:")
Console.WriteLine(block.GetString())
Where should the NoSQLPlumbing come into this?
Sorry for my ignorance
First create an EngineDataCompareOptions object.
Set its SqlOptions property to some combination of the options on http://help.red-gate.com/help/SQLDataCo ... tions.html not including the UseTransactions option. (Unfortunately as the default set of options contains this option you'll have to set the other options manually rather than just choosing the defaults.) You can link options together with a | to choose several options.
Then you can set the Options property of the SqlProvider object to the newly created EngineDataCompareOptions object.
You should do this before calling getMigrationSQL.
Does that help or should I put together a code example?
Redgate Software
Thanks
Dim o As New EngineDataCompareOptions
Dim provider As New SqlProvider
provider.Options.SqlOptions = SqlOptions.None
Dim block As ExecutionBlock = provider.GetMigrationSQL(session, True)
Console.WriteLine("Migration SQL:")
Console.WriteLine(block.GetString())
Thanks