RedGate.Shared.SQL.ExecutionBlock

Automate and integrate using the SQL comparison API

RedGate.Shared.SQL.ExecutionBlock

Postby aperregatturv » Mon Feb 07, 2011 7:55 pm

I am having problem with ExecuteBlock of RedGate.Shared.SQL.ExecutionBlock. The problem is, i am trying to update a database using a snapshot but the database is close to 10GB size and its timing out. is there a way to add timeout so it doesn't timeout.

here' code i am trying
Work wrk = new Work();
wrk.BuildFromDifferences(diffs, Options.Default, true);
ExecutionBlock block = wrk.ExecutionBlock;
BlockExecutor b = new BlockExecutor();
if (NTAUTHENTICATE)
{ b.ExecuteBlock(block, DBSERVER, DBNAME, true, "", ""); }
else
{ b.ExecuteBlock(block, DBSERVER, DBNAME, false, USERID, PASSWORD); }
block.Dispose();

Thanks
Arun
aperregatturv
 
Posts: 48
Joined: Wed Aug 31, 2005 3:11 pm
Location: New York

Postby Chris Auckland » Tue Feb 08, 2011 9:04 pm

Thanks for your post.

I believe you can add a connection timeout value (in seconds) to the connection string. i.e.

Code: Select all
if (NTAUTHENTICATE)
{ b.ExecuteBlock(block, DBSERVER +";connection timeout=300", DBNAME, true, "", ""); }
else
{ b.ExecuteBlock(block, DBSERVER+";connection timeout=300", DBNAME, false, USERID, PASSWORD); }
block.Dispose();


I hope this helps.
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Postby aperregatturv » Tue Feb 08, 2011 9:07 pm

Thank you. I will give it a try.
aperregatturv
 
Posts: 48
Joined: Wed Aug 31, 2005 3:11 pm
Location: New York


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests