码迷,mamicode.com
首页 > 数据库 > 详细

RHEL6.5下oracle11G的监听启动停止

时间:2015-08-02 06:20:24      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

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,而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 ~]$

RHEL6.5下oracle11G的监听启动停止

标签:

原文地址:http://www.cnblogs.com/skylumia/p/4694992.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!