Red Gate forums :: View topic - RedGate.Shared.SQL.ExecutionBlock
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

RedGate.Shared.SQL.ExecutionBlock

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



Joined: 31 Aug 2005
Posts: 48
Location: New York

PostPosted: Mon Feb 07, 2011 7:55 pm    Post subject: RedGate.Shared.SQL.ExecutionBlock Reply with quote

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



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Tue Feb 08, 2011 9:04 pm    Post subject: Reply with quote

Thanks for your post.

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

Code:
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
Back to top
View user's profile Send private message Send e-mail
aperregatturv



Joined: 31 Aug 2005
Posts: 48
Location: New York

PostPosted: Tue Feb 08, 2011 9:07 pm    Post subject: Reply with quote

Thank you. I will give it a try.
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