Author |
Message
|
bindu |
Posted: Wed May 10, 2006 1:59 pm Post subject: WBIMB v5 Database problem ASAP |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi,
i am using WBIMB V5 and oracle. I have one database online and another is for offline. I want to update the offline database to sync with online database with message broker i.e. if any record updated in online database table (it will update with application) then i need to update into offline one (if online Database table updates 10 records then i need to update that 10 into offline database table) . Any suggestions how can i do it this in v5. Thanx in advance.
Thanq You,
bindu |
|
Back to top |
|
 |
sirsi |
Posted: Wed May 10, 2006 2:06 pm Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
if your requirement is to just update the other database you can write database triggers instead of broker doing it... |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 10, 2006 2:12 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If the database is offline, then how can you connect to it from broker?
Maybe you should look at an actual High Availability configuration for your database, rather than trying to write one in broker. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bindu |
Posted: Wed May 10, 2006 2:15 pm Post subject: WBIMB v5 Database problem ASAP |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi Sirsi,
Yes i can use database triggers but the offline database tables are not the same structure with online database tables so i need to map the online database table fileds with offline table so for this i am using broker. Any suggestions how can i do it in V5.
Thanq You,
bindu |
|
Back to top |
|
 |
sirsi |
Posted: Wed May 10, 2006 10:19 pm Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
As jeff wrote:
Quote: |
If the database is offline, then how can you connect to it from broker?
|
??? |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed May 10, 2006 10:23 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi guys,
I think she meant that the online database is the one which is being used in production and offline is something like a bachup which needs to be updated daily or so...
If the tables don't need to be updated as an when an entry is made in the online one, then using timer run broker flows could be a solution....run it at midnight or something.
Regards. |
|
Back to top |
|
 |
bindu |
Posted: Thu May 11, 2006 9:51 am Post subject: WBIMB v5 Database problem ASAP |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi Elvis,
you are right...offline means the backup database and online means the which is being used in production now.
can you suggest me how can i set up timer run broker flows .....If you have any sample code or docs can you please post it here so that i will try. And in also in this case i wont get any input message just needs to get data from online database and update it to offline database. Till now i didnt worked like this scenario and didnt able to find any doc in IBM site for reference. I will appreciate for your help.
Thanq You,
Bindu |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 11, 2006 10:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This is an Extract/Transform/Load problem. As such, Broker may not be the best tool for this. WebSphere Information Integrator, or DataStage TX may be better suited (although DataStage TX runs inside broker...).
You can perhaps configure a database trigger to send a message when an insert/update occurs, with the contents of the update. Then your flow can transform that and do the insert.
But for performance, you may be better off using a lower level database replication solution.
It makes absolutley no sense to me that your backup database would have a substantially different structure than the online database, for any meaning of "backup" that I understand. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bindu |
Posted: Thu May 11, 2006 10:19 am Post subject: WBIMB v5 Database problem ASAP |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi Jeff,
Its not exactly backup database ....We have two versions of applications. One is old one and which uses the Offline database. if the new version had any problem then we need to replace the older version so thats why we are trying to sync with online database now. If we use trigger it wont work because the table structure is different. When come to performance issue i think if we open a thread to online database ( Not continuously) it wont be a problem. Only thing is we have to import the two data base schemas into broker and map them to sync the databases. Let me know if i am wrong....I think timer is the solution for my case but to implement that i didnt find any kind of docs... please suggest me how can i apporach to reach sync.
Thanq You,
Bindu. |
|
Back to top |
|
 |
sirsi |
Posted: Thu May 11, 2006 11:36 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
using the broker for database update is a bad idea. how about using stored procedures?
Regarding using the broker to accomplish this, since you are using v5 , you need to use aggregate nodes ( i dont have much idea on this ) |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 11, 2006 11:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
sirsi wrote: |
using the broker for database update is a bad idea. how about using stored procedures? |
Yes.
srisi wrote: |
since you are using v5 , you need to use aggregate nodes ( i dont have much idea on this ) |
What? Where would aggregation come in?
It sounds like what bindu thinks is a good idea is to have a flow that runs a Mapping node to extract from one database and insert into the other. I think this is a bad idea, but bindu doesn't like any of the other more reasonable solutions - so it's not my problem.
In v5, there is no Timout nodes, so this flow will have to be driven externally. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bindu |
Posted: Thu May 11, 2006 11:58 am Post subject: WBIMB v5 Database problem ASAP |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi Sirsi & Jeff,
Thanx for your quick response ....i am using the stored procedures for doing the identical table updates. I think i can use the HTTP Input node to start my message flow by writing the some script to ping the flow. Then in my flow i can use the mapping to extract and send it to the offline data base. if its also a bad idea then let me know. I think its not a good idea to do this but no choice ...i have to do this with broker. thanx again for you patience. Any suggestions regarding this.
Thanq you,
bindu. |
|
Back to top |
|
 |
sirsi |
Posted: Thu May 11, 2006 1:21 pm Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
Quote: |
I wrote:
since you are using v5 , you need to use aggregate nodes ( i dont have much idea on this )
Jeff:
What? Where would aggregation come in? |
sorry, got confused with aggregate control node... |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu May 11, 2006 8:55 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi guys,
jefflowrey wrote: |
In v5, there is no Timout nodes, so this flow will have to be driven externally. |
You would be amazed with what the w3 offers Only that I cannot share it legally, sorry.
bindu:
HTTP is a far fetched idea, instead if you simply ran a cron job to put a dummy message to the flow, that would be simpler.
Yes the timer nodes don't exist in v5, but no one is stopping you from making a custom one, and the one which i'm seeing now is very simple...but this too I feel will be too much of a burden for you, if your new to Broker or atleast node creation.
And then the tubelight lit
I guess ur production database is being updated by some frontend application like J2EE or Portal...ask those guys to trigger your flow (maybe HTTP) once they have successfully inserted some data into the online database....
Note: Tomorrow if your removing the backup database, you will have to come and stop these calls to the Broker.....for this you could use a simple switch ( something like a property in a properties file which will indicate whether to call or not to call the broker)
Regards. |
|
Back to top |
|
 |
bindu |
Posted: Thu May 11, 2006 9:22 pm Post subject: WBIMB v5 Database problem ASAP |
|
|
Voyager
Joined: 07 May 2004 Posts: 97
|
Hi Elvis,
Thanq you very much....Yes by using cron i can put a dummy message into input queue at every two hours to activate my flow. If they want to remove backup database in future then i will remove cron ....Let me try this....if i have time i will try to create a custom node ...Thanq You..
Thanq You,
Bindu. |
|
Back to top |
|
 |
|