Oracle database static monitoring and dynamic monitoring differences

Source: Internet
Author: User

Oracle static monitoring and dynamic monitoring
  A, what is registration? Registering is registering the database as a service to the listener. The client does not need to know the database name and the instance name, but only needs to know the service name provided by the database to request a connection to the database.  This service name may or may not be the same as the instance name. During database server startup, the database server registers the appropriate service with the listener (whenever a database is started, two messages are registered to the listener by default: the instance and service corresponding to the database server. Equivalent to this: there is a listener between the database server and the client (Listener), in the Listener, the corresponding database corresponding to the service name (a database may have more than one service name), when the client needs to connect to the database, only need to provide a service name,  You can establish a connection between the client and the server. Static registration static registration is to read the configuration of the Listener.ora file when the instance starts, registering the instance and service to the listener.  Whenever a database is started, two messages are registered to the listener by default: the instance and service for the database server.  At static registration, Global_dbname provides the service name out of the Listener.ora, and Sid_name in Listener.ora provides the registered instance name. When a static registration method is taken, the contents of the Listener.ora are as follows: Sid_list_listener = (Sid_list = (Sid_desc = (Sid_name = plsextproc) (Oracle_home = d:\o) racle\product\10.2.0\db_1) (program = Extproc)) (Sid_desc = (global_dbname =orcl) (Oracle_home = D:\oracle\product\1 0.2.0\db_1) (Sid_name =orcl)) (Sid_desc = (global_dbname =orcl1) (Oracle_home = D:\oracle\product\10.2.0\db_1) (SID _name =ORCL)) This file indicates that the database is a single instance, with an instance name of ORCL, which provides two services: ORCL and ORCL1. Dynamic Registration Dynamic Registration is the instance process according to Pmon when it is started Init.ora Name,service_names two parameters to dynamically register instances and services to ListeThe NER. The first step is to specify the value of the Instance_name,service_names two parameter in Init.ora.  The values of these two parameters can be viewed under sqlplus through show parameter Service_names and Showparameter instance_name. The value of the instance registered to the listener is obtained from the instance_name parameter in the Init.ora file.  If the parameter does not have a set value, it takes the value of db_name in the Init.ora file. The value of the service registered to the listener is obtained from the parameter Service_names in the Init.ora file. If the parameter does not have a set value, the database will splice the values of db_name and Db_domain in the Init.ora file to register itself. If you choose to provide a service_names value, you can use a fully qualified name (such as orcl.oracle.com) or an abbreviated name (such as ORCL). If you select the abbreviated name and set the Db_domain parameter, the service registered to the listener will be the concatenation of the service_name value and the Db_domain value.  For example, the following settings will cause the service orcl.oracle.com to be registered with the listener: db_domain=oracle.com SERVICE_NAMES=ORCL; When taking the dynamic registration method, the contents of the Listener.ora are as follows: Sid_list_listener = (Sid_list = (Sid_desc = (Sid_name = plsextproc) (Oracle_home = d:\o)  racle\product\10.2.0\db_1) (program = Extproc)), optionally, you can specify multiple service values in the Service_names parameter, with a comma-separated value, which is useful for shared server configurations.  Dynamic registration is only registered to the default listener (the name is listener, the port is 1521, the Protocol is TCP), and if you need to register with a non-default listener, you need to configure the Local_listener parameter! If the values for Service_names and instance_name are not explicitly set, dynamic registration occurs only when the database is started after the listener is run, in which case the dynamic registration information is lost if the listener later restarts. Obviously, it's a good idea to start the listener before all databases are started, so that you avoid having to explicitly set Service_namesAnd the instance_name value, if the reboot listener brings the dynamic registration information to the case of loss. Setting explicit values for initialization parameters Service_names and instance_name is a desirable method and recommendation.  Because if the listener is restarting while the database is running, the Pmon process for each database completes the dynamic registration in a short time only if you explicitly set the values for Service_names and instance_name in the Init.ora file.  Query whether a service is static or dynamic registration you can use the command Lsnrctl status to see whether a service is statically registered or dynamically registered. An instance state of unknown indicates that this service is a statically registered setting.  The listener is then used to indicate that it does not know any information about the instance, and only when the client makes a connection request does it check that the instance exists. A dynamically registered database is indicated by the status blocked (for a standby database) in state information. Dynamically registered databases are logged off dynamically from the listener regardless of when the database is closed, and the information associated with them disappears from the status list. This way, the listener always knows its state, regardless of whether the database is running or closed. This information will be used for fallback (fallback) and load balancing of connection requests.  

Oracle database static listening and dynamic listening differences

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.