473,623 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Federated Objects

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.

Feb 16 '06 #1
2 1924
ma**@sfu.ca wrote:
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.

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
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 16 '06 #2
Thank you very much!

Feb 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2909
by: stabbert | last post by:
I am attempting to join two tables together on two different unix servers. Here is some relevant info about the tables. TABLE 1 Setup ----------------------- DB2 UDB 7.2 EE
1
1990
by: RdR | last post by:
Hi, I have a table in SQL Server with no keys, I point this as a federated table in DB2 but in DB2 I have defined keys against this federated table in SQL. Where will the key constraints be followed in DB2 or in SQL? How should a select statement in DB2 for this federated table behave if there are duplicates in SQL? The result I am getting is it is showing an actual duplicate in DB2 for this federated table. Is there any setting in DB2...
1
1943
by: Terry | last post by:
Problem: ========= Unknown column appearing in federated tables. Description: ============ Local database (L) is an established 'federated' database, extracting values from multiple remote databases. Database server = DB2/LINUX 7.1.0
4
606
by: uthuras | last post by:
Greetings all, Is it possible to have federated db feature implemented among DB2 family? I intend to create federated within DB2 databases. I have 2 databases TestA and TestB. I have some base tables in TestA database and the reference tables in TestB database. Now i want to select data from TestB database referencing base table in TestA database. One of the way would be Federated Database. I've seen some red books on setting up...
5
3711
by: Alias | last post by:
Hi Guys , I am trying to create a federated database link between 2 UDB 8.1 databases running on AIX on the same box but under different instances. When i tried this thru the control centre , I got this error : ***************************************************** SQL1013N The database alias name or database name "SAMPLE" could not be found. SQLSTATE=42705 *****************************************************
5
3330
by: Klemens | last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and an update in a local table in one transaction Do I have to change some settings to get done or ist this not possible by definition? Thanks Klemens
4
3445
by: Praveen_db2 | last post by:
Hi All DB2 8.1.3,Windows I have 2 databases in a single instance, say DB_1 and DB_2.I need to query a table from DB_1 in DB_2.I am try to use a nickname for it.But nickname creation is not possible until federated server is made.Please tell me how to create a federated server.Moreover, is there any thing extra which I need to buy for this?When I gave this command to create a server CREATE SERVER "TEST1" TYPE DB2/UDB VERSION 8.1
9
5740
by: mitek | last post by:
Hi, All. Is federated procedures between DB2 databases currently not supported in WebSphere Federation Server 9.1 ??? I recieve next error when trying to create DB2 federated procedure : SQL30090N Operation invalid for application execution environment. Reason code = "21". LINE NUMBER=1.
4
4609
by: esmith2112 | last post by:
I have a query running on a federated database that takes the form select col1, col2 from nickname1 where <conditions exist> union all select col1,col2 from nickname2
0
8227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8165
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8670
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8613
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8469
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4074
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1778
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.