linux lsnrctl命令不存在,lsnrctl使用大全
lsnrctl start 启动指定的监听器lsnrctl stop关闭指定的监听器lsnrctl status显示监听器的状态。以上仅限单机版本下的操作,RAC下要用crsctl或者srvctl来管理监听。status命令显示监听器是不是活动的,日志与跟踪文件的位置,监听器已经持续运行了多长时间,以及监听器所监听的任务。LSNRCTL for Linux: Version 11.2.0.1...
lsnrctl start 启动指定的监听器lsnrctl stop关闭指定的监听器lsnrctl status显示监听器的状态。
以上仅限单机版本下的操作,RAC下要用crsctl或者srvctl来管理监听。
status命令显示监听器是不是活动的,日志与跟踪文件的位置,监听器已经持续运行了多长时间,以及监听器所监听的任务。LSNRCTL for Linux: Version 11.2.0.1.0 - Production
on 03-JUN-2013 15:55:00
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to
(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version
11.2.0.1.0 - Production
Start Date 03-JUN-2013 10:57:39
Uptime 0 days 4 hr. 57 min. 21 sec
Trace Level
off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/grid/11.2.0/network/admin/listener.ora
Listener Log File
/app/grid/crs/diag/tnslsnr/rac02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.202)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.205)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance
"+ASM2", status READY, has 1 handler(s) for this service...
Service "racdb" has 1 instance(s).
Instance
"racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB" has 1 instance(s).
Instance
"racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
services列举监听器的服务信息,比如这些服务是否有任何专用的预生成服务器进程或与之相关的调度进程,以及每个服务已有多少连接被接受或拒绝。这种方法用来检查一个监听器是否在监听一个指定服务。列出服务的一个汇总表及为每个协议服务处理程序所建立和拒绝的连接信息个数。LSNRCTL> services racdb
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racdb-scan)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=racdb)))
Services Summary...
Service "racdb" has 2 instance(s).
Instance
"racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:4 refused:0 state:ready
REMOTE SERVER
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac01-vip)(PORT=1521)))
Instance
"racdb2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:5 refused:0 state:ready
REMOTE SERVER
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac02-vip)(PORT=1521)))
Service "racdbXDB" has 2 instance(s).
Instance
"racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=rac01)(PORT=9358))
Instance
"racdb2", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=rac02)(PORT=40073))
The command completed successfully
version显示oracle net软件与协议适配器的版本
reload重新装入监听器,重新读取listener.ora文件,但不关闭监听器。如果该文件发生了变化,重新刷新监听器。
save_config当从lsnrctl工具中对listener.ora文件进行了修改时,复制一个叫做listener.bak的listener.ora的文件
trace打开监听器的跟踪特性
change_password允许用户修改关闭监听器所需要的密码
quit退出lsnrctl实用工具
exit退出lsnrctl实用工具
set*password指定在lsnrctl命令行工具中执行管理任务所需要的密码rawmode
displaymode
trc_file指定监听器跟踪信息的位置。默认设置是$ORACLE_HOME\network\trace\listener.trctrc_directory
trc_level跟踪级别OFF -未启用跟踪功能。OFF为默认设置。USER -将跟踪设置为用户的相应级别。跟踪以标识用户导致的错误条件。ADMIN -将跟踪设置为数据库管理员的相应级别。跟踪以标识特定的安装问题。SUPPORT -将跟踪设置为客户支持人员的相应级别。跟踪文件可能会变得很大。Oracle Corporation建议在不进行网络问题诊断时关闭跟踪功能。log_file指定一个监听器将把日志信息写到哪里。这个参数在默认的情况下是ON,并默认为%oracle_home%\network\log\listener.loglog_directory
log_status
current_listener
inbound_connect_timeout定义监听器在一个会话得到启动时将等待的有效响应时间。默认设置为10秒。startup_waittime定义监听器在响应lsnrctl命令行工具中的一条status命令之前将等待多长时间。save_config_on_stop指定在一个lsnrctl会话期内所发生的修改在退出时是否应该被保存起来。show*rawmode显示关于status和service的较详细信息(当他们设置成on时)值为ON或OFFdisplaymode把lsnrctl工具的显示模式设置成raw、compact、normal或verbose服务显示模式为NORMALrules
trc_file指定监听器跟踪信息的位置。默认设置是$ORACLE_HOME\network\trace\listener.trc正在连接到(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux)(PORT=3521)))listener2参数\trc_file\被设为listener2.trc命令执行成功trc_directory
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter "trc_directory" set to
/app/grid/crs/diag/tnslsnr/rac02/listener/trace
The command completed successfully
trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter "trc_level" set to
off
The command completed successfullylog_file指定一个监听器将把日志信息写到哪里。这个参数在默认的情况下是ON,并默认为%oracle_home%\network\log\listener.logConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter "log_file" set to
/app/grid/crs/diag/tnslsnr/rac02/listener/alert/log.xml
The command completed successfully
log_directoryConnecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter "log_directory" set to
/app/grid/crs/diag/tnslsnr/rac02/listener/alert
The command completed successfully
log_status
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter "log_status" set to ON
The command completed successfully
current_listener目前的监听器为listener2inbound_connect_timeout定义监听器在一个会话得到启动时将等待的有效响应时间。默认设置为10秒。$ oerr ora 12525
12525, 00000, "TNS:listener has not received
client's request in time allowed"
// *Cause: The listener disconnected the client
because the client failed to
// provide the necessary connect information within
the allowed time interval.
// This may be a result of network/system delays;
or this may indicate that a
// malicious client is trying to cause a Denial of
Service attack on the
// listener.
// *Action: If the error occurred because of a
slow network/system,
// reconfigure INBOUND_CONNECT_TIMEOUT to a larger
value. If a malicious
// client is suspected, use the address in
listener.log to identify the
// source and restrict access. Turn on tracing for
more information.
// *Comment: The logged address in listener.log
may not be reliable as it
// can be forged at the lower networking layers
(e.g. in the case of TCP/IP).
startup_waittime定义监听器在响应lsnrctl命令行工具中的一条status命令之前将等待多长时间。Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter "startup_waittime"
set to 0
The command completed successfully
snmp_visiblesave_config_on_stop指定在一个lsnrctl会话期内所发生的修改在退出时是否应该被保存起来。Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
LISTENER parameter
"save_config_on_stop" set to OFF
The command completed successfully
更多推荐
所有评论(0)