Dynamic Service Registration with IPC protocol?

Oracle database services can be registered dynamically to the listener, which then acts as a port mapper for those services. The listener uses the dynamic service information about the database and instance received through service registration.

From Oracle Database Net Services Administrator’s Guide, “Dynamic service registration is configured in the database initialization file. It does not require any configuration in the listener.ora file. However, listener configuration must be set to listen on the ports named in the database initialization file, and must not have parameters set that prevent automatic registration, such as COST parameters.

Below are the initialization parameters:

— SERVICE_NAMES for the database service name
— INSTANCE_NAME for the instance name
— LOCAL_LISTENER for the local listener
— REMOTE_LISTENER for the remote listener, if any

By default, the LREG process registers service information with its local listener on the default local address of TCP/IP, port 1521. If the listener configuration is synchronized with the database configuration, then LREG can register service information with a nondefault local listener or a remote listener on another node. Synchronization occurs when the protocol address of the listener is specified in the listener.ora file and the location of the listener is specified in the initialization parameter file.

Oracle Net Servcies support the following protocols:

— IPC Protocol Support
— TCP/IP Protocol Support
— TCP/IP with SSL Protocol Support

To have the LREG process register with a local listener that does NOT use TCP/IP, port 1521, configure the LOCAL_LISTENER parameter in the initialization parameter file to locate the local listener.

If local listener is configured to use IPC for example,

SQL> show parameter listener
 NAME                 TYPE        VALUE
 ------------------   ------      --------------
 forward_listener     string
 listener_networks    string
 local_listener       string      (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=REGISTER)))
 remote_listener      string

Then in the listener configuration file listener.ora, you need to have an IPC address:

LISTENER =
   (ADDRESS_LIST =
         (ADDRESS =
           (PROTOCOL = IPC)
           (KEY = REGISTER)
         )
         (ADDRESS =
           (PROTOCOL = TCP)
           (Host = joetestdb)
           (Port = 1521)(RATE_LIMIT=yes)
         )
   )

One thing to note when using IPC is to make sure the value of KEY match between the listener configuration file and the initialization parameter LOCAL_LISTENER. Otherwise dyanamic registration will fail. I’ve seen recovered systems using IPC had a different KEY value in the listener configuration file than the KEY value in the parameter LOCAL_LISTENER which caused dynamic registration not working.

Another thing to note for IPC — the IPC protocol support can be used only when the client program and Oracle Database are installed on the same system. For an Oracle DataGuard envrionment, if Broker is used, do not use IPC protocol because Broker generates the value for the StaticConnectIdentifier property automaically based on the value of LOCAL_LISTENER. If IPC is used for LOCAL_LISTENER, StaticConnectIdentifier will look like:

DGMGRL> show database "PROD1" StaticConnectIdentifier
   StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=REGISTER))(CONNECT_DATA=(SERVICE_NAME=PROD1_DGMGRL)(INSTANCE_NAME=PROD)(SERVER=DEDICATED)))'

Then when doing switchover, Broker won’t be able to connect to the new Standby after bring it down.

If there is a requirement that the LOCAL_LISTENER parameter is to be changed then the Broker configuration needs to be manually updated as follows to restore automatic Broker updates of the StaticConnectIdentifier property values for a database instance.

  • For a Standby database use the DGMGRL CLI to remove the database from the Broker configuration and then add it back to the configuration.
  • For a Primary database use the DGMGRL CLI to remove and then recreate the entire broker configuration.

Or leave LOCAL_LISTENER as is, but update the broker parameter StaticConnectIdentifier directly as:

edit database "PROD1" SET property StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=JOEDB01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PROD1_DGMGRL)(INSTANCE_NAME=PROD)(SERVER=DEDICATED)))';

edit database "PROD2" SET property StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=JOEDB02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PROD2_DGMGRL)(INSTANCE_NAME=PROD)(SERVER=DEDICATED)))';

2 thoughts on “Dynamic Service Registration with IPC protocol?

Leave a comment