listener配置小练习

作业:1521 1526环境里存在一个数据库实例A实现:1521监听A数据库A数据库的信息主动注册到1526监听器上并且通过easy connect和sqlplus sys/oracle@网络服务名 as sysdba 方式验证解析:保证数据库处于open状态,数据库sid=WDD service_name=wsweididi.dba.oracle.com1 配置listener.ora,如下,lsnr1配置了1521端口是静态监听 lsnr2是1526端口是动态监听LSNR2 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.195.60)(PORT = 1526)) ) )LSNR1 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.195.60)(PORT = 1521)) ) )SID_LIST_LSNR1= (SID_LIST= (SID_DESC= (SID_NAME=WDD) (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1) (GLOBAL_DBNAME=wsweididi.dba.oracle.com) ) )2 配置tnsnames.oraLSNR2 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.195.60)(PORT = 1526)) ) )3 此时可以启动静态监听了,如下可以看到静态监听启动成功,1521端口监听数据库WDD信息lsnrctl start lsnr1 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.195.60)(PORT=1521)))Services Summary...Service "wsweididi.dba.oracle.com" has 1 instance(s). Instance "WDD",status UNKNOWN,has 1 handler(s) for this service...The command completed successfully4 由于动态监听是从1526端口接收到的,而数据库默认不找寻找1521以外的其他端口注册数据库,除非修改了local_listener的值alter system set local_listener='LSNR2';5 启动动态监听lsnr2lsnrctl start lsnr2Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.195.60)(PORT=1526)))Services Summary...Service "WDDXDB.dba.oracle.com" has 1 instance(s). Instance "WDD",status READY,has 1 handler(s) for this service...Service "wsweididi.dba.oracle.com" has 1 instance(s). Instance "WDD",has 1 handler(s) for this service...The command completed successfully如果发现是no service状态,可以到数据库里alter system register;进行连接验证,客户端的tnsnames文件配置如下WDD1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.195.60)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = wsweididi.dba.oracle.com) ) ) WDD2 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.195.60)(PORT = 1526)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = wsweididi.dba.oracle.com) ) ) 验证1 sqlplus system/oracle@WDD12 sqlplus system/oracle@WDD23 sqlplus system/oracle@172.16.195.60:1521/wsweididi.dba.oracle.com4 sqlplus system/oracle@172.16.195.60:1526/wsweididi.dba.oracle.com

相关文章

数据库版本:11.2.0.4 RAC(1)问题现象从EM里面可以看到,在23号早上8:45~8:55时,数据库等待会话暴增...
(一)问题背景最近在对一个大约200万行数据的表查看执行计划时,发现存在异常,理论上应该返回100多万...
(一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件。当使用RMAN执行备份操作时,会在RM...
(1)DRA介绍 数据恢复顾问(Data Recovery Advise)是一个诊断和修复数据库的工具,DRA能够修复数据文...
RMAN(Recovery Manager)是Oracle恢复管理器的简称,是集数据库备份(backup)、修复(restore)和恢复...
(1)备份对象 可以使用RMAN进行的备份对象如下: --整个数据库:备份所有的数据文件和控制文件; --数...