Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize %ORACLE_HOME%\bin\oci.dll
生活随笔
收集整理的這篇文章主要介紹了
Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize %ORACLE_HOME%\bin\oci.dll
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在 x64 的 Win7 上重新安裝了 Oralce 后,通過(guò) PL/SQL 連接數(shù)據(jù)庫(kù)時(shí),提示如下錯(cuò)誤信息
環(huán)境
windows7 64bit
Oracle win64 11gR2
PL/SQL v9.0
詳細(xì)錯(cuò)誤信息
Initialization error Could not initialize "C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll" Make sure you have the 32 bits Oracle Client installed. OCIDLL forced to C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll LoadLibrary(C:\oracle\product\11.2.0\dbhome_1\bin\oci.dll) returned 0問(wèn)題原因
安裝的Oracle是64位的,PLSQL Developer只提供了32位應(yīng)用程序,無(wú)法加載64位Oracle的oci.dll。解決方案
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. 設(shè)置環(huán)境變量 TNS_ADMIN=c:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN NLS_LANG=AMERICAN_AMERICA.ZHS16GBK (注:NLS_LANG前半部分必須是AMERICAN_AMERICA,因?yàn)閕nstant client不支持其他語(yǔ)言;而后半部分可以根據(jù)你數(shù)據(jù)庫(kù)的字符集調(diào)整,如果數(shù)據(jù)庫(kù)采用AL32UTF8,則可以設(shè)置AL32UTF8) 4.?啟動(dòng)PL/SQL Developer ,點(diǎn)擊“取消”不要登錄,菜單 --> Tools --> Perferences --> Connection 修改 Oracle_Home 和 OCI Library 的配置:
? ? OracleHome: OraDb11g_home1
? ? OCI library: C:\oracle\instantclient_11_2\oci.dll 5. 重新啟動(dòng) PL/SQL并登錄對(duì)應(yīng)的數(shù)據(jù)庫(kù),連接正常,問(wèn)題成功解決!
轉(zhuǎn)載于:https://www.cnblogs.com/hefeisf/p/4834809.html
總結(jié)
以上是生活随笔為你收集整理的Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize %ORACLE_HOME%\bin\oci.dll的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: python-study-17
- 下一篇: CentOS MySQL 5.7编译安装