Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

TNS-12520

Cannot connect to database. Listener at string does not have handler for string server type ready or registered for service string. (CONNECTION_ID=string)

Cause

The connection was refused by the Oracle Database listener process. None of the known and available handlers for the requested server type (dedicated, shared, or pooled) was appropriate for the client connection.


Action

Do the following:

  • Check for mistakes in the specified connection string.
  • Check that the SERVER parameter in the connection string or your tnsnames.ora file connect descriptor specifies a server type (dedicated, shared, or pooled) that is supported by handlers known by the listener.
  • If using an Easy Connect connection string, then check that the server type specified is supported by handlers known by the listener.
  • Wait a moment and try to connect again. The service handler may be in a blocked state and not accepting new connections.
  • Use the CONNECTION_ID value to track this connection attempt in trace files for further diagnosis.

To find which handlers are currently known by the listener and are accepting connections, you can:

  • Ask your Database Administrator.
  • Review the connection string shown in the cloud service console.
  • If you have access to the machine where the listener is running, you can execute one of the following:
  • lsnrctl services
  • Or, when a listener is named in the listener.ora file, run: lsnrctl services <listener_name>
  • Or, if an Oracle Connection Manager (Oracle CMAN) proxy listener is named in the cman.ora file, run: cmctl show services -c <cman_name>
  • Or, if an Oracle Global Service Manager (Oracle GSM) listener is named in the gsm.ora file, run: gdsctl services -raw -gsm <gsm_name>