Dynamic Registration listening and dynamic listening

Source: Internet
Author: User
Tags time 0

Dynamic Registration listening and dynamic listening
SQL> select * from v $ version where rownum = 1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
SQL>! Cat/etc/issue
Enterprise Linux Server release 5.5 (Carthage)
Kernel \ r on an \ m
The listening with the default port number of 1521 is very simple. After service_names is set up, PMON automatically helps us Register and is very convenient. Registration is not the default port number:

Add the following in $ ORACLE_HOME/network/admin/listener. ora:
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.18.115.78) (PORT = 1590 ))
)
)

(It is best to use IP addresses here)
Set local_listener:
SQL> alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP) (HOST = 172.18.115.78) (PORT = 1590)' scope = both
2;
The system has been changed.

Set service_names:
SQL> alter system set service_names = 'a, B, c, d, diy, OS ';
The system has been changed.

Confirm that the listening process has stopped:
[Oracle @ localhost ~] $ Ps-ef | grep tnslsnr | grep-v grep
Oracle 7312 1 0? 00:00:00/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER-inherit
Oracle 7465 1 0? 00:00:00/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr listener1-inherit
Stop the listener directly or use the OS command
Here we will directly kill the process:
SQL>! Kill-9 7312


SQL>! Kill-9 7465


SQL>! Ps-ef | grep tnslsnr | grep-v grep

The listening process has stopped.

[Oracle @ localhost ~] $ Lsnrctl start listener1
LSNRCTL for Linux: Version 11.2.0.1.0-Production on-2015 11:42:08
Copyright (c) 1991,200 9, Oracle. All rights reserved.
Start/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: Please wait...
TNSLSNR for Linux: Version 11.2.0.1.0-Production
The system parameter file is/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora.
Write/u01/app/oracle/diag/tnslsnr/localhost/listener1/alert/log. xml log information
Listener: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 172.18.115.78) (PORT = 1590 )))
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 172.18.115.78) (PORT = 1590 )))
LISTENER STATUS
------------------------
Alias listener1
Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
Start Date: 2015 11:42:08
Normal operation time 0 days 0 hours 0 minutes 0 seconds
Tracking level off
Security ON: Local OS Authentication
SNMP OFF
Listener parameter file/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora
Listener log file/u01/app/oracle/diag/tnslsnr/localhost/listener1/alert/log. xml
Listener endpoint overview...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 172.18.115.78) (PORT = 1590 )))
The Listener does not support services.
Command executed successfully


After a while, PMON registers the listener:

[Oracle @ localhost ~] $ Lsnrctl status listener1
LSNRCTL for Linux: Version 11.2.0.1.0-Production on-2015 11:43:06
Copyright (c) 1991,200 9, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 172.18.115.78) (PORT = 1590 )))
LISTENER STATUS
------------------------
Alias listener1
Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
Start Date: 2015 11:42:08
Normal operation time 0 days 0 hours 0 minutes 57 seconds
Tracking level off
Security ON: Local OS Authentication
SNMP OFF
Listener parameter file/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora
Listener log file/u01/app/oracle/diag/tnslsnr/localhost/listener1/alert/log. xml
Listener endpoint overview...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 172.18.115.78) (PORT = 1590 )))
Service summary ..
The Service "a. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "B. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "c. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "d. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "diy. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "orcl3939.localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "orcl3939XDB. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
The Service "OS. localdomain" contains one instance.
Instance "ORCL3939", status READY, contains 1 handler of this service...
Command executed successfully

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.