Author |
Message
|
prat31 |
Posted: Fri Feb 01, 2013 5:26 am Post subject: Connection to DB from Compute node |
|
|
Apprentice
Joined: 01 Feb 2013 Posts: 30
|
In the compute node I have mentioned the DB name and using this the connection from the compute node to the database is done. Also the table names and schema names are used as UDPs.
Inside the compute node I am querying(Select) to a table in database and storing the selected values in Environment variables.
After this this Environment variable is used in the While loop all the selected records are processed.
In this processing it takes about 5 mins.
So in this 5 mins. interval will the connection established to the table for selecting the records be still active and will it lock the table/records??
This is because, the records which I am querying, if I try to update them from some other flow it is giving me timeout exception in the second flow. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Feb 01, 2013 5:28 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
prat31 |
Posted: Fri Feb 01, 2013 5:34 am Post subject: |
|
|
Apprentice
Joined: 01 Feb 2013 Posts: 30
|
Thanks for the reply..
But the input node is the timer node and in Transaction property of Compute node it is Automatic. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Feb 01, 2013 5:41 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Ok, thats fine. Commit your database updates row-by-row so that other processes wanting to use those resources can use them while your updating. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
prat31 |
Posted: Fri Feb 01, 2013 5:46 am Post subject: |
|
|
Apprentice
Joined: 01 Feb 2013 Posts: 30
|
In the first flow I am not inserting/updating/deleting...
If I use two compute nodes and from the first one I establish the connection and in the second compute node if I apply the logic will the problem be resolved?
And I wanted to know the reason for the timeout??
Is the reason that the compute node holds the table/record till the time it is active, even thought the records are only selected from the compute node?? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 01, 2013 5:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Broker will maintain any connections used in a flow instance until that flow instance has stopped.
If you are only doing selects in the compute, you should explicitly disable the transaction on the compute.
Your database may have row level locking or table level locking in place, even for SELECTs, even if you don't use a transaction on the compute node. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Feb 01, 2013 5:52 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
prat31 |
Posted: Fri Feb 01, 2013 6:24 am Post subject: |
|
|
Apprentice
Joined: 01 Feb 2013 Posts: 30
|
Thanks all for your reply.
I wanted to know more about the "disable of the transaction on the compute node". And How we enable it and what will it do. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 01, 2013 6:28 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
prat31 wrote: |
Thanks all for your reply.
I wanted to know more about the "disable of the transaction on the compute node". And How we enable it and what will it do. |
You have already indicated that you know how to tell the compute node to use whatever transaction is available. |
|
Back to top |
|
 |
|