Oracle static monitoring note for specific explanations
There are a lot of articles on the Internet about Oracle monitoring static register. But most of them are simply said, and there are no specific examples. Here, combine the Oracle 10gr2.0.1 under Linux AS4 to give a specific example
1. Add a static register node to the $ORACLE _home/network/admin/listener.ora file
[[Email protected] oracle]$ CD $ORACLE _home/network/admin[[email protected] admin]$ VI listener.ora# listener.ora Network Configuration File:/mydatafile2/app/oracle/oracle/product/11.2.0/db_1/network/admin/listener.ora# Generated by Oracle configuration tools. Sid_list_listener = (sid_list = ( Sid_desc = (sid_name = Plsextproc) (oracle_home =/mydatafile2/app/ oracle/oracle/product/11.2.0/db_1) (Program = extproc) ) (Sid_desc = (sid_name = ORCL) (oracle_ HOME =/mydatafile2/app/oracle/oracle/product/11.2.0/db_1) (global_dbname=woo.com) ) LISTENER = ( description_list = (DESCRIPTION = ( address = (PROTOCOL = IPC) (KEY = EXTPROC1)) (address = ( PROTOCOL = TCP) (HOST = prudent) (PORT = 1521)) )
NoteHere's global_dbname=woo.com
SID_NAME=ORCL
This sid_name should be consistent with the $ORACLE _sid you provide services to the outside.
[Email protected] admin]$ echo $ORACLE _sid ORCL
2. Configure the nodes in the corresponding Tnsnames.ora
[Email protected] admin]$ vi tnsnames.ora# tnsnames.ora Network Configuration File:/mydatafile2/app/oracle/oracle/ product/11.2.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools. Orcl= (DESCRIPTION = ( ADDRESS = (PROTOCOL = TCP) (HOST = prudent) (PORT = 1521)) (Connect_data = (SERVER = D edicated) (service_name = ORCL) ) ) wooorcl= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = Prudent) (PORT = 1521)) (Connect_data = (SERVER = dedicated) (service_name = woo.com) ) )
The service_name=woo.com in Tnsname WOOORCL
The service name here is woo.com instead of the usual ORCL, as woo.com,lsnrctl boot will be monitored woo.com because it has been registered in Listener.ora. and corresponding to the SID_NAME=ORCL.
3. Start Monitoring and service
[[email protected] oracle]$ cat dbstartlsnrctl startsqlplus/nolog <<eofconnect/as sysdbastartupEOF[[email protected] oracle]$./dbstartlsnrctl for linux:version 11.2.0.1.0-production on 13-feb-2011 20:11:15Copyright (c) 1991, 2005, Oracle. All rights reserved. Starting/mydatafile2/app/oracle/oracle/product/11.2.0/db_1/bin/tnslsnr:please wait ... Tnslsnr for linux:version 11.2.0.1.0-productionsystem parameter file is/mydatafile2/app/oracle/oracle/product/11.2.0 /db_1/network/admin/listener.oralog messages Written To/mydatafile2/app/oracle/oracle/product/11.2.0/db_1/network /log/listener.loglistening on: (Description= (Address= (PROTOCOL=IPC) (Key=extproc1)) Listening on: (Description= ( Address= (PROTOCOL=TCP) (host=prudent) (port=1521)) Connecting to (Description= (address= (PROTOCOL=IPC) (KEY=EXTPROC1 )) STATUS of the LISTENER------------------------Alias listenerversion Tnslsnr for L Inux:version 11.2.0.1.0-productionstart Date 13-feb-2011 20:11:15uptime 0 days 0 hr. 0 min. 0 sectrace Level Offsecurity On:local OS authenticationsnmp Offlistener Parameter file/mydatafile2/app/oracle/o Racle/product/11.2.0/db_1/network/admin/listener.oralistener Log file/mydatafile2/app/oracle/oracle/product/11.2 .0/db_1/network/log/listener.loglistening Endpoints Summary ... (Description= (address= (PROTOCOL=IPC) (Key=extproc1))) (Description= (address= (protocol=tcp) (host=prudent) (port=1521))) Services Summary ... Service "Woo.com" has 1 instance (s). Instance "ORCL", status UNKNOWN, have 1 handler (s) for the This service ... Service "ORCL" has 1 instance (s). Instance "ORCL", status UNKNOWN, have 1 handler (s) for the This service ... Service "Plsextproc" has 1 instance (s). Instance "Plsextproc", status UNKNOWN, have 1 handler (s) for the This service ... The command completed Successfullysql*plus:release 11.2.0.1.0-production on Sun Feb 20:11:16 2011CopyrIght (c) 1982, 2005, Oracle. All rights reserved. Sql> Connected to an idle instance. sql> ora-32004:obsolete and/or deprecated parameter (s) Specifiedoracle instance started. Total System Global area 461373440 bytesfixed size 1220000 bytesvariable size 75498080 byte Sdatabase buffers 381681664 Bytesredo buffers 2973696 bytesdatabase mounted. Database opened. Sql> disconnected from Oracle Database 10g Enterprise Edition Release 11.2.0.1.0-productionwith the partitioning, OLA P and Data Mining options
can see
Service "woo.com" has 1 instance (s).
Instance "ORCL", status UNKNOWN, have 1 handler (s) for the This service ...
is being monitored.
4, verify that the service can reach
[[email protected] oracle]$ tnsping wooorcltns Ping Utility for linux:version 11.2.0.1.0-production on 13-feb-2011 20:1 4:59copyright (c) 1997, 2005, Oracle. All rights reserved. Used parameter files:/mydatafile2/app/oracle/oracle/product/11.2.0/db_1/network/admin/sqlnet.oraused TNSNAMES Adapter to resolve the aliasattempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = prudent) (PORT = 1521)) (Connect_data = (SERVER = dedicated) (service_name = woo.com))) OK (Ten msec)
5. Log in to Oracle using a static registration service
[[Email protected]rudent oracle]$ sqlplus system/[email protected]sql*plus:release 11.2.0.1.0-production on Sun Feb 13 20:17:27 2011Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to:oracle Database 10g Enterprise Edition Release 11.2.0.1.0-productionwith The partitioning, OLAP and Data Mi Ning optionssql> Select COUNT (*) from Date_log; COUNT (*)----------sql>
At this point: the static register has been verified to be successfully parsed, monitored, and connected.
Oracle static monitoring note for specific explanations