安装 Oracle Instant Client
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5809195/
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 Instant Client
提问by Madam Zu Zu
I can't seem to figure out how to install the Oracle client on Windows Server 2008.
我似乎无法弄清楚如何在 Windows Server 2008 上安装 Oracle 客户端。
I downloaded x64 version (the first file on the list) here. There are installation instructions on the bottom of that page:
我在这里下载了x64 版本(列表中的第一个文件)。该页面底部有安装说明:
Step 2 ("instantclient")
第 2 步(“即时客户端”)
Which executable should I run?
我应该运行哪个可执行文件?
回答by Sergio Cabral
The instantclient works onlyby defining the folder in the windows PATH environment variable. But you can "install" manuallyto create some keys in the Windows registry. How?
Instantclient只能通过在 windows PATH 环境变量中定义文件夹来工作。但是您可以手动“安装”以在 Windows 注册表中创建一些键。如何?
1)Download instantclient (http://www.oracle.com/technetwork/topics/winsoft-085727.html)
1)下载即时客户端 ( http://www.oracle.com/technetwork/topics/winsoft-085727.html)
2)Unzip the ZIP file (eg c:\oracle\instantclient).
2)解压 ZIP 文件(例如 c:\oracle\instantclient)。
3)Include the above path in the PATH.
3)在PATH中包含上面的路径。
4)Create the registry key:
4)创建注册表项:
- Windows 32bit:
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]
- Windows 64bit:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE]
- 视窗 32 位:
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]
- 视窗 64 位:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE]
5)In the above registry key, create a sub-key starts with "KEY_" followed by the name of the installation you want:
5)在上面的注册表项中,创建一个以“KEY_”开头的子项,后跟您想要的安装名称:
- Windows 32bit:
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_INSTANTCLIENT]
- Windows 64bit:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_INSTANTCLIENT]
- 视窗 32 位:
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_INSTANTCLIENT]
- 视窗 64 位:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_INSTANTCLIENT]
6)Now create at least three string values ??in the above key:
6)现在在上面的键中创建至少三个字符串值 ??
NLS_LANG = BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252
(complete list here: http://docs.oracle.com/cd/B19306_01/install.102/b14317/gblsupp.htm)ORACLE_HOME = c:\oracle\instantclient
(the same folder in PATH)ORACLE_HOME_NAME = MY_INSTANTCLIENT
(choose any name)
NLS_LANG = BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252
(此处的完整列表:http: //docs.oracle.com/cd/B19306_01/install.102/b14317/gblsupp.htm)ORACLE_HOME = c:\oracle\instantclient
(PATH 中的同一个文件夹)ORACLE_HOME_NAME = MY_INSTANTCLIENT
(选择任何名称)
For those who use Quest SQL Navigator or Quest Toad for Oraclewill see that it works. Displays the message "Home is valid.":
对于那些使用 Quest SQL Navigator 或Quest Toad for Oracle 的人来说,它会起作用。显示消息“主页有效。”:
The registry keys are now displayed for selecting the oracle client:
现在显示用于选择 oracle 客户端的注册表项:
回答by pepperhead
I was able to setup Oracle Instant Client (Basic) 11g2 and Oracle ODBC (32bit) drivers on my 32bit Windows 7 PC. Note: you'll need a 'tnsnames.ora' file because it doesn't come with one. You can Google examples and copy/paste into a text file, change the parameters for your environment.
我能够在我的 32 位 Windows 7 PC 上设置 Oracle Instant Client(基本)11g2 和 Oracle ODBC(32 位)驱动程序。注意:您需要一个“tnsnames.ora”文件,因为它没有附带。您可以 Google 示例并复制/粘贴到文本文件中,更改环境参数。
Setting up Oracle Instant Client-Basic 11g2 (Win7 32-bit)
(I think there's another step or two if your using 64-bit)
设置 Oracle Instant Client-Basic 11g2(Win7 32 位)
(如果您使用 64 位,我认为还有一两步)
Oracle Instant Client
Oracle 即时客户端
- Unzip Oracle Instant Client - Basic
- Put contents in folder like "C:\instantclient"
- Edit PATH evironment variable, add path to Instant Client folder to the Variable Value.
- Add new Variable called "TNS_ADMIN" point to same folder as Instant Client.
- I had to create a "tnsnames.ora" file because it doesn't come with one. Put it in same folder as the client.
- reboot or use Task Manager to kill "explorer.exe" and restart it to refresh the PATH environment variables.
- 解压缩 Oracle Instant Client - 基本
- 将内容放在像“C:\instantclient”这样的文件夹中
- 编辑 PATH 环境变量,将 Instant Client 文件夹的路径添加到变量值。
- 添加名为“TNS_ADMIN”的新变量指向与 Instant Client 相同的文件夹。
- 我不得不创建一个“tnsnames.ora”文件,因为它没有附带。将它放在与客户端相同的文件夹中。
- 重新启动或使用任务管理器杀死“explorer.exe”并重新启动它以刷新 PATH 环境变量。
ODBC Drivers
ODBC 驱动程序
- Unzip ODBC drivers
- Copy all files into same folder as client "C:\instantclient"
- Use command prompt to run "odbc_install.exe" (should say it was successful)
- 解压缩 ODBC 驱动程序
- 将所有文件复制到与客户端“C:\instantclient”相同的文件夹中
- 使用命令提示符运行“odbc_install.exe”(应该说成功了)
Note: The "un-documented" things that were hanging me up where...
- All files (Client and Drivers) needed to be in the same folder (nothing in sub-folders).
- Running the ODBC driver from the command prompt will allow you to see if it installs successfully. Double-clicking the installer just flashed a box on the screen, no idea it was failing because no error dialog.
注意:将我挂在何处的“未记录”的东西...
- 所有文件(客户端和驱动程序)都需要在同一个文件夹中(子文件夹中没有任何内容)。
- 从命令提示符运行 ODBC 驱动程序将允许您查看它是否安装成功。双击安装程序只是在屏幕上闪烁一个框,不知道它失败了,因为没有错误对话框。
After you've done this you should be able to setup a new DSN Data Source using the Oracle ODBC driver.
-Hope this helps someone else.
完成此操作后,您应该能够使用 Oracle ODBC 驱动程序设置新的 DSN 数据源。
-希望这对其他人有帮助。
回答by p.campbell
The directions state:
指示指出:
- Download the appropriate Instant Client packages for your platform. All installations REQUIRE the Basic package.
- Unzip the packages into a single directory such as "instantclient".
- Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH is the appropriate environment variable. On Windows, PATH should be used.
- Start your application and enjoy.
- 为您的平台下载适当的 Instant Client 软件包。所有安装都需要基本包。
- 将软件包解压缩到一个目录中,例如“instantclient”。
- 将环境中的库加载路径设置为步骤 2 中的目录(“instantclient”)。在许多 UNIX 平台上,LD_LIBRARY_PATH 是合适的环境变量。在 Windows 上,应该使用 PATH。
- 开始您的应用程序并享受。
Suggest extracting/unzipping into a new directory. They've suggestedinstantclient
, but you can name the directory anything you like. Name it C:\OracleInstantClient\
if you choose.
建议解压/解压到一个新目录。他们已经建议了instantclient
,但是您可以将目录命名为您喜欢的任何名称。C:\OracleInstantClient\
如果您选择,请为其命名。
Then in Step 3, open a Windows Command Prompt. Type:
然后在第 3 步中,打开 Windows 命令提示符。类型:
PATH C:\OracleInstantClient; %PATH%`
That's all there is to it!
这里的所有都是它的!
回答by Justin Cave
If you want to use SQL Server Management Studio, you want to install the full Oracle client, not the Instant Client. The full Oracle client is on the same download page as the Oracle database. Assuming that you are installing on a 64-bit version of Windows, I expect you want the "Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64)" download. This is several hundred MB rather than a couple of MB for the Instant Client.
如果您想使用 SQL Server Management Studio,您需要安装完整的 Oracle 客户端,而不是 Instant Client。完整的 Oracle 客户端与 Oracle 数据库位于同一下载页面。假设您在 64 位版本的 Windows 上安装,我希望您需要“用于 Microsoft Windows (x64) 的 Oracle Database 11g 第 2 版客户端 (11.2.0.1.0)”下载。对于 Instant Client,这是几百 MB 而不是几 MB。
回答by Phillip Brown
Try SQLDeveloper - there is a migration workbench there
尝试 SQLDeveloper - 那里有一个迁移工作台
http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html