WalterR wrote:
I had already found this -- and tried it. But, since all of the (four)
databases run on the same server, it is not distinctive.
You are incorrect - here is a simple example from my machine which conveniently
has also 4 databases:
D:\Working>db2 list db directory
System Database Directory
Number of entries in the directory = 4
Database 1 entry:
Database alias = TBC_MD
Database name = TBC_MD
Database drive = D:\DB2
....
Database 2 entry:
Database alias = DWCTBC
Database name = DWCTBC
Database drive = D:\DB2
....
Database 3 entry:
Database alias = DWCTRLDB
Database name = DWCTRLDB
Database drive = D:\DB2
....
Database 4 entry:
Database alias = SAMPLE
Database name = SAMPLE
Database drive = D:\DB2
D:\Working>db2 connect to sample
Database Connection Information
Database server = DB2/NT 8.2.3
SQL authorization ID = DB2ADMIN
Local database alias = SAMPLE
D:\Working>db2 values current server
1
------------------
SAMPLE
1 record(s) selected.
D:\Working>db2 connect to dwctrldb
Database Connection Information
Database server = DB2/NT 8.2.3
SQL authorization ID = DB2ADMIN
Local database alias = DWCTRLDB
D:\Working>db2 values current server
1
------------------
DWCTRLDB
1 record(s) selected.
As you can see - it is quite distinctive. CURRENT SERVER special register
returns name of the application server (database) to which application is
connected.
See online documentation available at:
http://publib.boulder.ibm.com/infoce...help/index.jsp
Jan M. Nelken