下面为您介绍的是oracle服务端和客户端之间的网络监听设置,如果您在oracle服务端和客户端之间的网络监听设置方面遇到过类似的问题,不妨一看。
oracle服务端和客户端之间的网络监听设置
假如我现在有两个数据库kkman和orcl,现在我想在服务端设立两个监听来处理从客户端发过来的连接请求。
-----------------------------------------------------------------
***种多端口监听
1.服务端listener.ora配置
- # listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
- # Generated by Oracle configuration tools.
- SID_LIST_LISTENERORCL =
- (SID_LIST =
- (SID_DESC =
- (GLOBAL_DBNAME = ORCL)
- (SID_NAME = ORCL)
- )
- (SID_DESC =
- (GLOBAL_DBNAME = KKMAN)
- (SID_NAME = KKMAN)
- )
- )
- LISTENER =
- (DESCRIPTION_LIST =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP)(HOST = rac02)(PORT = 1521))
- (ADDRESS = (PROTOCOL = TCP)(HOST = rac02)(PORT = 1522))
- )
- )
2.服务端和客户端tnsnames.ora配置
- # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
- # Generated by Oracle configuration tools.
- KKMAN =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1522))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = KKMAN)
- )
- )
- ORCL =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = orcl)
- )
- )
3.重新启动监听
在服务端打开cmd运行:lsnrctl stop和lsnrctl start
--------------------------------------------------------------------------------
2.多监听单端口
1.服务端listener.ora配置
- # listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
- # Generated by Oracle configuration tools.
- SID_LIST_LISTENERORCL =
- (SID_LIST =
- (SID_DESC =
- (GLOBAL_DBNAME = ORCL)
- (SID_NAME = ORCL)
- )
- (SID_DESC =
- (GLOBAL_DBNAME = KKMAN)
- (SID_NAME = KKMAN)
- )
- )
- LISTENER =
- (DESCRIPTION_LIST =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP)(HOST = rac02)(PORT = 1521))
- )
- )
2.服务端和客户端tnsnames.ora配置
- # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
- # Generated by Oracle configuration tools.
- KKMAN =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = KKMAN)
- )
- )
- ORCL =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = orcl)
- )
- )
3.重新启动监听
在服务端打开cmd运行:lsnrctl stop和lsnrctl start
【编辑推荐】