473,756 Members | 4,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

federated database

Hi All,

I have a issue in federated database.

I will explain the scenario
I have a table T1 in database called offlinedb. It has one column F1
I have an another table T2 in database uatdb.
I added attached table T1 in offlinedb using Federated Objects.
Then i created a procedure P1 in uatdb database with the following
contents.
CREATE PROCEDURE P1
dynamic result sets 1
language sql
MODIFIES SQL DATA
BEGIN
for i as select f1 from t2
do
insert into t2 values ( i.f1 ) ; update administrator.t
set f1 = f1 - 1 ;
end for ;
END

If i execute the procedure P1, i am getting the following error.
Error: DB2 SQL error: SQLCODE: -30090, SQLSTATE: 25000, SQLERRMC: 18

Please give some suggestions to rectify this issue. We need to
incorporate this logic in our production server.

Regards,
Balasubramanian R

Nov 12 '05 #1
2 4865

<vr****@gmail.c om> wrote in message
news:11******** *************@l 41g2000cwc.goog legroups.com...
Hi All,

I have a issue in federated database.

I will explain the scenario
I have a table T1 in database called offlinedb. It has one column F1
I have an another table T2 in database uatdb.
I added attached table T1 in offlinedb using Federated Objects.
Then i created a procedure P1 in uatdb database with the following
contents.
CREATE PROCEDURE P1
dynamic result sets 1
language sql
MODIFIES SQL DATA
BEGIN
for i as select f1 from t2
do
insert into t2 values ( i.f1 ) ; update administrator.t
set f1 = f1 - 1 ;
end for ;
END

If i execute the procedure P1, i am getting the following error.
Error: DB2 SQL error: SQLCODE: -30090, SQLSTATE: 25000, SQLERRMC: 18

Please give some suggestions to rectify this issue. We need to
incorporate this logic in our production server.

How about looking up this error in the Messages Reference manual? The cause
of the error and the solution is described there.

Rhino
Nov 12 '05 #2
I assue you read the manual and saw that reason 18 is a 2PC issue.
From the manual section on coordination of 2PC
Both the native SQL and TP monitor multisite update programs must be
precompiled with the CONNECT 2 SYNCPOINT TWOPHASE options. Both can
use the SQL Connect statement to indicate which database they want to
be used for the SQL statements that follow. If there is no TP monitor
to tell DB2 it is going to coordinate the transaction (as indicated by
DB2 receiving the xa_open calls from the TP monitor to establish a
database connection), then the DB2 software will be used to coordinate
the transaction.

You have to configure 2PC. Federated may not do the correct type of
connect for you. I did not check that part of the manual in detail. Connect
String might work, or there could be some other options to tweak. From
the section I snipped above, doing a second connect to the db directly
should work. Then you get into stored procedures and connect statements.

V > Hi All,

V > I have a issue in federated database.

V > I will explain the scenario
V > I have a table T1 in database called offlinedb. It has one column F1
V > I have an another table T2 in database uatdb.
V > I added attached table T1 in offlinedb using Federated Objects.
V > Then i created a procedure P1 in uatdb database with the following
V > contents.
V > CREATE PROCEDURE P1
V > dynamic result sets 1
V > language sql
V > MODIFIES SQL DATA
V > BEGIN
V > for i as select f1 from t2
V > do
V > insert into t2 values ( i.f1 ) ; update administrator.t
V > set f1 = f1 - 1 ;
V > end for ;
V > END

V > If i execute the procedure P1, i am getting the following error.
V > Error: DB2 SQL error: SQLCODE: -30090, SQLSTATE: 25000, SQLERRMC: 18

V > Please give some suggestions to rectify this issue. We need to
V > incorporate this logic in our production server.

V > Regards,
V > Balasubramanian R

Edward Lipson via Relaynet.org Moondog
ed***********@m oondog.com el*****@bankofn y.com
---
þ MM 1.1 #0361 þ
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Nov 12 '05 #3

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

Similar topics

0
1491
by: stevenkblack | last post by:
I have a server W2k running DB2 8.1.6. We have two databases one DBDC that holds our user base and QUALITY with all our application data. I have about 8 tables federated on QUALITY looking at the table on DBDC. The traffic should be minimal the call to the remote tables is just for user log in. It appears that the db2syscs.exe process grows quite a bit 1,518,538 K. There is some issue with the connection to the federated tables. below...
1
1948
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
3724
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
3343
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
2
1927
by: mas5 | last post by:
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...
4
3455
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
4
4619
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
1
2702
by: TheAndroid | last post by:
All, I'm having a difficult time trying to implement two-phase commits across federated database members in UDB 8.3. I've tried using MQ (v 6.0) as the transaction manager and UDB tells me that having a 64bit transaction manager and a 32bit database is not valid. I updated my testing database to 64 bit but my 32 bit COBOL applications no longer built correctly. I have created an "in-process" XA transaction coordinator which correctly...
0
9487
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
9297
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
10069
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
9904
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
5168
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...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
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.