Solution to Oracle 11g Database listening in Linux

Source: Internet
Author: User

Installation environment:

Oracle_HOME =/home/oracle/product/11.2.0/db_1

The ORACLE_HOME/network/admin/listener. ora file is as follows:

  1. # Listener. ora Network Configuration File:/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
  2. # Generated by Oracle configuration tools.
  3. SID_LIST_LISTENER =
  4. (SID_LIST =
  5. (SID_DESC =
  6. (GLOBAL_DBNAME = sqtest)
  7. (ORACLE_HOME =/home/oracle/product/11.2.0/db_1)
  8. (SID_NAME = sqtest)
  9. )
  10. )
  11. LISTENER =
  12. (DESCRIPTION =
  13. (ADDRESS = (PROTOCOL = TCP) (HOST = drum) (PORT = 1521 ))
  14. )
  15. ADR_BASE_LISTENER =/home/oracle

The ORACLE_HOME/network/admin/tnsnames. ora file is as follows:

  1. # Tnsnames. ora Network Configuration File:/home/oracle/product/11.2.0/db_1/network/admin/tnsnames. ora
  2. # Generated by Oracle configuration tools.
  3. Sqltest =
  4. (DESCRIPTION =
  5. (ADDRESS_LIST =
  6. (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
  7. )
  8. (CONNECT_DATA =
  9. (SID = sqtest)
  10. )
  11. )

Run lsnrctl start. The result is as follows:

  1. TNSLSNR for Linux: Version 11.2.0.1.0-Production
  2. System parameter file is/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
  3. Log messages written to/home/oracle/diag/tnslsnr/drum/listener/alert/log. xml
  4. Listening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = drum.smartquick.com.cn) (PORT = 1521 )))
  5. Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = drum) (PORT = 1521 )))
  6. STATUS of the LISTENER
  7. ------------------------
  8. Alias LISTENER
  9. Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
  10. Start Date 27-JUL-2012 14:48:11
  11. Uptime 0 days 0 hr. 0 min. 0 sec
  12. Trace Level off
  13. Security ON: Local OS Authentication
  14. SNMP OFF
  15. Listener Parameter File/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
  16. Listener Log File/home/oracle/diag/tnslsnr/drum/listener/alert/log. xml
  17. Listening Endpoints Summary...
  18. (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = drum.smartquick.com.cn) (PORT = 1521 )))
  19. Services Summary...
  20. Service "sqtest" has 1 instance (s ).
  21. Instance "sqtest", status UNKNOWN, has 1 handler (s) for this service...
  22. 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:

  1. LSNRCTL for Linux: Version 11.2.0.1.0-Production on 27-JUL-2012 14:53:28
  2. Copyright (c) 1991,200 9, Oracle. All rights reserved.
  3. Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = drum) (PORT = 1521 )))
  4. STATUS of the LISTENER
  5. ------------------------
  6. Alias LISTENER
  7. Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
  8. Start Date 27-JUL-2012 14:48:11
  9. Uptime 0 days 0 hr. 5 min. 17 sec
  10. Trace Level off
  11. Security ON: Local OS Authentication
  12. SNMP OFF
  13. Listener Parameter File/home/oracle/product/11.2.0/db_1/network/admin/listener. ora
  14. Listener Log File/home/oracle/diag/tnslsnr/drum/listener/alert/log. xml
  15. Listening Endpoints Summary...
  16. (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = drum.smartquick.com.cn) (PORT = 1521 )))
  17. Services Summary...
  18. Service "sqtest" has 2 instance (s ).
  19. Instance "sqtest", status UNKNOWN, has 1 handler (s) for this service...
  20. Instance "sqtest", status READY, has 1 handler (s) for this service...
  21. Service "sqtestXDB" has 1 instance (s ).
  22. Instance "sqtest", status READY, has 1 handler (s) for this service...
  23. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.