| Author |
Message |
aperregatturv
Joined: 31 Aug 2005 Posts: 48 Location: New York
|
Posted: Mon Feb 07, 2011 7:55 pm Post subject: RedGate.Shared.SQL.ExecutionBlock |
|
|
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 |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 715 Location: Red Gate Software Ltd.
|
Posted: Tue Feb 08, 2011 9:04 pm Post subject: |
|
|
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 |
|
 |
aperregatturv
Joined: 31 Aug 2005 Posts: 48 Location: New York
|
Posted: Tue Feb 08, 2011 9:07 pm Post subject: |
|
|
| Thank you. I will give it a try. |
|
| Back to top |
|
 |
|
|
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