Home > Database > Mysql Tutorial > body text

PLSQL 连接 Oracle简单配置

WBOY
Release: 2016-06-07 17:25:14
Original
1744 people have browsed it

PLSQL工作依赖于 OCI.DLL 和其他一些Client带的文件,所以必须提供.通过环境变量 TNS_ADMIN找到LISTENER.ORA, tnsnames.oRA,从而建

思路: PLSQL工作依赖于 OCI.DLL 和其他一些Client带的文件,所以必须提供. 通过环境变量 TNS_ADMIN找到LISTENER.ORA, tnsnames.oRA,从而建立连接.

步骤:

1.安装Oracle_client

2. 进入PLSQL 设置 OCI.DLL 文件路径和其所在目录的路径

3. 在ocl.dll同目录建立一个 NETWORK目录,该目录中建立ADMIN目录.

4. 新建两个文件 LISTENER.ORA, tnsnames.oRA(记事本改后缀名即可)

LISTENER.ORA内容:

LISTENER =

 

(DESCRIPTION_LIST =

 

(DESCRIPTION =

 

(ADDRESS = (PROTOCOL = TCP)(HOST = bjyw-zhugecs3.360buyAD.local)(PORT = 1521)) # bjyw-zhugecs3.360buyAD.local 本机的计算机全名

 

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

 

)

 

(SID_DESC =

 

# 数据库名

 

(GLOBAL_DBNAME = mydb)

 

#本机的oracle安装路径

 

(ORACLE_HOME = D:\app\weihaifeng\product\11.1.0\db_1)

 

# 数据库实例名 和sid保持一致

 

(SID_NAME = mydb)

 

)

 

)

 

tnsnames.oRA(配置数据名称和ip地址的对应关系) 内容

 

#PLSQL 启动的时候 数据库名称

 

MYDB =

 

(DESCRIPTION =

 

(ADDRESS_LIST =

 

#数据库IP 和端口

 

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.144.188)(PORT = 1521))

 

)

 

(CONNECT_DATA =

 

#数据库实例

 

(SERVICE_NAME = mydb)

 

)

 

)

 

即可.

linux

Related labels:
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