Win7 x64 PL/SQL 串連 Oralce 提示 Could not initialize “%ORACLE_HOME%\bin\oci.dll”

來源:互聯網
上載者:User

今天在 x64 的 Win7 上重新安裝了 Oralce 後,通過 PL/SQL 串連資料庫時,提示如下錯誤資訊

環境

windows7 64bit

Oracle win64 11gR2

PL/SQL v9.0

詳細錯誤資訊 [plain] view
plaincopy

  1. Initialization error  
  2. Could not initialize "C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll"  
  3. Make sure you have the 32 bits Oracle Client installed.  
  4.   
  5. OCIDLL forced to C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll  
  6. LoadLibrary(C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll) returned 0  
問題原因安裝完後Oracle的 oci.dll 是64位的,而32位應用程式 PLSQL Developer 無法載入。解決方案1. 從 http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html 下載Oracle
Client Package。 我下載的是Instant Client for Microsoft Windows (32-bit) 【instantclient-basic-nt-11.2.0.2.0.zip】 2. 將 instantclient-basic-nt-11.2.0.2.0.zip 解壓至 c:\oracle, oci.dll 所在目錄為:c:\oracle\instantclient_11_2\3. 設定環境變數    TNS_ADMIN=c:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN    NLS_LANG=AMERICAN_AMERICA.ZHS16GBK ( 註:NLS_LANG前半部分必須是AMERICAN_AMERICA,因為instant client不支援其他語言;而後半部分可以根據你資料庫的字元集調整,如果資料庫採用AL32UTF8,則可以設定AL32UTF8)4. 啟動PL/SQL Developer ,點擊“取消”不要登入,菜單 --> Tools --> Perferences --> Connection 修改 Oracle_Home 和 OCI Library 的配置:
    OracleHome: OraDb11g_home1
    OCI library: C:\oracle\instantclient_11_2\oci.dll5. 重新啟動 PL/SQL並登入對應的資料庫,串連正常,問題成功解決!原文出自:http://blog.csdn.net/hemingwang0902/article/details/7027543
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.