Static registration and Dynamic Registration of Oracle listener

Source: Internet
Author: User

I read various blogs about static registration and dynamic registration more than N times. I found that I did not take it seriously every time. I know that listener. ora is very important, and the content in it has always been a ready-made copy.

Today, I finally figured out what I usually do is static registration:

The status of the statically registered listener instance is unknow. Only when the client requests to connect to the instance will it check whether the instance exists.
The dynamically registered listening instance is in the ready or blocked status. No matter when the database is closed or started, the listener can dynamically refresh the correct database information, regardless of the database status, the listener can know.

 

# Listener. ora network configuration file: C: \ oracle \ product \ 11.1.0 \ db_1 \ Network \ admin \ listener. ora
# Generated by Oracle configuration tools.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = c: \ oracle \ product \ 11.1.0 \ db_1)
(Program = EXTPROC)

)
(Sid_desc =
(Global_dbname =Mytestdb)
(Sid_name = Oracle)
(ORACLE_HOME = c: \ oracle \ product \ 11.1.0 \ db_1)
)
)

> Lsnrtcl stauts:

Services summary...
Service"Mytestdb"Has 1 instance (s ).
Instance "oracle", statusUnknown, Has 1 handler (s) for this service...
Service "plsextproc" has 1 instance (s ).
Instance "plsextproc", status unknown, has 1 handler (s) for this service...
The command completed successfully

Global_dbname = mytestdb is service. Of course, this line does not support global_dbname = mytestdb. In this case, sid_name = oracle is service.

========================================================== ========================================================== ========================================

After trying Dynamic Registration, dynamic registration is not written in listener. ora...

When an instance is started, the pmon process dynamically registers the instance and service to the listener according to the instance_name and service_names parameters in init. ora.

First, check that the instance_name and service_names parameters are not specified in init. ora.

Modify listener. ora

# Listener. ora network configuration file: C: \ oracle \ product \ 11.1.0 \ db_1 \ Network \ admin \ listener. ora
# Generated by Oracle configuration tools.

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = c: \ oracle \ product \ 11.1.0 \ db_1)
(Program = EXTPROC)

)
)

> Lsnrtcl stauts:

Services summary...
Service "plsextproc" has 1 instance (s ).
Instance "plsextproc", status unknown, has 1 handler (s) for this service...
The command completed successfully

> Sqlplus/As sysdba

SQL> startup;

> LSNRCTL status:

Service"Oracle"Has 1 instance (s ).
Instance "oracle", statusReady, Has 1 handler (s) for this service...
Service"Oracle_xpt"Has 1 instance (s ).
Instance "oracle", status ready, has 1 handler (s) for this service...
Service "plsextproc" has 1 instance (s ).
Instance "plsextproc", status unknown, has 1 handler (s) for this service...
The command completed successfully

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>

Service"Oracle_xpt"Is it a magic horse?

Google, this service (dbname_xpt) is used in the data guard environment. You can set the dynamic implicit parameter "_ dg_broker_service_names" to null and disable service registration.

SQL> alter system set "_ dg_broker_service_names" = '';

System altered.

SQL>

Restart lister

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>

SQL> show parameter service_names

Name type
----------------------------------------------------------
Value
------------------------------
Service_names string
Oracle

SQL> show parameter instance_name

Name type
----------------------------------------------------------
Value
------------------------------
Instance_name string
Oracle
SQL>

If instance_name and service_names are not specified, Oracle will find the db_name and db_domain values for registration. Db_name is required for databases, that is, dynamic registration is performed by default. Of course, we recommend that you specify the instance_name and service_names parameters for display. If the settings are not displayed, dynamic registration only occurs when the database starts after the listener is running. If the listener restarts, dynamic Registration Information will be lost.

Alternatively, run the following command after the database is open:

SQL> alter system register; -- manual registration to ensure that registration information is not lost

**************************************** **************************************** **************************************** ****

By the way, what are instance_name, service_names, db_name, db_domain, and oracle_sid?

Oracle_sid is a system environment variable, and its value must be consistent with instance_name

Instance_name: the parameter of the Oracle database, show parameter instance_name. A database can have multiple instance names;

In the RAC environment, the instance_name parameter of each instance in the cluster must be set to a unique value.

The parameters of the service_names Oracle database, show parameter service_names, correspond to a database rather than an instance. A database can have multiple service names (separated by commas)

Db_name is the unique identifier of the database (db_domain helps db_name uniquely identify the database)

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.