Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize "%ORACLE_HOME%\bin\oci.dll"
2013-08-20 11:28
543 查看
原来在装plsql的时候,网上说win7 64位的系统不能装或是不能启动或是要做很多的工作来破解什么的,很是麻烦,今天又遇到这个问题,在高人的指点下没那么麻烦解决了,过程如下:
在64 的 Win7 上重新安装了 Oralce 后,通过 PL/SQL 连接数据库时,提示如下错误信息
![](http://hi.csdn.net/attachment/201111/30/0_1322639809YhRy.gif)
Oracle win64 11gR2
PL/SQL v9.0
view plaincopyprint?
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
(http://www.pc6.com/softview/SoftView_66665.html#download)这个也行的.
2. 将 instantclient-basic-nt-11.2.0.2.0.zip 解压至 E:\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.dll
![](http://hi.csdn.net/attachment/201111/30/0_1322640899azlq.gif)
5. 重新启动 PL/SQL并登录对应的数据库,连接正常,问题成功解决!
在64 的 Win7 上重新安装了 Oralce 后,通过 PL/SQL 连接数据库时,提示如下错误信息
![](http://hi.csdn.net/attachment/201111/30/0_1322639809YhRy.gif)
环境
windows7 64bitOracle win64 11gR2
PL/SQL v9.0
详细错误信息
[plain]view plaincopyprint?
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
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
问题原因
安装完后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】(http://www.pc6.com/softview/SoftView_66665.html#download)这个也行的.
2. 将 instantclient-basic-nt-11.2.0.2.0.zip 解压至 E:\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.dll
![](http://hi.csdn.net/attachment/201111/30/0_1322640899azlq.gif)
5. 重新启动 PL/SQL并登录对应的数据库,连接正常,问题成功解决!
相关文章推荐
- [转]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"
- 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"
- 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"
- 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"
- 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"
- Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize "%ORACLE_HOME%\bin\oci.dll"
- x64 PL/SQL 连接 Oralce 提示 Could not initialize "%ORACLE_HOME%\bin\oci.dll"
- Win 2008 R2 x64 PL/SQL 连接 Oralce 提示 Could not initialize "%ORACLE_HOME%\bin\oci.dll"
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll
- x64 PL/SQL 连接 Oralce 提示 Could not initialize oci.dll