database 在已经运行 64 位 Oracle 数据库服务器的 Windows 服务器上安装 Oracle 32 位客户端
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25216290/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing Oracle 32-bit Client on Windows Server Already Running 64-bit Oracle Database Server
提问by BeekerC
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.)
我在 Windows 2008 R2 上安装了 64 位 Oracle 数据库服务器 (11.2.0.3),自然而然,它会自动安装 64 位客户端。我必须在此服务器上安装一个 32 位应用程序,并且需要 32 位 Oracle 客户端。(别问 - 我无法安装此应用程序的 64 位版本,它不适用于 64 位客户端,而且我无法将其安装在另一台服务器上。)
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.
现在,我尝试将 32 位客户端安装到不同的物理文件夹中,并在安装时为 Oracle 基础和软件位置选择了不同的值,并且安装得很好。并将 32 位客户端安装的 BIN 文件夹放在 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.
但是,当我尝试使用 32 位版本运行“SQLplus 系统/系统”时,它给了我“ORA-12560:TNS:协议适配器错误”。当我进入带有 64 位 sqlplus.exe 的文件夹并运行它(直接而不是通过 PATH)时,“系统/系统”凭据工作正常。
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.
我将 TNSNames 文件夹从 Oracle Server 的 NETWORK/admin 文件夹复制到 Oracle Client 的 NETWORK/admin 文件夹,然后重新启动服务器。结果一样。
This is the extent of my troubleshooting knowledge for Oracle.
这是我对 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.
如何让 32 位客户端与 64 位 Oracle 服务器在同一台服务器上运行?我知道在 linux/Unix 中,您只需将 lib32 文件夹放入 64 位客户端文件夹并设置几个环境变量,但我很确定在 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.
提前致谢。
回答by Wernfried Domscheit
Here is an instruction how to install 32-bit and 64-bit Oracle Client on one machine. Follow the instruction, then it should work.
这是如何在一台机器上安装 32 位和 64 位 Oracle 客户端的说明。按照说明操作,然后它应该可以工作。
Assumptions: Oracle Home is called OraClient11g_home1
, Client Version is 11gR2
假设:调用 Oracle Home OraClient11g_home1
,客户端版本为 11gR2
Download and install Oracle x86 Client, for example into
C:\Oracle\11.2\Client_x86
Download and install Oracle x64 Client into different folder, for example to
C:\Oracle\11.2\Client_x64
Open command line tool, go to folder %WINDIR%\System32, typically
C:\Windows\System32
and create a symbolic linkora112
to folderC:\Oracle\11.2\Client_x64
(see commands section below)Change to folder %WINDIR%\SysWOW64, typically
C:\Windows\SysWOW64
and create a symbolic linkora112
to folderC:\Oracle\11.2\Client_x86
, (see below)Modify the
PATH
environment variable, replace all entries likeC:\Oracle\11.2\Client_x86
andC:\Oracle\11.2\Client_x64
byC:\Windows\System32\ora112
, respective their\bin
subfolder. Note:C:\Windows\SysWOW64\ora112
must not be in PATH environment.If needed set your
ORACLE_HOME
environment variable toC:\Windows\System32\ora112
Open your Registry Editor. Set Registry value
HKLM\Software\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME
toC:\Windows\System32\ora112
. UsingC:\Oracle\11.2\Client_x64
should also work.Set Registry value
HKLM\Software\Wow6432Node\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME
toC:\Windows\System32\ora112
(notC:\Windows\SysWOW64\ora112
). UsingC:\Oracle\11.2\Client_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 exampleTNS_ADMIN=C:\Oracle\Common\network\admin
下载并安装 Oracle x86 Client,例如进入
C:\Oracle\11.2\Client_x86
将 Oracle x64 Client 下载并安装到不同的文件夹中,例如
C:\Oracle\11.2\Client_x64
打开命令行工具,转到文件夹 %WINDIR%\System32,通常
C:\Windows\System32
并创建指向ora112
文件夹的符号链接C:\Oracle\11.2\Client_x64
(请参阅下面的命令部分)更改到文件夹 %WINDIR%\SysWOW64,通常
C:\Windows\SysWOW64
并创建ora112
到文件夹的符号链接C:\Oracle\11.2\Client_x86
,(见下文)修改
PATH
环境变量,替换所有像C:\Oracle\11.2\Client_x86
和C:\Oracle\11.2\Client_x64
by 的条目C:\Windows\System32\ora112
,分别是它们的\bin
子文件夹。注意:C:\Windows\SysWOW64\ora112
不能在PATH环境中。如果需要,将
ORACLE_HOME
环境变量设置为C:\Windows\System32\ora112
打开您的注册表编辑器。将注册表值设置
HKLM\Software\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME
为C:\Windows\System32\ora112
. 使用C:\Oracle\11.2\Client_x64
也应该有效。将注册表值设置
HKLM\Software\Wow6432Node\ORACLE\KEY_OraClient11g_home1\ORACLE_HOME
为C:\Windows\System32\ora112
(notC:\Windows\SysWOW64\ora112
)。使用C:\Oracle\11.2\Client_x86
也应该有效。你完成了!现在您可以无缝地使用 x86 和 x64 Oracle 客户端,即 x86 应用程序将加载 x86 库,x64 应用程序加载 x64 库而无需对您的系统进行任何进一步修改。
例如,将
TNS_ADMIN
环境变量(TNS_ADMIN
注册表中的相应条目)设置为公共位置可能是一个聪明的主意TNS_ADMIN=C:\Oracle\Common\network\admin
Commands to create symbolic links:
创建符号链接的命令:
cd C:\Windows\System32
mklink /d ora112 C:\Oracle\11.2\Client_x64
cd C:\Windows\SysWOW64
mklink /d ora112 C:\Oracle\11.2\Client_x86
cd C:\Windows\System32
mklink /d ora112 C:\Oracle\11.2\Client_x64
cd C:\Windows\SysWOW64
mklink /d ora112 C:\Oracle\11.2\Client_x86
Notes:
笔记:
Both symbolic links must have the same name, e.g. ora112
.
两个符号链接必须具有相同的名称,例如ora112
.
Despite of their names folder C:\Windows\System32
contains the x64 libraries, whereas C:\Windows\SysWOW64
contains the x86 (32-bit) libraries. Don't be confused.
尽管名称不同,文件夹C:\Windows\System32
包含 x64 库,而C:\Windows\SysWOW64
包含 x86(32 位)库。不要混淆。