If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Database name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-18-05, 09:25
esanthosh esanthosh is offline
Registered User
 
Join Date: Oct 2005
Posts: 8
Database name

Hi,

I connect to database using connect command from CLP.

db2 connect to db_name

Is there a way i can now find out which database I am connected to ? some variable or command...

Regards,
Santhosh
Reply With Quote
  #2 (permalink)  
Old 10-18-05, 10:06
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Issuing CONNECT without parameters will show you the local alias, while querying the CURRENT SERVER register variable will give you the remote database name.
Reply With Quote
  #3 (permalink)  
Old 10-18-05, 11:44
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
dbname

or db2 get connection state
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #4 (permalink)  
Old 10-19-05, 02:09
gardenman gardenman is offline
Registered User
 
Join Date: Apr 2004
Posts: 54
Try:
values current server
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On