我在 Windows 2008 R2 上安装了 64 位 Oracle 数据库服务器 (11.2.0.3),自然而然,它会自动安装 64 位客户端.我必须在此服务器上安装一个应用程序,该应用程序是 32 位的并且需要 32 位 Oracle 客户端.(别问 - 我无法安装此应用的 64 位版本,它不适用于 64 位客户端,而且我无法将其安装在其他服务器上.)
现在我已经尝试将 32 位客户端安装到不同的物理文件夹中,并在安装时为 Oracle 基础和软件位置选择了不同的值,并且安装得很好.并将 32 位客户端安装的 BIN 文件夹放在 PATH statemtn 的头部.
但是,当我尝试使用 32 位版本运行SQLplus 系统/系统"时,它给了我ORA-12560:TNS:协议适配器错误".当我进入带有 64 位 sqlplus.exe 的文件夹并运行它(直接而不是通过 PATH)时,系统/系统"凭据工作正常.
我将 TNSNames 文件夹从 Oracle Server 的 NETWORK/admin 文件夹复制到 Oracle Client 的 NETWORK/admin 文件夹,然后重新启动了服务器.相同的结果.
这是我对 Oracle 的故障排除知识的范围.
如何让 32 位客户端与 64 位 Oracle 服务器在同一台服务器上运行?我知道在 linux/Unix 中,您只需将 lib32 文件夹放入 64 位客户端文件夹并设置几个环境变量,但我很确定在 Windows 中它没有那么简单.
如果有办法做到这一点,请在您的答案中进行描述,因为我需要分步说明.
提前致谢.
这里是如何在一台机器上安装 32 位和 64 位 Oracle 客户端的说明.按照说明操作,应该就可以了.
假设:Oracle Home 名为 OraClient11g_home1
,客户端版本为 11gR2
下载并安装 Oracle x86 Client,例如到 C:Oracle11.2Client_x86
将 Oracle x64 Client 下载并安装到不同的文件夹中,例如到 C:Oracle11.2Client_x64
打开命令行工具,转到文件夹 %WINDIR%System32,通常是 C:WindowsSystem32
并创建一个符号链接 ora112
到文件夹 <代码>C:Oracle11.2Client_x64(参见下面的命令部分)
更改到文件夹 %WINDIR%SysWOW64,通常是 C:WindowsSysWOW64
并创建一个符号链接 ora112
到文件夹 C:Oracle11.2Client_x86
,(见下文)
修改PATH
环境变量,替换C:Oracle11.2Client_x86
和C:Oracle11.2Client_x64等所有条目
由 C:WindowsSystem32ora112
,各自的 in
子文件夹.注意:C:WindowsSysWOW64ora112
不能在PATH环境中.
如果需要,将您的 ORACLE_HOME
环境变量设置为 C:WindowsSystem32ora112
打开您的注册表编辑器.将注册表值 HKLMSoftwareORACLEKEY_OraClient11g_home1ORACLE_HOME
设置为 C:WindowsSystem32ora112
.使用 C:Oracle11.2Client_x64
应该也可以.
将注册表值 HKLMSoftwareWow6432NodeORACLEKEY_OraClient11g_home1ORACLE_HOME
设置为 C:WindowsSystem32ora112
(不是 C:WindowsSysWOW64ora112
).使用 C:Oracle11.2Client_x86
应该也可以.
你完成了!现在您可以无缝地使用 x86 和 x64 Oracle 客户端,即 x86 应用程序将加载 x86 库,x64 应用程序加载 x64 库而无需对您的系统进行任何进一步修改.
可能将您的 TNS_ADMIN
环境变量(注册表中的 TNS_ADMIN
条目)设置到一个公共位置是一个聪明的主意,例如 TNS_ADMIN=C:OracleCommon
etworkadmin
创建符号链接的命令:
cd C:WindowsSystem32 mklink/d ora112 C:Oracle11.2Client_x64 cd C:WindowsSysWOW64 mklink/d ora112 C:Oracle11.2Client_x86
>
注意事项:
两个符号链接必须具有相同的名称,例如ora112
.
尽管名称不同,文件夹 C:WindowsSystem32
包含 x64 库,而 C:WindowsSysWOW64
包含 x86(32 位)库.不要混淆.
I have 64-bit Oracle Database Server (11.2.0.3) installed on Windows 2008 R2, and naturally, it automatically installs the 64-bit client. I have to install an application onto this server that is 32-bit and requires the 32-bit Oracle client. (Don't Ask - I can't install the 64-bit version of this app, it won't work with the 64-bit client, and I can't install it on another server.)
Now i have tried installing the 32-bit Client into a different physical folder and selected a different value for the Oracle Base and Software Location when installing and it installed just fine. And it put the BIN folder of the 32-bit Client installation at the head of the PATH statemtn.
However, when i tried to run "SQLplus system/system" with the 32-bit version it gives me the "ORA-12560: TNS:protocol adapter error". When I go into the folder with the 64-bit sqlplus.exe and ran it (directly and not through PATH), the "system/system" credentials worked fine.
I copied the TNSNames folder from the Oracle Server's NETWORK/admin folder to the Oracle Client's NETWORK/admin folder, and rebooted the server. Same results.
This is the extent of my troubleshooting knowledge for Oracle.
How can i get the 32-bit Client to run on the same server as the 64-bit Oracle Server? I know in linux/Unix, you simply put in the lib32 folder into the the 64-bit client folder and set a couple of environment variables, but i'm pretty sure it's not that simple in Windows.
If there is a way to do this, please be descriptive in you answer as I will need step-by-step instructions.
Thanks in advance.
Here is an instruction how to install 32-bit and 64-bit Oracle Client on one machine. Follow the instruction, then it should work.
Assumptions: Oracle Home is called OraClient11g_home1
, Client Version is 11gR2
Download and install Oracle x86 Client, for example into C:Oracle11.2Client_x86
Download and install Oracle x64 Client into different folder, for example to C:Oracle11.2Client_x64
Open command line tool, go to folder %WINDIR%System32, typically C:WindowsSystem32
and create a symbolic link ora112
to folder C:Oracle11.2Client_x64
(see commands section below)
Change to folder %WINDIR%SysWOW64, typically C:WindowsSysWOW64
and create a symbolic link ora112
to folder C:Oracle11.2Client_x86
, (see below)
Modify the PATH
environment variable, replace all entries like C:Oracle11.2Client_x86
and C:Oracle11.2Client_x64
by C:WindowsSystem32ora112
, respective their in
subfolder. Note: C:WindowsSysWOW64ora112
must not be in PATH environment.
If needed set your ORACLE_HOME
environment variable to C:WindowsSystem32ora112
Open your Registry Editor. Set Registry value HKLMSoftwareORACLEKEY_OraClient11g_home1ORACLE_HOME
to C:WindowsSystem32ora112
. Using C:Oracle11.2Client_x64
should also work.
Set Registry value HKLMSoftwareWow6432NodeORACLEKEY_OraClient11g_home1ORACLE_HOME
to C:WindowsSystem32ora112
(not C:WindowsSysWOW64ora112
). Using C:Oracle11.2Client_x86
should also work.
You are done! Now you can use x86 and x64 Oracle client seamless together, i.e. an x86 application will load the x86 libraries, an x64 application loads the x64 libraries without any further modification on your system.
Probably it is a smart idea to set your TNS_ADMIN
environment variable (resp. TNS_ADMIN
entries in Registry) to a common location, for example TNS_ADMIN=C:OracleCommon
etworkadmin
Commands to create symbolic links:
cd C:WindowsSystem32 mklink /d ora112 C:Oracle11.2Client_x64 cd C:WindowsSysWOW64 mklink /d ora112 C:Oracle11.2Client_x86
Notes:
Both symbolic links must have the same name, e.g. ora112
.
Despite of their names folder C:WindowsSystem32
contains the x64 libraries, whereas C:WindowsSysWOW64
contains the x86 (32-bit) libraries. Don't get confused.
这篇关于在已经运行 64 位 Oracle 数据库服务器的 Windows Server 上安装 Oracle 32 位客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!