• 修改默认端口号


    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)))
    
    1. 修改参数
    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>
    
    1. 查看状态
    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
    
    1. 测试连接
    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> 
    
  • 相关阅读:
    scratch少儿编程第一季——04、想要做到有的放矢,瞄准方向很重要
    scratch少儿编程第一季——02、scratch界面介绍
    scratch少儿编程第一季——01、初识图形化界面编程的神器
    Scratch—点亮生日蜡烛
    scratch少儿编程——03、动作:运动的开始,游戏的基础。
    画一个秘密花园 | Scratch 3.0 艺术项目
    scratch少儿编程第一季——01、初识图形化界面编程的神器
    scratch少儿编程第一季——02、scratch界面介绍
    mysql优化一之查询优化
    mysql优化二之锁机制
  • 原文地址:https://www.cnblogs.com/haoxiaoyu/p/4502893.html
Copyright © 2020-2023  润新知