Author |
Message
|
sachinramesh |
Posted: Fri May 23, 2008 12:31 am Post subject: How do i acsess both databases in one compute node In MB5.0 |
|
|
 Disciple
Joined: 20 Feb 2007 Posts: 170
|
Hi
I am Working on MB5.0 on windows
I have a flow which contains Two compute nodes
in the first compute node i am inserting the data into database "CUDB"
in the second compute node i am inserting the data into database "GODB"
Now my flow is first inserting all the data into CUDB and then inserting into GODB.
But i want the data to be inserted simultaneously in both the databases
like first insert one record in CUDB and GODB and then go for the second record.
How can i do this in MB 5.0..
can i write the acess both the database in one compute in MB5.0
I tried with Propagate statement it is inserting one record in CUDB then going to next compute.But For the second Record it is not coming back to the first compute.
What can i do to insert data into both db's simultaneously.. |
|
Back to top |
|
 |
AkankshA |
Posted: Fri May 23, 2008 1:15 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
You can do this in v6 and higher versions.... not in V5 _________________ Cheers |
|
Back to top |
|
 |
sachinramesh |
Posted: Fri May 23, 2008 1:30 am Post subject: |
|
|
 Disciple
Joined: 20 Feb 2007 Posts: 170
|
AkankshA wrote: |
You can do this in v6 and higher versions.... not in V5 |
Ya you are correct...But upgrading the Software in my case is not possible now.So please tell me if there are any other alternatives. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 23, 2008 1:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sachinramesh wrote: |
So please tell me if there are any other alternatives. |
The obvious one would be to do all the database work in both compute nodes in a single transaction. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AkankshA |
Posted: Fri May 23, 2008 1:36 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
can u tell us why such a reqt...
is it that u r taking care of database failure or something... if so then u hv transactionality feature of MB for ur help...
AFAIK.... by no means you can access the data in 2 DB's in one compute node... _________________ Cheers |
|
Back to top |
|
 |
sachinramesh |
Posted: Fri May 23, 2008 1:57 am Post subject: |
|
|
 Disciple
Joined: 20 Feb 2007 Posts: 170
|
AkankshA wrote: |
can u tell us why such a reqt...
is it that u r taking care of database failure or something... if so then u hv transactionality feature of MB for ur help...
AFAIK.... by no means you can access the data in 2 DB's in one compute node... |
The clilent has two databases and the data should be inserted into both the databases.But the problem is when we are trying to insert into the data into database yesterday the flow went without errors but found some records are inserted in the cudb but in GODB no records were inserted .
Later we got confirmation from the admins that the godb database was down.
So the data was present in cudb but not godb.
so i wanted to insert the records in simultaneously in both the database.
In my case the Transaction Property of the compute node is set to aoutamatic |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 23, 2008 1:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sachinramesh wrote: |
In my case the Transaction Property of the compute node is set to aoutamatic |
Then you need to review if the automatic setting is providing the transactionality you need (from the description of your problem I'd theorise it's not) and either change this setting or (my preferred option) review the transactionality of the flow as I suspect just changing the compute nodes won't give you entirely the results you want or expect. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sachinramesh |
Posted: Fri May 23, 2008 2:36 am Post subject: |
|
|
 Disciple
Joined: 20 Feb 2007 Posts: 170
|
Vitor wrote: |
sachinramesh wrote: |
In my case the Transaction Property of the compute node is set to aoutamatic |
Then you need to review if the automatic setting is providing the transactionality you need (from the description of your problem I'd theorise it's not) and either change this setting or (my preferred option) review the transactionality of the flow as I suspect just changing the compute nodes won't give you entirely the results you want or expect. |
In my case the transactionality is working fine.
I changed my code in the second database t throw some error .now after running the flow i found that the data is not inserted in either of the database.
This is what i wanted ,but it happened the other way yesterday
Anyway Thanks for ur inputs.... |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 23, 2008 2:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sachinramesh wrote: |
In my case the transactionality is working fine.
I changed my code in the second database t throw some error .now after running the flow i found that the data is not inserted in either of the database.
This is what i wanted ,but it happened the other way yesterday
|
I'm slightly alarmed that the original version of the code didn't throw an error when the database was down!
Still, if it meets your requirements now then yay you  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
p.cradwick |
Posted: Fri May 23, 2008 5:38 pm Post subject: |
|
|
Acolyte
Joined: 16 May 2001 Posts: 56
|
I have done this by using a Java class to access the second database using jdbc. Just call a function of this class from the compute node and put parameters and results in the Environment.
Peter |
|
Back to top |
|
 |
|