zoukankan      html  css  js  c++  java
  • RHEL6.5下oracle11G的监听启动停止

    1.oracle 11G监听配置文件的路径
      图形界面下的监听和数据库配置命令:
      #netca   监听
      #dbaca   数据库创建和配置。

    /u01/app/oracle/product/11.2.0/db_1/network/admin


    当然oracle的路径不是绝对就和上面的一样,但是oracle在linux下安装配置都会设置环境变量。


    cd $ORACLE_HOME or cd $ORACLE_BASE


    $ORACLE_HOME下面就可以找到network/admin中的监听配置文件。


    [oracle@redhat admin]$ ls
    listener1507241PM4645.bak  listener.ora               tnsnames1507244PM5648.bak
    listener1507241PM4920.bak  samples                    tnsnames1507244PM5827.bak
    listener1507243PM1207.bak  shrept.lst                 tnsnames.ora
    listener1507244PM5648.bak  tnsnames1507241PM4920.bak
    listener1507244PM5827.bak  tnsnames1507243PM1207.bak


    ps:listener.ora中的host和tnsname.ora中的host要一致才行,当然做个/etc/hosts
    的临时主机名解析也可以,listener.ora中是ip(hostname 也没问题),而tnsname.ora中是hostname

    2.监听启动停止和查看状态的命令。
    ps:监听启动是需要时间的。
    #lsnrctl stop
    #lsnrctl start
    #lsnrctl status 

    ps:如果有多个监听程序名,也可以查看特定的监听名称状态:lsnrctl status/stop/start listener1

    [oracle@redhat ~]$ lsnrctl stop

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-JUL-2015 10:22:54

    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat)(PORT=1521)))
    The command completed successfully
    [oracle@redhat ~]$ lsnrctl start

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-JUL-2015 10:23:03

    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

    Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

    TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Log messages written to /u01/app/oracle/diag/tnslsnr/redhat/listener/alert/log.xml
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1521)))

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date                27-JUL-2015 10:23:03
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/diag/tnslsnr/redhat/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1521)))
    The listener supports no services
    The command completed successfully
    [oracle@redhat ~]$
    [oracle@redhat ~]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-JUL-2015 10:38:11

    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=redhat)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date                27-JUL-2015 10:33:42
    Uptime                    0 days 0 hr. 4 min. 28 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/diag/tnslsnr/redhat/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=redhat)(PORT=1521)))
    Services Summary...
    Service "orcl" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [oracle@redhat ~]$

    you can do everything what you want but must be hold on
  • 相关阅读:
    第二部分:并发工具类17->ReadWriteLock:如何快速实现一个完备的缓存
    第二部分:并发工具类16->Semaphore:如何快速实现一个限流器
    第二部分:并发工具类15->Lock和condition(下)
    一款类似B站的开源弹幕播放器,太酷了
    2021年基础知识点复习
    Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.MiniProgramAppServiceProxy.
    一张图解析FastAdmin中的弹出窗口的功能
    vue 关闭代码严格模式,轻松运行
    vue项目严格模式下的常见错误
    mysql下载安装包及安装步骤
  • 原文地址:https://www.cnblogs.com/skylumia/p/4694992.html
Copyright © 2011-2022 走看看