oracle--本地网络配置tnsnames.ora和监听器listener.ora

时间:2021-10-12 17:09:04

文件tnsnames.ora 是给orcl客户端使用

配置本地网络服务:(客户端)
第一种使用暴力方式直接操作:
修改:C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora ORCL = >网络服务名
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 服务器ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

  

oracle--本地网络配置tnsnames.ora和监听器listener.ora

实例

ww =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-7719O7O)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

  oracle--本地网络配置tnsnames.ora和监听器listener.ora

 listener.ora

监听连接请求的,相当于秘书

当你请求别人的orcl时候,就会经过这个监听程序

# listener.ora Network Configuration File: D:\ItSoftWareInstalled\oracle\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 = D:\ItSoftWareInstalled\oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\ItSoftWareInstalled\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
) LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-7719O7O)(PORT = 1521))
)
) ADR_BASE_LISTENER = D:\ItSoftWareInstalled\oracle

 如果出现如下错误,多半是windows问题,在文件中添加如下代码

oracle--本地网络配置tnsnames.ora和监听器listener.ora

第一种使用暴力方式直接操作:
修改:C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora ORCL = >网络服务名
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 服务器ip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
第二种方式:
使用图形界面:NCA
配置监听器:(服务器端)
常见问题:
配置监听器,计算机名必须是英文的