ORACLE监听

oracle数据库通过监听程序来处理通过网络访问数据库的客户端请求

通过netca或mgrca添加并配置监听和本地网络服务名;

1.监听:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = wlf-pc)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

2.本地网络服务名:

RMAN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = wlf-pc)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rman)
    )
  )

在监听上注册服务(监听程序根据提供的服务名,找到在监听器上注册此服务的实例):

1.静态注册:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = rman)
      (ORACLE_HOME = D:\app\wlf\product\11.2.0\dbhome_1)
      (SID_NAME = rman1)
    )
  )

2.动态注册:

相关参数:service_names,local_listener

oracle后台进程pmon会动态向监听器中以数据库名作服务名注册服务,并且默认的监听必须是在1521端口上的监听;

当提供service_names参数(可以为多个值,sercie_name='orac1,orac2')时,pmon进程会将此参数提供的服务名在监听程序中注册;

当监听程序不在本地主机或是非1521默认端口,需设置local_listener参数告知pmon监听在何处:

a.ALTER SYSTEM SET LOCAL_LISTENER ='(ADDRESS = (PROTOCOL = TCP)(HOST = wlf-pc)(PORT = 1526))' SCOPE=BOTH;

b.先在tnsnames.ora文件中添加一下内容:LISTENER =(ADDRESS = (PROTOCOL = TCP)(HOST = wlf-pc)(PORT = 1526))

然后修改参数:ALTER SYSTEM SET LOCAL_LISTENER='LISTENER' SCOPE=BOTH;


你可能感兴趣的:(oracle,网络组件)