Static and dynamic oracle listener listens difference

oracle monitor static and dynamic listening
First, what is registered?
  The database is registered as a service registered with the listener. The client does not need to know the database name and instance name only needs to know the name of the database services provided by the external application can connect to the database. This service names may be the same as the instance name, there may be different.
  In the database server startup process, the database server registers the listener corresponding service (start whenever a database, by default, have two pieces of information registered listener: database server instances and corresponding services)
  equivalent is : a listener (the listener) between the database server and the client, the listener, the records corresponding to the respective service name database (a database may correspond to a plurality of service names), when the client needs to connect to the database, only the need to provide the service name, you can establish a connection between the client and the server.
  Second, the static registration
  static registration listener.ora configuration file is read when the instance starts, the instance and registration services to the listener. Whenever you start a database, by default, we have two pieces of information registered with the listener in: database server instances and corresponding service.
  Static registration, listener.ora in GLOBAL_DBNAME provided outside the service name, listener.ora in SID_NAME provide registered instance name.
  Taking static registration methods, content listener.ora as follows:
  SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = PLSExtProc)
  (ORACLE_HOME = D: \ the Oracle \ Product \ 10.2.0 \ db_1)
  (= The extproc the PROGRAM)
  )
  (SID_DESC =
  (the GLOBAL_DBNAME = ORCL)
  (ORACLE_HOME = D: \ Oracle \ Product \ 10.2.0 \ db_1)
  (SID_NAME = ORCL)
  )
  (SID_DESC =
  (the GLOBAL_DBNAME = ORCL1)
  (ORACLE_HOME = D: \ the Oracle \ Product \ 10.2.0 \ db_1)
  (SID_NAME = orcl)
  )
  )
  the document indicates that the database is a single-instance instance named orcl, offers two services out: orcl and orcl1
Third, the dynamic registration
  dynamic registration is in when instance started PMON process according to the init.ora instance_name, service_names two parameters dynamically register the instances and services to the listener.
  First instance_name To specify the init.ora, the value service_names two parameters. In sqlplus you can see the value of these two parameters through the show parameter service_names and show parameter instance_name.
  Sign up to the value of listeners examples taken from the instance_name parameter file init.ora. If the value of this parameter is not set, it will take init.ora file
value of db_name.
  Sign up to the service to obtain the value of listeners from service_names init.ora parameter file. If this parameter is not set, the database will splice the value of db_name init.ora file and db_domain to register themselves. If you choose to provide service_names value, you can use the fully qualified name (such as orcl.oracle.com) or abbreviated name (for example, orcl). If you select the abbreviated name and set the parameters db_domain, registered with the listener in the service will be the fight service_name value and db_domain value
pick. The following example is provided to cause the service is registered to orcl.oracle.com listener:
  db_domain = oracle.com
  SERVICE_NAMES = ORCL;
  taking the dynamic registration method, the content listener.ora as follows:
  SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = PLSExtProc)
  (ORACLE_HOME = D: \ Oracle \ Product \ 10.2.0 \ db_1)
  (= the extproc the PROGRAM)
  )
  )
  Alternatively, you can specify a plurality of services service_names parameter values, values with a comma open grid, which for a shared server configuration is useful.
  Dynamic registration by default only registered on the default listener (the name is LISTENER, the port is 1521, the protocol is TCP), if you need to register with the non-default listener, you need to configure local_listener parameters!
  If no service_names and instance_name value explicitly, then only when the database started after the Listener runs, dynamic registration will occur; in this case, if the listener Then came the restart, dynamic registration information will be lost. Obviously, it is best to start the listener before starting any database, which would avoid when no explicit value is set service_names and instance_name, the situation is dynamic registration information is lost if the listener brings to restart.
  Setting an explicit value for the initialization parameter instance_name service_names and desirable approach is worth and recommendations. Because if the listener to restart the database during operation, only when you explicitly set the value service_names and instance_name in the init.ora file, PMON process for each database will be in a very short period of time
within among complete dynamic registration.
  Fourth, a service inquiry is static or dynamic registration Registration
  can use the command lsnrctl status to view a dynamic or static registration service is registered.
  Examples of state indicates that this service is still registered value is set to UNKNOWN. At this point the listener to indicate that it does not know anything about the instance, only when the client makes a connection request, it only checks the instance exists.
  Dynamic registration database (for a standby) state information to indicate by state or READY state BLOCKED. Regardless of when to close the database, the database will dynamically registered dynamically from listeners write-off, but with a list of related information from the state disappears. In this way, regardless of the database is running or has been closed, the listener always know its status. This information will be used to connect the requested fallback (fallback) and load balancing.

Published 21 original articles · won praise 1 · views 1832

Guess you like

Origin blog.csdn.net/weixin_44272648/article/details/104659913