Oracle Error ORA-24339: cannot set server group name after connecting to server

Oracle Error Message

ORA-24339: cannot set server group name after connecting to server

Reason for the Error

An attempt was made to set the server group in a server handle after connecting to the server. However, once the connection is established to a server, the server group name cannot be set anymore.

Solution

Attach to the server after setting the server group name in the server handle.