天天看點

如何檢視Oracle用戶端版本

     在實際工作中,總會遇到一些需要檢視、驗證oracle用戶端版本的問題,因為一台伺服器可能裝了多個oracle用戶端版本;也有可能你需要知道安裝的

版本是32位還是64位的。如何檢視oracle用戶端(oracle client)的版本呢?

下面介紹一下在windows、linux下如何檢視oracle用戶端版本的方法。

windows平台:

<b></b> 

<b>方法1: 檢視安裝的oracle用戶端版本</b>

如下所示,使用sqlplus -v指令,可以查到該用戶端安裝的 11.2.0.1.0的用戶端版本。

c:\users&gt;sqlplus -v

sql*plus: release 11.2.0.1.0 production

如何檢視Oracle用戶端版本

如果我要檢視這個用戶端版本是32bit還是64bit的呢,該如何檢視,方法如下所示:

step 1:運作sqlplus /nolog指令,如果你伺服器安裝了多個用戶端版本,那麼你應該進入對應安裝目錄的bin目錄後,運作該指令

c:\users&gt;sqlplus /nolog

sql*plus: release 11.2.0.1.0 production on mon nov 10 11:32:23 2014

copyright (c) 1982, 2010, oracle. all rights reserved.

sql&gt;

step 2:打開任務管理器,找到sql*plus程序,如果oracle的用戶端為32位,則在image name會标記為*32,那麼如下圖所示:

    windows server 2008 oracle 32bit client

如何檢視Oracle用戶端版本

    windows server 2008 oracle 64bit client

如何檢視Oracle用戶端版本

     windows server 2012 oracle 32bit client

如何檢視Oracle用戶端版本

<b>方法2: 檢視安裝的oracle用戶端版本</b>

<b></b>

<b></b>在%oracle_home%\inventory

\contentsxml目錄下面找到comps.xml檔案,例如我目前的測試伺服器上路徑為c:\oracle_client\client64

\product\11.2.0\client_1\inventory\contentsxml\comps.xml

如果plat="nt_amd64"表示安裝的是64位的oracle 用戶端,如果plat="nt_x86"則表示安裝的是32位的oracle用戶端。

oracle 64bit client

如何檢視Oracle用戶端版本

oracle 32bit client

如何檢視Oracle用戶端版本

<b>方法3: 檢視安裝的oracle用戶端版本</b>

如果作業系統是32位的,那麼oracle用戶端也必定為32位,如果作業系統是64位作業系統,那麼oracle用戶端則有可能為32位或64位,我們可以通過系統資料庫來檢視

例如,我在windows server 2012上安裝了一個32位的oracle 11g client。 運作regedit進入系統資料庫系統,在hkey_local_machine\software\oracle\下面,

會發現下面沒有注冊資訊,但是hkey_local_machine\software\wow6432node\oracle下就能看到一些詳細的注冊

表資訊,如果安裝的是64位的oracle用戶端,則系統資料庫資訊位于hkey_local_machine\software\oracle\下,而

hkey_local_machine\software\wow6432node下沒有oracle目錄。

如何檢視Oracle用戶端版本
如何檢視Oracle用戶端版本

linux平台:

[oracle@ceglnx01 bin]$ sqlplus -v

sql*plus: release 10.2.0.4.0 - production

1:使用file指令檢視32位還是64位用戶端。

<b>oracle client 32 bit</b>

[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

<b>oracle client 64 bit</b>

[oracle@db-server-02 ~]$ which 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@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@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

繼續閱讀