Linux运维•运维日志-oracle(一)监听器篇

前言

oracle11g安装教程:https://mp.csdn.net/postedit/84957034

oracle11g配置教程:https://mp.csdn.net/postedit/84970862

su - oracle 切换到oracle用户,如果使用su oracle,则不启动.profile用户环境配置文件


一、Linux Oracle 11g 监听器操作

  • 监听器的作用:

Oracle监听器是做什么的呢?它设置在服务端,是基于服务端的一种网络服务,用于监听客户端向数据库端发出的连接

请求。判断一下连接请求是否正确,请求有效就连接,失败就拒绝。所以你要连接远程数据库,那么远程数据库就要配置

1)查看监听器命令:

lsnrctl status

输出结果:

[oracle@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-DEC-2018 11:23:41

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                13-DEC-2018 10:41:30
Uptime                    0 days 0 hr. 42 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
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

2)启动监听器

lsnrctl start

输出结果:

[oracle@localhost ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-DEC-2018 11:25:04

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

Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                13-DEC-2018 11:25:04
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

3)停止监听器

lsnrctl stop  

输出结果:

[oracle@localhost ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-DEC-2018 11:24:37

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
The command completed successfully

猜你喜欢

转载自blog.csdn.net/weixin_37973929/article/details/84984008
今日推荐