---
title: "Oracle客户端安装"
author: "e_e"
date: "2016-07-07T11:47:20Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2016-07-07T11:47:20Z"
id: 2309765
url: "https://e-e.iteye.com/blog/2309765"
---

# 默认情况下，PL/SQL Developer是无法连接到数据库的，原因是：PL/SQL DEVELOPER 是沒办法执行64位元的OCI.DLL，可是 Win7 X64 又只能装64 位元Oracle client X64。变成要多下载一个Oracle Instant client X32 oci.dll是64位的,而PL/SQL developer只有32位的,在使用64位oci.dll文件出错。

我的系统环境：

l  64位Windows 7旗舰版；

l  虚拟机Red hat Linux下的Oracle 11g ；

l  64位Oracle 11g Client;

l  32位instantclient-basic-nt

l  PL/SQL Development 9.0.6.1655

以下是个人实验的安装步骤：其总体的步骤是先安装Oracle客户端，后安装PL/SQL Developer,最后配置连接条件

 

# 安装64位Oracle客户端

[]()1. 安装Oracle客户端

先到 Oracle 官网下载 [Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64)](http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html)

下载界面如下图所示

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s10.sinaimg.cn/mw690/5f9f0413gdc7cd7d1bef9&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s10.sinaimg.cn/orignal/5f9f0413gdc7cd7d1bef9)

下载后：

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s12.sinaimg.cn/mw690/5f9f0413gdc7cc867a32b&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s12.sinaimg.cn/orignal/5f9f0413gdc7cc867a32b)

 

接者依照以下步骤安装：

a. 執行win64\_11gR2\_client\\client\\setup.exe 进行安装，一开始有个黑色侦测界面，等消失后进入安裝界面。

b. 進入安裝界面后，选择您要安装项目，这里选择安装类型时，选择“管理员”，如下图：[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s8.sinaimg.cn/mw690/5f9f0413gdc7cca7b9007&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s8.sinaimg.cn/orignal/5f9f0413gdc7cca7b9007)

 

在“完成”窗口中，单击“关闭”即可。

数据库配置文件已经安装到 D:\\app\\Administrator,

同时其他选定的安装组件也已经安装到D:\\app\\MichaelSu\\product\\11.2.0\\client\_1。

本人实验安装的位置是D盘，其他的步骤和安装服务器端类似。直到最后完成即可。

安装完成的路径如下所示：[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s6.sinaimg.cn/mw690/5f9f0413g7c72e145d315&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s6.sinaimg.cn/orignal/5f9f0413g7c72e145d315)e

 

[]()2. 下载instantclient-basic-nt

到Oracle官网下载 [Instant Client for Microsoft Windows (32-bit)](http://www.oracle.com/technetwork/topics/winsoft-085727.html)

下载后配置文件如下图

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s10.sinaimg.cn/mw690/5f9f0413gdc7ccf4ad879&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s10.sinaimg.cn/orignal/5f9f0413gdc7ccf4ad879)

 

[]()3. 解压指定位置

选择instantclient-basic-nt-11.2.0.3.0，下载后解压到目录D:\\instantclient\_11\_2。

解压后目录

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s16.sinaimg.cn/mw690/5f9f0413gdc7cd39bdb9f&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s16.sinaimg.cn/orignal/5f9f0413gdc7cd39bdb9f)

[]()二 、安装PL/SQL Development

[]()1. PL/SQL Development安装

注意：不要安装在默认的C:\\Program Files (x86)目录下，否则会报错，原因是不能解析这个带（）的路径。

当Oracle客户端安装的是64位Oracle 11g Client，启动PL/SQL Developer会提示错误。原因：oci.dll是64位的，32位应用程序PL/SQL Developer无法加载，可以安装一个32位的Oracle Client来解决。（步骤3就是解决这个问题的）

个人的安装的PL/SQL Development的路径如下：

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s14.sinaimg.cn/mw690/5f9f0413gdc7ce3db20fd&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s14.sinaimg.cn/orignal/5f9f0413gdc7ce3db20fd)

 

[]()2. 配置tnsnames.ora连接

配置tnsnames.ora文件到32位客户端目录，默认环境下NETWORK\\ADMIN目录路径不存在，本人配置的目录如下：D:\\instantclient\_11\_2\\NETWORK\\ADMIN

 

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s14.sinaimg.cn/mw690/5f9f0413gdc7ce78cf83d&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s14.sinaimg.cn/orignal/5f9f0413gdc7ce78cf83d)

# []()三、配置PL/SQL Deverloper登陆

非登录状态下进入PL/SQL developer,进入工具-&gt;首选项-&gt;连接,在连接中设置Oracle主目录和OCI 库,其中

Oracle主目录设置为InstantClient的解压目录（D:\\app\\MichaelSu\\product\\11.2.0\\client\_1\\）,OCI 库设置为该目录下的oci.dll（D:\\instantclient\_11\_2\\oci.dll）。

设置完成后界面如下

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s8.sinaimg.cn/mw690/5f9f0413gdc7ced80ca87&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s8.sinaimg.cn/orignal/5f9f0413gdc7ced80ca87)

 

登陆界面

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s11.sinaimg.cn/mw690/5f9f0413gdc7cef07d39a&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s11.sinaimg.cn/orignal/5f9f0413gdc7cef07d39a)

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s5.sinaimg.cn/mw690/5f9f0413gdc7cf1811344&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s5.sinaimg.cn/orignal/5f9f0413gdc7cf1811344)

 

 

数据库虚拟机：

[![Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g](http://s5.sinaimg.cn/mw690/5f9f0413gdc7cf9503ef4&690 "Windows <wbr>7 <wbr>64位PL/SQL <wbr>Developer <wbr>连接Oracle <wbr>11g")](http://photo.blog.sina.com.cn/showpic.html#blogid=5f9f04130101jqhu&url=http://s5.sinaimg.cn/orignal/5f9f0413gdc7cf9503ef4)