Home > Database > Mysql Tutorial > 安装Oracle客户端 配置PL/SQL Developer

安装Oracle客户端 配置PL/SQL Developer

WBOY
Release: 2016-06-07 17:04:20
Original
1221 people have browsed it

安装Oracle客户端 配置PL/SQL Developer

一、配置Oracle服务器的监听器listener
 
修改/network/admin/目录下的listener.ora和tnsnames.ora两个文件。其中
listener文件大致如下:
# listener.ora Network Configuration File: /oracle/app/product/10.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
 (SID_DESC =
 (SID_NAME = PLSExtProc)
 (ORACLE_HOME = /oracle/app/product/10.1.0/db_1)
 (PROGRAM = extproc)
 )
 (SID_DESC =
 (GLOBAL_DBNAME = demo1) #demo1为oracle实例名
 (ORACLE_HOME = /oracle/app/product/10.1.0/db_1)
 (SID_NAME = demo1)#SID_NAME不用改成demo1
 )
) LISTENER =
(DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521)) #IP地址为oracle服务器
 )
)
tnsnames.ora文件大致修改如下:
# tnsnames.ora Network Configuration File: /oracle/app/product/10.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DEMO1 =
(DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521)) #IP地址为oracle服务器
 (CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = DEMO1) #demo1为oracle实例名,或者服务名称此名称可通过netmgr或netca修改
 )
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) )
 (CONNECT_DATA =
 (SID = PLSExtProc)
 (PRESENTATION = RO)
 )
)
以上修改也可通过图形界面的netmgr和netca进行配置。修改之后,重启监听器
二、下载安装oracle客户端。
在安装pl/sql developer的本地机器上必须安装oracle客户端(此处指针对oracle 10g版本,有说也可只安装相关驱动如oci驱动,
具体不详。并且客户端不一定为10g版本,8i,9i皆可)。
1.从网上下载客户端:
 要有emp.exe和emp.exe功能的客户端
 
2.安装后,并在其下network目录下的admin目录,结构如下
/network/admin,在admin目录中建立tnsnames.ora文件,内容大致如下:
demo1 = #oracle服务名 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.100)(PORT = 1521)) #oracle服务器地址与端口 ) (CONNECT_DATA = (SERVICE_NAME = demo1) ) ) 三、在PL/SQL developer中配置客户端信息。
打开PL/SQL developer,暂不登录,选择菜单tools->preferences->connection,设置如下两项:
 
Oracle Home: D:\Program Files\instantclient_11_1 #客户端解压目录
OCI library: D:\Program Files\instantclient_11_1\oci.dll #oci库文件路径,oci.dll应该在客户端目录下。
 保存,,重启PL/SQL developer,些时应可看到登录框中Database下拉选项里有你刚刚配置的远程服务器上的服务实例demo1了。
 
客户端中 pl/sql developer 中的字符集和数据库中的不一样,要在 客户端 所在系统中的注册表里找到 HKEY_LOCAL_USER/SOFTWARE/ORACLE/KEY_OraClient10g_home10 修改NLS_LANG

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template