473,320 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

what is a fully qualified table name in DB2 ?

Hi,

Generally we work with the 2 part qualified table names in db2 i.e.
<schema>. <table name>
Is there a more fully qualified table name ? I've seen that a select
from <database name>.<schema>.<tabnamealso works.

This brings me to the next question. Is it possible to refer to a
table in database 2 when connected to database 1 ? If so any
privileges that are required for doing that ?

Jun 20 '07 #1
4 7876
Vivek wrote:
Hi,

Generally we work with the 2 part qualified table names in db2 i.e.
<schema>. <table name>
Is there a more fully qualified table name ? I've seen that a select
from <database name>.<schema>.<tabnamealso works.
Yes, as long as the db name is the db the object resides in or the local
db alias in case of dynamic SQL. This is more syntax toleration than
feature.
This brings me to the next question. Is it possible to refer to a
table in database 2 when connected to database 1 ? If so any
privileges that are required for doing that ?
DB2's approach to federation is through NICKNAMEs. Nicknames are like
ALIASes to remote objects.
You need to set the FEDERATED option in the DBM CFG to ON.
There are numerous introductions to federation on DeveloperWorks.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 20 '07 #2
So i cannot refer to an object in another database (say database2) as

database2.<schema>.<tabname (when connected to database1)

even though database 1 & 2 are in the same instance.

I'd have to use nicknames instead. Is that right ?

Serge Rielau wrote:
Vivek wrote:
Hi,

Generally we work with the 2 part qualified table names in db2 i.e.
<schema>. <table name>
Is there a more fully qualified table name ? I've seen that a select
from <database name>.<schema>.<tabnamealso works.
Yes, as long as the db name is the db the object resides in or the local
db alias in case of dynamic SQL. This is more syntax toleration than
feature.
This brings me to the next question. Is it possible to refer to a
table in database 2 when connected to database 1 ? If so any
privileges that are required for doing that ?
DB2's approach to federation is through NICKNAMEs. Nicknames are like
ALIASes to remote objects.
You need to set the FEDERATED option in the DBM CFG to ON.
There are numerous introductions to federation on DeveloperWorks.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 20 '07 #3
Vivek wrote:
So i cannot refer to an object in another database (say database2) as

database2.<schema>.<tabname (when connected to database1)

even though database 1 & 2 are in the same instance.

I'd have to use nicknames instead. Is that right ?
Yes.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 20 '07 #4
Thanks Serge.

Serge Rielau wrote:
Vivek wrote:
So i cannot refer to an object in another database (say database2) as

database2.<schema>.<tabname (when connected to database1)

even though database 1 & 2 are in the same instance.

I'd have to use nicknames instead. Is that right ?
Yes.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 20 '07 #5

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

Similar topics

0
by: Jim Wallace | last post by:
I'm trying to call a method in a script file given a fully qualified file name, e.g. c:\myscript\test.py. I find that PyImport_Import("test") works fine, with c:\myscript is set as the first item...
1
by: Stefan | last post by:
I'm installing Oracle 9ias Release 2 on Windows 2000 Advanced Server. The installation instructions say to specify a fully qualified host name for the machine. What is the definition of fully...
1
by: php newbie | last post by:
I have a quick question on how to qualify table names as it relates to "dbo" vs. user names. Suppose that I am a user named "dwuser1", and that I need to create a table named "dw_stage_1". Do I...
2
by: Gravy | last post by:
Hi Is there an easy way to decode type names from a config file. For example I have the following element in my config file: <MyElement type = "myassembly, myclass" /> I want to get the...
0
by: Ali | last post by:
Hello, I have written a utility in C# using ODBC.NET. It can fetch information from a ODBC supported database table and copy it to the other ODBC supported DB table; provided the tables exist on...
1
by: Jeff Molby | last post by:
Sorry for the crossposting guys. I figured this one might be a little tricky, so I'm calling upon the C# brains out there to help out this poor VB developer. I know enough C# to translate any code...
3
by: surej | last post by:
hello, please help me how to configure a DNS server in a LAN network using fully qualified domain names.I am using CENTOS distro... redhat configuration will also do.I am having two ISP.should i...
0
by: ajayindelhi | last post by:
Hi, I have two user accounts in the format: <domain>\<alias> and <fully qualified domain name>\<alias>
2
by: winkerbean | last post by:
Given the following: class A { class B { A::B( A::B const & ); }; };
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.