PL/SQL配置连接远程数据库
tnsnames.ora Network Configuration File: H:\app\JJ\product\11.2.0\dbhome_1\network\admin\tnsnames.ora#远程数据库tnsnames。(ENVS = "EXTPROC_DLLS=ONLY:H:\app\JJ\product\11.2.0\dbhome_1\bin\oraclr11.dll")#远程数据
1、在PL/SQL的安装路径中放入"instantclient_11_2"文件,这个文件中配置了远程数据路的配置信息。
listener.ora文件
# listener.ora Network Configuration File: H:\app\JJ\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = H:\app\JJ\product\11.2.0\dbhome_1) #远程数据库的位置
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:H:\app\JJ\product\11.2.0\dbhome_1\bin\oraclr11.dll") #远程数据库的位置
)
(SID_DESC=
(SID_NAME = ORCL)
(ORACLE_HOME = H:\app\JJ\product\11.2.0\dbhome_1) #远程数据库的位置
(GLOBAL_DBNAME = ORCL))
)LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.22.199)(PORT = 1521)) #远程数据库的ip和端口
)
)ADR_BASE_LISTENER = H:\app\JJ
tnsnames.ora文件
# tnsnames.ora Network Configuration File: H:\app\JJ\product\11.2.0\dbhome_1\network\admin\tnsnames.ora #远程数据库tnsnames。ora文件位置
# Generated by Oracle configuration tools.LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.22.199)(PORT = 1521)) #远程数据库IP和端口
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.22.199)(PORT = 1521)) #远程数据库IP和端口
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
2、计算机环境配置:
新建变量名:NLS_LANG
变量值: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
新建变量名:ORACLE_HOME
变量值: 本机配置的instantcliet_*_*的路径
新建变量名:TNS_ADMIN
变量值: 本机配置的instantcliet_*_*路径\NETWORK\ADMIN
instantclietn文件
更多推荐
所有评论(0)