REW

What Is Alter System Register In Oracle?

Published Aug 29, 2025 4 min read
On this page

The ALTER SYSTEM REGISTER command in Oracle is used to force the immediate registration of a database instance's services with its configured listeners. This command overrides the default 60-second waiting period for dynamic service registration, which is a process handled by the Listener Registration (LREG) background process. While this dynamic registration is normally automatic, the ALTER SYSTEM REGISTER command is essential in situations where you need to make the database available to clients without delay.

The Dynamic Service Registration Process

To understand the function of ALTER SYSTEM REGISTER, it's important to know how a database instance registers its services dynamically with a listener. This process is handled by the LREG background process (or PMON in older Oracle versions).

  1. Startup: When an Oracle database instance starts, the LREG process attempts to register the services of the database with the listeners specified in the LOCAL_LISTENER and REMOTE_LISTENER initialization parameters.
  2. Polling: If a listener is not running, LREG will periodically poll the network until it finds an active listener.
  3. Registration: When a listener is found, LREG registers all the necessary information, such as the service names, instance names, and instance status.
  4. Information Sent to Listener: The listener then receives and stores this information. When a client requests a service, the listener is aware of which instances can provide that service and can direct the client's connection accordingly.

Why use ALTER SYSTEM REGISTER?

By default, LREG's polling and registration cycle can take up to 60 seconds. In many scenarios, this delay is acceptable. However, for high-availability systems and specific maintenance tasks, waiting for up to a minute is not practical. The ALTER SYSTEM REGISTER command is used to force this registration to happen immediately, thereby eliminating the waiting period.

Common scenarios where ALTER SYSTEM REGISTER is used include:

  • Listener Restart: If you restart a listener while the database instance is still running, the database's services will not be immediately available to new client connections. Running ALTER SYSTEM REGISTER immediately after the listener restarts forces the instance to reregister its services, making it instantly available for new connections.
  • High-Availability Environments (e.g., Oracle RAC): In Oracle Real Application Clusters (RAC), where multiple instances access the same database, it is crucial for services to be registered and available to all listeners across the cluster without delay. ALTER SYSTEM REGISTER ensures this immediate update.
  • Network Configuration Changes: If you change the network configuration or the LOCAL_LISTENER parameter of an instance, ALTER SYSTEM REGISTER can be used to apply the changes immediately without restarting the instance.

How to use ALTER SYSTEM REGISTER

Using the command is straightforward, but it is a privileged operation that requires the ALTER SYSTEM system privilege.

Syntax

ALTER SYSTEM REGISTER;

Use code with caution.

ExampleYou are connected to your database instance and the listener has just been restarted. To force immediate registration, you would execute the following:

SQL> ALTER SYSTEM REGISTER;
System altered.

Use code with caution.

After executing this command, new client connection requests will be immediately directed to the database instance by the listener.

Other key concepts

The effectiveness of ALTER SYSTEM REGISTER depends on a few other initialization parameters that govern dynamic service registration:

  • LOCAL_LISTENER: This parameter, specified in the database's initialization file (pfile or spfile), tells the LREG process which local listener to register with. This can be a TNS alias or a full address.
  • REMOTE_LISTENER: For Oracle RAC or other remote listener configurations, this parameter specifies the listeners to which the instance should register.
  • SERVICE_NAMES: LREG registers the database based on the service names defined by this parameter.

Conclusion

The ALTER SYSTEM REGISTER command is a vital tool for database administrators, enabling them to ensure immediate service availability after a listener restart or network configuration change. By forcing the LREG process to update the listener instantly, it avoids potential delays and is particularly important in high-availability and RAC environments. While part of a larger dynamic service registration system, its ability to override the default polling cycle makes it an indispensable command for maintaining seamless connectivity.

Enjoyed this article? Share it with a friend.