zoukankan      html  css  js  c++  java
  • alter system register的用法

    转自 http://blog.csdn.net/njyxfw/article/details/7516143

    今天一个同事问到我,有没动态注册监听的命令,查了下,找到了alter system register的用法

    1 Static Registration via set the listener.ora
    2 Dynamic Instance Registration via the PMON

    At instance startup time, the PMON process will use this parameter to locate a listener and
    inform. it of the INSTANCE_NAME and SERVICE_NAMES.

    1 At any time subsequent to instance startup, you can force a re-registration by executing the command
    SQL> alter system register;

    2 You will need to re-register your instance with the listener with “alter system” if you have restarted the listener, or if you started the database instance before starting the listener。(例如,数据库还启动着,这时stop listener,然后启动,就需要手动注册)

    eg:
    LSNRCTL> stop
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=htsolaris.ht.com)(PORT=1521)))
    The command completed successfully

    database is still running... then

    LSNRCTL> start
    Starting /export/home/oracle/product/10.2/bin/tnslsnr: please wait...

    TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
    System parameter file is /export/home/oracle/product/10.2/network/admin/listener.ora
    Log messages written to /export/home/oracle/product/10.2/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htsolaris.ht.com)(PORT=1521)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=htsolaris.ht.com)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
    Start Date                15-OCT-2008 16:35:24
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /export/home/oracle/product/10.2/network/admin/listener.ora
    Listener Log File         /export/home/oracle/product/10.2/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htsolaris.ht.com)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
    Services Summary...
    Service "orcl" has 1 instance(s).-----Static Registration via set the listener.ora
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    Service "plsextproc" has 1 instance(s).
    Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully

    这个时候没有自动的Dynamic Instance Registration 。
    通过手动实现:

    sys@ORA10G>altersystem register;

    System altered.

    这个时候没有自动的Dynamic Instance Registration 。
    通过手动实现:

    sys@ORA10G>altersystem register;

    System altered.

    LSNRCTL> status
    ...
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htsolaris.ht.com)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
    Services Summary...
    Service "ora10g" has 1 instance(s).
    Instance "ora10g", status READY, has 4 handler(s) for this service... ).------------------Dynamic Instance Registration
    Service "ora10g_XPT" has 1 instance(s).
    Instance "ora10g", status READY, has 4 handler(s) for this service...
    Service "orcl" has 1 instance(s
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    Service "plsextproc" has 1 instance(s).
    Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully

  • 相关阅读:
    jquery弹窗居中-类似alert()
    php explode时间分割
    php+mysql+jquery日历签到
    php查找字符串中第一个非0的位置截取
    SQL Server Data Tool 嘹解(了解)一下 SSDT -摘自网络
    Headless MSBuild Support for SSDT (*.sqlproj) Projects [利用msbuild自动化部署 .sqlproj]- 摘自网络
    SSDT – Error SQL70001 This statement is not recognized in this context-摘自网络
    Web Services and C# Enums -摘自网络
    Excel中VBA 连接 数据库 方法- 摘自网络
    解决 Provider 'System.Data.SqlServerCe.3.5' not installed. -摘自网络
  • 原文地址:https://www.cnblogs.com/princessd8251/p/3276715.html
Copyright © 2011-2022 走看看