如何查看Oracle用戶端版本

來源:互聯網
上載者:User

標籤:style   blog   http   io   color   ar   使用   sp   for   

    在實際工作中,總會遇到一些需要查看、驗證ORACLE用戶端版本的問題,因為一台伺服器可能裝了多個Oracle用戶端版本;也有可能你需要知道安裝的版本是32位還是64位的。如何查看Oracle用戶端(Oracle Client)的版本呢? 下面介紹一下在Windows、Linux下如何查看Oracle用戶端版本的方法。

Windows平台:

 

方法1: 查看安裝的Oracle用戶端版本

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

C:\Users>sqlplus -v

SQL*Plus: Release 11.2.0.1.0 Production

 

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

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

C:\Users>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>

Step 2:開啟工作管理員,找到SQL*Plus進程,如果Oracle的用戶端為32位,則在Image Name會標記為*32,那麼如所示:

    Windows Server 2008 Oracle 32bit Client

    Windows Server 2008 Oracle 64bit Client

     Windows Server 2012 Oracle 32bit Client

方法2: 查看安裝的Oracle用戶端版本

在%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 32bit Client

 

方法3: 查看安裝的Oracle用戶端版本

如果作業系統是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目錄。

 

Linux平台:

[[email protected] bin]$ sqlplus -v

SQL*Plus: Release 10.2.0.4.0 - Production

 

1:使用file命令查看32位還是64位用戶端。

 

Oracle Client 32 bit

[[email protected] ~]$ which sqlplus

/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus

[[email protected] ~]$ 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

[[email protected] ~]$ which sqlplus

/u01/app/oracle/product/10.2.0/db_1/bin/sqlplus

[[email protected] ~]$ 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

[[email protected] logs]$ cd /u01/app/oracle/product/10.2.0/db_1/bin

[[email protected] 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

[[email protected] ~]$ cd /u01/app/oracle/product/10.2.0/db_1/bin

[[email protected] 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位用戶端。

[[email protected] db_1]$ ls -d lib

lib

[[email protected] db_1]$ ls -d lib*

lib lib32

如何查看Oracle用戶端版本

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.