473,695 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
+ 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 3449
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.view s;

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.view s;

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
1945
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
3714
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
3335
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
1
2080
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
5253
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 instance on lpar13 for now. lpar4 -> db name dwdb lpar13 -> db name IBMEDGE On lpar13, I have a userid that has DBADMIN authority.
9
5742
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
4614
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
1663
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 the way to do it. Could someone give me a hint or tip to do it? Thank ypou very much in advance.
0
8630
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
9115
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
8982
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...
1
8845
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8825
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
5839
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3003
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
3
1976
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.