473,473 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Federated Server

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
WRAPPER DRDA
AUTHORIZATION "SAM_USER" PASSWORD "SAM_PWD"
OPTIONS
(NODE 'TEST1'
,DBNAME 'TEST1'
);
It says
SQL0204N "DRDA" is an undefined name. SQLSTATE=42704
Do I need to buy something extra for this?
Please advise.

Praveen

Jul 27 '06 #1
4 3417
Praveen_db2 wrote:
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
WRAPPER DRDA
AUTHORIZATION "SAM_USER" PASSWORD "SAM_PWD"
OPTIONS
(NODE 'TEST1'
,DBNAME 'TEST1'
);
It says
SQL0204N "DRDA" is an undefined name. SQLSTATE=42704
Do I need to buy something extra for this?
Please advise.
You have to perform the following steps:

(1) Register a wrapper.
A wrapper is nothing else than a library that implements the glue code
between the DB2 engine and the remote data source. In your case, the
remote data source happens to be the same machine/DB2 instance.
DB2 comes with wrappers for all DB2 and Informix data sources. I'll
have to purchase WebSphere Information Integrator for other systems.
(2) Register a server.
A server identifies a remote data source. This is a single database in
DB2 terminology. In your case, we're talking about 'DB_1' (or 'TEST1').
(3) Register a user mapping.
The user connected to the federated server (where you want to create
the nickname) may not be allowed to access the remote data source.
Thus, you have to define the credentials that shall be used when
accessing the data source. (And those credentials are specific for each
user connecting the federated server.)
(4) Register a nickname.
A nickname is just a pointer referring to a table at the remote data
source.

Here is an example that should work for you, assuming that RMT_DB is the
name of the remote database:

CREATE WRAPPER drda;

CREATE SERVER srv
TYPE DB2/UDB
VERSION '8'
WRAPPER drda
AUTHORIZATION "stolze" PASSWORD "passwd"
OPTIONS (DBNAME 'rmt_db');

CREATE USER MAPPING FOR USER SERVER srv
OPTIONS ( REMOTE_AUTHID 'stolze', REMOTE_PASSWORD 'passwd' );

CREATE NICKNAME n FOR srv.syscat.views;

SELECT * FROM n;

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jul 27 '06 #2
Thanx a ton Knut

Jul 28 '06 #3
Plus you should set the FEDERATED database manager parameter to YES.
(May be that was to obvious, but I didn't see it in the previous post.

Regards,
Max Cortez

Knut Stolze wrote:
Praveen_db2 wrote:
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
WRAPPER DRDA
AUTHORIZATION "SAM_USER" PASSWORD "SAM_PWD"
OPTIONS
(NODE 'TEST1'
,DBNAME 'TEST1'
);
It says
SQL0204N "DRDA" is an undefined name. SQLSTATE=42704
Do I need to buy something extra for this?
Please advise.

You have to perform the following steps:

(1) Register a wrapper.
A wrapper is nothing else than a library that implements the glue code
between the DB2 engine and the remote data source. In your case, the
remote data source happens to be the same machine/DB2 instance.
DB2 comes with wrappers for all DB2 and Informix data sources. I'll
have to purchase WebSphere Information Integrator for other systems.
(2) Register a server.
A server identifies a remote data source. This is a single database in
DB2 terminology. In your case, we're talking about 'DB_1' (or 'TEST1').
(3) Register a user mapping.
The user connected to the federated server (where you want to create
the nickname) may not be allowed to access the remote data source.
Thus, you have to define the credentials that shall be used when
accessing the data source. (And those credentials are specific for each
user connecting the federated server.)
(4) Register a nickname.
A nickname is just a pointer referring to a table at the remote data
source.

Here is an example that should work for you, assuming that RMT_DB is the
name of the remote database:

CREATE WRAPPER drda;

CREATE SERVER srv
TYPE DB2/UDB
VERSION '8'
WRAPPER drda
AUTHORIZATION "stolze" PASSWORD "passwd"
OPTIONS (DBNAME 'rmt_db');

CREATE USER MAPPING FOR USER SERVER srv
OPTIONS ( REMOTE_AUTHID 'stolze', REMOTE_PASSWORD 'passwd' );

CREATE NICKNAME n FOR srv.syscat.views;

SELECT * FROM n;

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jul 28 '06 #4
The Maxx wrote:
Plus you should set the FEDERATED database manager parameter to YES.
(May be that was to obvious, but I didn't see it in the previous post.)
You're right! I always forget that until I hit the respective error message
the first time. ;-)

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jul 28 '06 #5

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

Similar topics

1
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...
4
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...
5
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...
5
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...
1
by: terryintransit | last post by:
Problem: ======== I'm receiving SQL1101N when I sttempt to build a nickname in a federated database. Config ====== Server: AIX Version 5.2 DB2: 8.2.1
2
by: Tim V. | last post by:
Here's the layout: AIX v5.2, DB2 v8 fp8 running in 64bit I've got a Multi-partitioned db running on lpar4 and I want to connect it to 2 instances running on lpar13. We'll deal with just 1...
9
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 : ...
4
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
3
by: FM | last post by:
Hello there: We want to replicate onto the same server (Capture / Apply) tables into federated DB2 - Tables but we are not able to do it... I've tried it with Replication Center but don't see...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.