在实际工作中,总会遇到一些需要查看、验证ORACLE客户端版本的问题,因为一台服务器可能装了多个Oracle客户端版本;也有可能你需要知道安装的版本是32位还是64位的。如何查看Oracle客户端(Oracle
Client)的版本呢? 下面介绍一下在Linux下如何查看Oracle客户端版本的方法。
[oracle@ceglnx01 bin]$ sqlplus
-v
SQL*Plus: Release 10.2.0.4.0 -
Production
1:使用file命令查看32位还是64位客户端。
Oracle Client 32
bit
[oracle@db-server-01 ~]$ which
sqlplus
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus
[oracle@db-server-01 ~]$ file
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs),
not stripped
Oracle Client 64
bit
[oracle@db-server-02 ~]$ which
sqlplus
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus
[oracle@db-server-02 ~]$ file
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus
/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs),
for GNU/Linux 2.6.9, not stripped
或者
Oracle Client 32
bit
[oracle@db-server-01 logs]$ cd
/u01/app/oracle/product/10.2.0/db_1/bin
[oracle@db-server-01 bin]$ file
oracle
oracle: setuid setgid ELF
32-bit LSB executable, Intel 80386,
version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses
shared libs), not stripped
Oracle Client 64
bit
[oracle@db-server-02 ~]$ cd
/u01/app/oracle/product/10.2.0/db_1/bin
[oracle@db-server-02 bin]$ file
oracle
oracle: setuid setgid ELF
64-bit LSB executable, AMD x86-64,
version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses
shared libs), for GNU/Linux 2.6.9, not stripped
2:
通过查看$ORACLE_HOME下的lib或lib32目录,如果两个目录都存成,则为64位,如果只有lib目录.则为32位客户端。
[oracle@db-server-01 db_1]$ ls
-d lib
lib
[oracle@db-server-01 db_1]$ ls
-d lib*
lib lib32