06 March 2007

Dynamic Listener Registration

By now I'm sure you all know that the Oracle listener supports dynamic registration, wherein Oracle RDBMS and ASM instances can automatically register themselves to the listener. You don't even need to have a listener.ora file (unless you need more than the default service/SID registered).

However be aware that if the listener is started after the Oracle instance(s), then it may take the instance PMON up to 60 seconds to re-try. If you don't feel like waiting for what may seem like an eternity, you can manually tell your instance to register immediately with:

ALTER SYSTEM REGISTER;

The Oracle Database Net Services Administrator's Guide states it pretty plainly:
If the listener is not running when an instance starts, PMON is not able to register the service information. PMON attempts to connect to the listener periodically, however, it may take up to 60 seconds before PMON registers with the listener after it has been started. To initiate service registration immediately after the listener is started, use the SQL statement ALTER SYSTEM REGISTER. This is especially useful in high-availability configurations.
My exam prep guide, written during 10gR1, seems to imply that Oracle instances will not automatically re-try to register, and that ALTER SYSTEM REGISTER is required if the listener was not already up:
You will need to re-register your instance with the listener with "alter system" if you have restarted the listener, or if you started the database instance before starting the listener.
Perhaps the 60-second retry was introduced in 10gR2, or perhaps I'm just reading too much into that sentence. It does indeed work on 10gR2, as my ASM instance demonstrated last week. I don't have a 9i or 10gR1 instance handy to test it on though.

No comments:

Post a Comment