TNS-12521
Cannot connect to database. Instance string for service string is not registered with the listener at string. (CONNECTION_ID=string)
Cause
A listener process initially handles all connections to Oracle Database. The connection request received by the listener specified, in addition to the service name, an instance name for an instance (usually a database instance) that either has not been dynamically registered with the listener or has not been statically configured in the listener's listener.ora configuration file. This error may be a temporary condition that occurs after the listener has started but before the database instance registers with the listener.
Action
Do the following:
- Check for mistakes in the specified connection string.
- Check that the INSTANCE_NAME parameter in the connection string or your tnsnames.ora file connect descriptor specifies an instance known by the listener.
- If using an Easy Connect connection string, then check that the instance name specified is known by the listener.
- Wait a moment and try to connect again. The database instance registration may not yet be complete.
- Use the CONNECTION_ID value to track this connection attempt in trace files for further diagnosis.
To find which instances are currently known by the listener:
- Ask your Database Administrator.
- Review the connection string shown in your 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>