• 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
  • 相关阅读:
    java正则表达式
    SpringAOP03 项目脚手架、自定义注解、织入切面、引介增强
    SpringAOP02 自定义注解
    servlet01 项目demo、servlet生命周期
    SpringBoot15 sell02 订单模块
    SpringBoot15 sell01 项目创建、MySQL数据库连接、日志配置、开发热部署、商品信息模块
    datatables01 安装、数据源、选中行事件、新增一行数据、删除一行数据
    Navicat 连接阿里云的 MySQL
    linux内核中ip,tcp等头的定义(转)
    TCPflow:在Linux中分析和调试网络流量的利器(转)
  • 原文地址:https://www.cnblogs.com/skylumia/p/4694992.html
Copyright © 2020-2023  润新知