Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

Using Federated Objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mas5@sfu.ca - 16 Feb 2006 10:08 GMT
Hello,

Sorry if my question is elementary. I've searched google, but can't
seem to find exactly what I'm looking for.

My client is using db2 8.2. They have 2 companies and each company has
a different database running under the same instance. I have created a
stored procedure in one database that takes data and inserts it into
the other database. It works perfect when I call the procedure this way
in the CLP "CALL DATACOPY(12345)"...I need some way of automating this
data transfer. I tried putting the call into a trigger to no avail.
When searching google I read that this functionality is a current
limitation of DB2. One post talked about using the words "FEDERATED"
when creating the procedure. However, the db2 release notes say this
functionality was taken out of the docs as it is unsupported. I
couldn't get it to work either. In an ideal world, being able to run
this code from a trigger would solve all my problems. This is my
current declaration for the SP: (Is there something I can magically
include to make this whole system work?)

CREATE PROCEDURE DATACOPY(
 IN ORIGINAL_ID INT
 )
 LANGUAGE SQL
MAIN : BEGIN

I guess my main question is, am I wasting my time...is it just not
possible to in any way trigger events which use federated objects?

Thank you in advance for any suggestions or applicable links.
Serge Rielau - 16 Feb 2006 13:14 GMT
> Hello,
>
[quoted text clipped - 26 lines]
>
> Thank you in advance for any suggestions or applicable links.

Yes, you are wasting your time. The problem is that your trigger
operates on your local database and the procedure operates on the
'remote" database. All this has to be ATOMIC (hence BEGIN ATOMIC .. END
in the trigger body). DB2 UDB V8.2 does not support federated 2 phase
commit.

Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

mas5@sfu.ca - 17 Feb 2006 11:32 GMT
Thank you very much!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.