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> 
  • 相关阅读:
    前端面试集锦
    nodeJs上传附件
    逻辑于 逻辑或
    webpack 学习笔记 (一)
    yum 安装mongodb mysql
    闭包面试提 (2)
    主动的重要性
    1.1一天一题:逆转字符串
    编程提高:一天一道编程题
    iconv将文件编码从gb2312 转换为utf-8
  • 原文地址:https://www.cnblogs.com/haoxiaoyu/p/4502915.html
Copyright © 2011-2022 走看看