1.查看监听状态

lsnrctl status

2.停止监听

lsnrctl stop

3.修改配置文件

vi $ORACLE_HOME/network/admin/listener.ora

4.listener.ora配置文件内容:

LISTENER =
  (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=tcp)(HOST=samsone)(PORT=9999))
        (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
        
SID_LIST_LISTENER=
 (SID_LIST=
  (SID_DESC=
   (SID_NAME=orcl)
   (ORACLE_HOME=//mnt/etc/lost/u01/app/oracle/product/11.2.0.4/db_1)
   )
  )

5.登录oracle并修改local_listener参数

alter system set local_listener="(address = (protocol = tcp)(host = samsone)(port = 9999))";

6.查看local_listener参数

show parameter local_listener

7.启动监听

lsnrctl start

8.查看端口是否已连接

netstat -an|grep 9999
lsnrctl status

Related Posts