Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    7

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    SELECT * FROM SYSIBMADM.ENV_SYS_INFO

    Please keep in mind that this view is not available in versions before 9.1.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    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?

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Since you are using JDBC you can look into DatabaseMetaData, specifically the methods:

    getDatabaseProductName()
    getDatabaseProductVersion()

    Andy

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •