This page describes Database Connections and SQL runtime issues and how to
resolve them.

## Configuration and validation errors

This section describes issues that you might encounter when using Database Connections.

| Issue | Cause | Resolution |
|---|---|---|
| `INVALID_CONNECTION_STRING` | Must be **Easy Connect** or **TNS** . **Easy Connect Plus** isn't supported. | Use `host:port/service` or a TNS descriptor. |
| `MISSING_TNS_COORDINATES` | TNS descriptor is missing `ADDRESS` or `CONNECT_DATA` values. | Update the TNS Descriptor with correct values. |
| `UNSUPPORTED_HA_PARAMETERS` | Parameters `FAILOVER`, `LOAD_BALANCE`, `RETRY_*`, and `CONNECT_TIMEOUT` aren't supported. | Remove these parameters from the TNS string. |
| `SERVICE_CONNECTIVITY_NOT_ENABLED` | The ODB Network doesn't have service connectivity. | Update the ODB Network with a network attachment, or create a new one. |
| `ODB_NETWORK_NOT_FOUND` or `ODB_NETWORK_NOT_AVAILABLE` | The ODB Network doesn't exist or isn't available. | Wait for the ODB Network to become available. Also, check if you've used the correct ODB Network name. |
| `ODB_NETWORK_MISSING_PSC_NETWORK_ATTACHMENT` | No PSC network attachment. | Set network attachment. |
| `ODB_NETWORK_SERVICE_CONNECTIVITY_CONFIG_BEING_DELETED` | Service connectivity is being removed. | Wait, or re-enable the service connectivity. |
| `ODBNETWORK_IN_USE_BY_DATABASE_CONNECTIONS` | Can't delete the ODB Network while it is in use by the Database Connections. | Delete the connections first. |
| `ODBNETWORK_SERVICE_CONNECTIVITY_CONFIG_IN_USE` | Can't disable service connectivity while connections use it. | before disabling service connectivity, delete the Database Connections. |
| `SECRET_ACCESS_DENIED` | Service account can't access the secret. | Grant Secret Manager Secret Accessor role (`roles/secretmanager.secretAccessor`) to the service account (`service-PROJECT_NUMBER@gcp-sa-oci.iam.gserviceaccount.com`). You can find the service account and the secret from the error message itself. |
| `SERVICE_AGENT_PERMISSION_DENIED` | Service agent lacks a permission on a resource. | Grant the permission that's named in the message. |

### Runtime error

This section describes issues that you might encounter when testing Database Connections
and executing SQL statements.

> [!NOTE]
> **Note:** Some errors have `is_retryable` field that indicates if you can retry the request.

| Issue | Cause | Resolution |
|---|---|---|
| `ORACLE_AUTH_FAILED` | Wrong database username or password. | Confirm that you're using the correct secret and check the credentials in the secret. |
| `DATABASE_NOT_READY` | The database or the listener isn't accepting connections. | Check the database state and retry. |
| `DATABASE_NETWORK_UNREACHABLE` | Can't reach the host or the hostname in the connection string couldn't be resolved. | Use an IP address as the host and check the network attachment setup. |
| `DATABASE_CERTIFICATE_INVALID` | TLS handshake or certificate DN mismatch. | Check the `ssl_server_cert_dn`, the wallet, and the port. |
| `DATABASE_CONNECTION_FAILED` | Connection couldn't be opened or was dropped. | Check the network and retry. |
| `QUERY_TIMEOUT` | Statement ran longer than the timeout. | Optimize the query or narrow its scope. |
| `SESSION_QUEUE_TIMEOUT` or `SESSION_CAPACITY_EXHAUSTED` | Too many concurrent requests. | Retry with backoff and reduce concurrency. |
| `SQL_EXECUTION_SERVICE_UNAVAILABLE` or `INTERNAL_DRIVER_ERROR` | There might be an issue on the Google Cloud side. | Retry. If the issue persists, contact [Cloud Customer Care](https://cloud.google.com/support-hub). |
| `ORA-00942` | The table or view doesn't exist. | Check the name of the table or view, and if it exists or not. |
| `ORA-29024` | The certification doesn't match or is missing. | Check if the certificate is valid or obtain a new certificate. |
| `ORA-01017` | Wrong database username or password. | Confirm that you're using the correct secret and check the credentials in the secret. |