zoukankan      html  css  js  c++  java
  • 修改默认监听

    oracle 监听器如果使用动态注册的话,默认只能动态注册1521端口

    如果要修改端口号:必须修改数据库中的参数

    local_listener

    如下:

    1. 监听文件

    db11@oracle /u01/app/oracle11g/product/11.2.0/dbhome_1/network/admin$ vi listener.ora 
    LISTENER =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.100)(PORT=1526))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))

    2. 修改参数

    SQL> show parameter listener
    
    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    listener_networks string
    local_listener string
    remote_listener string
    
    SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.100)(PORT=1526))';
    
    System altered.
    
    SQL> show parameter listener
    
    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    listener_networks string
    local_listener string (ADDRESS=(PROTOCOL=tcp)(HOST=1
    92.168.2.100)(PORT=1526))
    remote_listener string
    SQL>

    3. 查看状态

    db11@oracle /u01/app/oracle11g/product/11.2.0/dbhome_1/network/admin$ lsnrctl status
    
    LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 21-JAN-2015 23:56:43
    
    Copyright (c) 1991, 2013, Oracle. All rights reserved.
    
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.100)(PORT=1526))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
    Start Date 21-JAN-2015 23:54:50
    Uptime 0 days 0 hr. 1 min. 53 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/oracle11g/product/11.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File /u01/app/oracle11g/diag/tnslsnr/oracle/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.100)(PORT=1526)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    Services Summary...
    Service "db11" has 1 instance(s).
    Instance "db11", status READY, has 1 handler(s) for this service...
    Service "db11XDB" has 1 instance(s).
    Instance "db11", status READY, has 1 handler(s) for this service... -----已经注册进去
    The command completed successfully

    4. 测试连接

    db11@oracle /u01/app/oracle11g/product/11.2.0/dbhome_1/network/admin$ sqlplus hxy/hxy@192.168.2.100:1526/db11
    
    SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 22 00:00:24 2015
    
    Copyright (c) 1982, 2013, Oracle. All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> 
  • 相关阅读:
    Rasp技术介绍与实现(一)
    青藤云安全细述:三大云安全工具(CASB、CSPM、CWPP)的使用场景
    CWPP产品市场演进
    Global CyberSecurity Landscape
    Scala学习之路 (五)Scala的关键字Lazy
    Scala学习之路 (四)Scala的数组、映射、元组、集合
    Scala学习之路 (三)Scala的基本使用
    Scala学习之路 (二)使用IDEA开发Scala
    Scala学习之路 (一)Scala的安装
    Azkaban学习之路 (三)Azkaban的使用
  • 原文地址:https://www.cnblogs.com/haoxiaoyu/p/4502915.html
Copyright © 2011-2022 走看看