zoukankan      html  css  js  c++  java
  • 自动注册1521和非1521的服务

    方法1:
     
    [oracle@PROD admin]$ more listener.ora 

    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
          (PROGRAM = extproc)
        )
      )

    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        )
      )

    LSNR2 =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1526))
        )
      )

    SID_LIST_LSNR2 =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PROD)
          (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
        )
      )

    PROD_S =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1526))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = PROD)
        )
      )

    PROD =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = PROD)
        )
      )

    [oracle@PROD admin]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Aug 25 19:20:04 2012

    Copyright (c) 1982, 2005, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options

    SQL> alter system set remote_listener='PROD_S';

    SQL> show parameter lis

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    local_listener                       string   
    recovery_parallelism                 integer     0
    remote_listener                      string    PROD_S
     
    方法2:
    [oracle@PROD admin]$ more listener.ora 

    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
          (PROGRAM = extproc)
        )
      )

    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        )
      )

    LSNR2 =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1526))
        )
      )

    SID_LIST_LSNR2 =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PROD)
          (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
        )
      )


    [oracle@PROD admin]$ more tnsnames.ora 

    LISTENER_PROD=
         (ADDRESS_LIST=
          (ADDRESS=(PROTOCOL=TCP)(HOST=PROD)(PORT=1521)
          (ADDRESS=(PROTOCOL=TCP)(HOST=PROD)(PORT=1526))

    PROD_D =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = PROD)(PORT = 1526))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = PROD)
        )
      )

    [oracle@PROD admin]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Aug 25 19:20:04 2012

    Copyright (c) 1982, 2005, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options

    SQL> alter system set local_listener='PROD_D';

    SQL> show parameter lis

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    local_listener                       string      PROD_D
    recovery_parallelism                 integer     0
    remote_listener                      string
     
     


  • 相关阅读:
    c++ 中bool 的默认值
    cocos2d CCLOG格式符号表
    c++数组指针bug
    cocos2d-x-2.2.6创建工程
    Nape实现坐标旋转角度回弹
    haxe 中使用音效
    haxe 嵌入swf 读取里面的内容
    haxe 配置
    Spring Tool Suite(STS)基本安装配置
    git提交忽略文件.gitignore内容
  • 原文地址:https://www.cnblogs.com/nolanchan/p/8016311.html
Copyright © 2011-2022 走看看