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