Installation environment:
Oracle_HOME =/home/oracle/product/11.2.0/db_1
The ORACLE_HOME/network/admin/listener. ora file is as follows:
- # Listener. ora Network Configuration File:/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
- # Generated by Oracle configuration tools.
- SID_LIST_LISTENER =
- (SID_LIST =
- (SID_DESC =
- (GLOBAL_DBNAME = sqtest)
- (ORACLE_HOME =/home/oracle/product/11.2.0/db_1)
- (SID_NAME = sqtest)
- )
- )
- LISTENER =
- (DESCRIPTION =
- (ADDRESS = (PROTOCOL = TCP) (HOST = drum) (PORT = 1521 ))
- )
- ADR_BASE_LISTENER =/home/oracle
The ORACLE_HOME/network/admin/tnsnames. ora file is as follows:
- # Tnsnames. ora Network Configuration File:/home/oracle/product/11.2.0/db_1/network/admin/tnsnames. ora
- # Generated by Oracle configuration tools.
- Sqltest =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
- )
- (CONNECT_DATA =
- (SID = sqtest)
- )
- )
Run lsnrctl start. The result is as follows:
- TNSLSNR for Linux: Version 11.2.0.1.0-Production
- System parameter file is/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
- Log messages written to/home/oracle/diag/tnslsnr/drum/listener/alert/log. xml
- Listening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = drum.smartquick.com.cn) (PORT = 1521 )))
- Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = drum) (PORT = 1521 )))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER
- Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
- Start Date 27-JUL-2012 14:48:11
- Uptime 0 days 0 hr. 0 min. 0 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
- Listener Log File/home/oracle/diag/tnslsnr/drum/listener/alert/log. xml
- Listening Endpoints Summary...
- (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = drum.smartquick.com.cn) (PORT = 1521 )))
- Services Summary...
- Service "sqtest" has 1 instance (s ).
- Instance "sqtest", status UNKNOWN, has 1 handler (s) for this service...
- The command completed successfully
Run the following command under sqlplus to fix the registered instance,
Sqlplus/as sysdba
Startup
Alter system register;
Then run the lsnrctl status Command to display the following information:
- LSNRCTL for Linux: Version 11.2.0.1.0-Production on 27-JUL-2012 14:53:28
- Copyright (c) 1991,200 9, Oracle. All rights reserved.
- Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = drum) (PORT = 1521 )))
- STATUS of the LISTENER
- ------------------------
- Alias LISTENER
- Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
- Start Date 27-JUL-2012 14:48:11
- Uptime 0 days 0 hr. 5 min. 17 sec
- Trace Level off
- Security ON: Local OS Authentication
- SNMP OFF
- Listener Parameter File/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
- Listener Log File/home/oracle/diag/tnslsnr/drum/listener/alert/log. xml
- Listening Endpoints Summary...
- (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = drum.smartquick.com.cn) (PORT = 1521 )))
- Services Summary...
- Service "sqtest" has 2 instance (s ).
- Instance "sqtest", status UNKNOWN, has 1 handler (s) for this service...
- Instance "sqtest", status READY, has 1 handler (s) for this service...
- Service "sqtestXDB" has 1 instance (s ).
- Instance "sqtest", status READY, has 1 handler (s) for this service...
- The command completed successfully
The database instance has been successfully registered for the listener.
To disable the service, follow these steps:
Run SQL plus
Shutdown
Exit
Execute in the system command line
Lsnrctl stop