What's the best way to determine which version of Oracle client I'm running?

前端 未结 14 1912
遥遥无期
遥遥无期 2020-12-12 23:46

The subject says it all: What is the best way to determine the exact version of the oracle client I\'m running? Our clients are all running Windows.

I found one su

相关标签:
14条回答
  • 2020-12-12 23:54

    You can get the version of the oracle client by running this command sqlplus /nolog on cmd. Another alternative will be to browse to the path C:\Program Files\Oracle\Inventory and open the "Inventory.xml" file which will give you the version as per below:

    <?xml version="1.0" standalone="yes" ?>
    <!-- Copyright (c) 1999, 2019, Oracle and/or its affiliates.
    All rights reserved. -->
    <!-- Do not modify the contents of this file by hand. -->
    <INVENTORY>
    <VERSION_INFO>
       <SAVED_WITH>12.2.0.1.4</SAVED_WITH>
       <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
    </VERSION_INFO>
    
    0 讨论(0)
  • 2020-12-12 23:55

    Just run this: select * from v$version

    0 讨论(0)
  • 2020-12-12 23:56

    You should put a semicolon at the end of select * from v$version;.

    Like this you will get all info you need...

    If you are looking just for Oracle for example you can do as:

    SQL> select * from v$version where banner like 'Oracle%';
    
    0 讨论(0)
  • 2020-12-12 23:59

    This is another, though not necessarily "better", way:

    Determining Your Current Version

    To determine which Oracle client version you have installed on your pc, run sql*plus to connect to the DW. The folder names may vary somewhat based on your Oracle setup but should be similar. To run sql*plus choose start > programs > Oracle > Oracle - OUDWclient > Application Development > sqlplus. Enter your DW user name, password, and 'ordj' for the host name or service name. This should connect you to the DW via sqlplus. At this point, you could write your own sql statements to pull information from the DW (if you knew sql). The Oracle client version can be determined in the first line - 'SQL*Plus: Release 10.2.0.1.0'.

    [Reference] Oracle Client Information http://www.ohio.edu/technology

    0 讨论(0)
  • 2020-12-13 00:00

    You can use the v$session_connect_info view against the current session ID (SID from the USERENV namespace in SYS_CONTEXT).

    e.g.

    SELECT
      DISTINCT
      s.client_version
    FROM
      v$session_connect_info s
    WHERE
      s.sid = SYS_CONTEXT('USERENV', 'SID');
    
    0 讨论(0)
  • 2020-12-13 00:00

    In Unix

    If you don’t know the location or version of installed Oracle product, you can find it from the inventory which is usually recorded in /etc/oraInst.loc

    > cat /etc/oraInst.loc
    
    inventory_loc=/export/oracle/oraInventory       **--> Inventory location**
    inst_group=dba
    
    
    > cd /export/oracle/oraInventory
    > cd ContentsXML
    

    Here look for a file inventory.xml

    > cat inventory.xml
    <?xml version="1.0" standalone="yes" ?>
    <!-- Copyright (c) 1999, 2010, Oracle. All rights reserved. -->
    <!-- Do not modify the contents of this file by hand. -->
    <INVENTORY>
    <VERSION_INFO>
       <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
       <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
    </VERSION_INFO>
    <HOME_LIST>
    <HOME NAME="OraDB_11G" LOC="/export/oracle/product/11.2.0.2" TYPE="O" IDX="2">
    

    Once you know the install location

    export ORACLE_HOME=full path to install location
    export ORACLE_HOME=/export/oracle/product/11.2.0.2
    export PATH=$ORACLE_HOME/bin:$PATH
    

    A simple "sqlplus" will give you the version of the client installed.

    > sqlplus
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 23 14:51:09 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter user-name:
    

    In the above example, the version of Oracle client is 11.2.0.1

    In Windows

    Registry location variable in windows is INST_LOC

    Start > Run > regedit > HKLM > Software > Oracle
    

    Check the Inst_loc entry value which will be the software installed location.

    You can use command prompt or you can navigate/explore to the oracle home location and then cd to bin directory to lauch sqlplus which will give you the client version information.

    0 讨论(0)
提交回复
热议问题