![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
LUW 9.5, this may sound as a silly request, but has to do with refresh of directory cache and workspaces in RAD. Is there a function that returns the name of database that I'm connected to? Example: Server catalog db X as E Client catalog tcpip node A remote B server C remote_instance D catalog db E at node A as F connect to E user ... using ... values <current_db_function() should return X In the manner it would be nice to get the hostname of the server where X resides. /Lennart |
#3
| |||
| |||
|
|
db2 "values current server" should do the trick |
#4
| |||
| |||
|
|
LUW 9.5, this may sound as a silly request, but has to do with refresh of directory cache and workspaces in RAD. Is there a function that returns the name of database that I'm connected to? Example: Server catalog db X as E Client catalog tcpip node A remote B server C remote_instance D catalog db E at node A as F connect to E user ... using ... values <current_db_function() should return X In the manner it would be nice to get the hostname of the server where X resides. /Lennart |
#5
| |||
| |||
|
|
db2 get connection state Database Connection State Connection state = Connectable and Connected Connection mode = SHARE Local database alias = MYDB Database name = MYDB Hostname = Service name = |
#6
| |||
| |||
|
|
Or this, no? db2 get connection state * *Database Connection State *Connection state * * * = Connectable and Connected *Connection mode * * * *= SHARE *Local database alias * = MYDB *Database name * * * * *= MYDB *Hostname * * * * * * * = *Service name * * * * * = |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |