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 > DB2 Platform/Version details

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-09, 05:49
an_sush an_sush is offline
Registered User
 
Join Date: Mar 2009
Posts: 7
DB2 Platform/Version details

Hi All,

I want to get the underlying DB2 platform details. If i connect using CLP, i get them :
Code:
db2 connect to testdb user testusr using testpwd

   Database Connection Information

 Database server        = DB2/LINUX 9.1.3
 SQL authorization ID   = TESTUSR
 Local database alias   = TESTDB
But, if I connect to the db using JDBC, how can I fetch the details? Is there some system table in DB2 where version/platform are stored (as in oracle)??
Thanks in anticipation
Reply With Quote
  #2 (permalink)  
Old 03-24-09, 07:45
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
SELECT * FROM SYSIBMADM.ENV_SYS_INFO

Please keep in mind that this view is not available in versions before 9.1.
Reply With Quote
  #3 (permalink)  
Old 03-25-09, 04:05
an_sush an_sush is offline
Registered User
 
Join Date: Mar 2009
Posts: 7
Quote:
Originally Posted by n_i
SELECT * FROM SYSIBMADM.ENV_SYS_INFO

Please keep in mind that this view is not available in versions before 9.1.
Any idea for version prior to 9.1? any generic query for all versions os db2?
Reply With Quote
  #4 (permalink)  
Old 03-25-09, 08:52
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Since you are using JDBC you can look into DatabaseMetaData, specifically the methods:

getDatabaseProductName()
getDatabaseProductVersion()

Andy
Reply With Quote
  #5 (permalink)  
Old 03-25-09, 09:06
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
There is also a system table function similar to the view in 9.1 that has the same informaiton.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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