lsnrctl使用

中止指定監聽:lsnrctl stoplinux

啓動指定監聽:lsnrctl start數據庫

殺掉指定監聽進程:kill -9 進程ID服務器

監聽狀態:lsnrctl status --Status命令顯示監聽器是否是活動的,日誌與跟蹤文件的位置,監聽器已經持續運行了多長時間,以及監聽器所監聽的任務。網絡

[tmdata2:smis:/home/smis]lsnrctl statusoracle

LSNRCTL for HPUX: Version 10.2.0.1.0 - Production on 11-SEP-2009 09:45:59app

Copyright (c) 1991, 2005, Oracle. All rights reserved.tcp

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tmdata2)(PORT=1521)))ide

STATUS of the LISTENER工具

 

Alias(別名) LISTENERui

Version TNSLSNR for HPUX: Version 10.2.0.1.0 - Production

Start Date 25-AUG-2009 11:28:56

Uptime(啓動日期) 16 days 22 hr. 17 min. 2 sec

Trace Level(跟蹤級別) off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /oracle/product/10.2.0/db_1/network/admin/listener.or

Listener Log File /oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tmdata2)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

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...

Service "orcl_XPT" has 1 instance(s).

Instance "orcl", status READY, has 1 handler(s) for this service...

The command completed successfully

[tmdata2:smis:/home/smis]services lsnr_hndw

sh: services: Execute permission denied.

lsnrctl services --列舉監聽器的服務信息,好比這些服務是否有任何專用的預生成服務器進程或與之相關的調度進程,以及每一個服務已有多少鏈接被接受或拒絕。這種方法用來檢查一個監聽器是否在監聽一個指定服務。列出服務的一個彙總表及爲每一個協議服務處理程序所創建和拒絕的鏈接信息個數。

version --顯示oracle net軟件與協議適配器的版本

reload --從新裝入監聽器,從新讀取listener.ora文件,但不關閉監聽器。若是該文件發生了變化,從新刷新監聽器。

change_config --當從lsnrctl工具中對listener.ora文件進行了修改時,複製一個叫作listener.bak的listener.ora的文件

trace --打開監聽器的跟蹤特性

quit --退出lsnrctl實用工具

exit --退出lsnrctl實用工具

set*

password --指定在lsnrctl命令行工具中執行管理任務所須要的密碼

rawmode

displaymode

trc_file --指定監聽器跟蹤信息的位置。默認設置是$ORACLE_HOME\network\trace\listener.trc

trc_directory

trc_level --跟蹤級別

OFF --未啓用跟蹤功能。OFF 爲默認設置。

USER --將跟蹤設置爲用戶的相應級別。跟蹤以標識用戶致使的錯誤條件。

ADMIN --將跟蹤設置爲數據庫管理員的相應級別。跟蹤以標識特定的安裝問題。

SUPPORT --將跟蹤設置爲客戶支持人員的相應級別。 跟蹤文件可能會變得很大。

Oracle Corporation --建議在不進行網絡問題診斷時關閉跟蹤功能。

log_file

指定一個監聽器將把日誌信息寫到哪裏。這個參數在默認的狀況下是ON,並默認爲%oracle_home%\network\log\listener.log

log_directory

log_status

current_listener

inbound_connect_timeout

定義監聽器在一個會話獲得啓動時將等待的有效響應時間。默認設置爲10秒。

startup_waittime

定義監聽器在響應lsnrctl命令行工具中的一條status命令以前將等待多長時間。

save_config_on_stop

指定在一個lsnrctl會話期內所發生的修改在退出時是否應該被保存起來。

show*

rawmode

顯示關於status和service的較詳細信息(當他們設置成on時)值爲ON或OFF

displaymode

把lsnrctl工具的顯示模式設置成raw、compact、normal或verbose

服務顯示模式爲NORMAL

rules

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=TCP)(HOST=130.76.1.41)(PORT=3521))

)

lsnr_hndw parameter "trc_directory" set to /oracle/app/oracle/product/920/networ

k/trace/

The command completed successfully

trc_level

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.76.1.41)(PORT=3521))

)

lsnr_hndw parameter "trc_level" set to off

The command completed successfully

log_file

指定一個監聽器將把日誌信息寫到哪裏。這個參數在默認的狀況下是ON,並默認爲%oracle_home%\network\log\listener.log

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.76.1.41)(PORT=3521))

)

lsnr_hndw parameter "log_file" set to lsnr_hndw.log

The command completed successfully

log_directory

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.76.1.41)(PORT=3521))

)

lsnr_hndw parameter "log_directory" set to /oracle/app/oracle/product/920/networ

k/log/

The command completed successfully

log_status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.76.1.41)(PORT=3521))

)

lsnr_hndw parameter "log_status" set to ON

The command completed successfully

current_listener

目前的監聽器爲 listener2

inbound_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命令以前將等待多長時間。

正在鏈接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux)(PORT=3521)))

listener2 參數 \startup_waittime\ 被設爲 0

命令執行成功

nbound_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命令以前將等待多長時間。

正在鏈接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux)(PORT=3521)))

listener2 參數 \startup_waittime\ 被設爲 0

命令執行成功

相關文章
相關標籤/搜索