This page describes how to view information about your Database Connections.
View Database Connections information
To view information about your Database Connections, do the following:
Console
Go to the Connection profiles page.
You can view the list of the Database Connections.
Click the name of a Database Connection to view its details.
gcloud
List Database Connections
Use the
gcloud oracle-database database-connections listcommand to list Database Connections.gcloud oracle-database database-connections list \ --project=PROJECT_ID \ --location=REGIONReplace the following:
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region where your Database Connections are located.
View Database Connection details
Use the
gcloud oracle-database database-connections describecommand to view details of a Database Connection.gcloud oracle-database database-connections describe CONNECTION_ID \ --project=PROJECT_ID \ --location=REGIONReplace the following:
- CONNECTION_ID: the ID of the Database Connection.
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region where your Database Connection is located.
API
List Database Connections
To list Database Connections, run the following
curlcommand:curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/databaseConnections"
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region where your Database Connections are located.
View Database Connection details
To view details of a Database Connection, run the following
curlcommand:curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/databaseConnections/CONNECTION_ID"
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region where your Database Connection is located.
- CONNECTION_ID: the ID of the Database Connection.
States of a Database Connection
A Database Connection has the following states:
| State | Description |
|---|---|
CREATING |
The Database Connection is being created. You can't execute SQL statements yet. |
ACTIVE |
The Database Connection is ready to use. |
DELETING |
The Database Connection is being deleted. |
FAILED |
The Database Connection failed to be created. For the reason, check the
lifecycleDetails field in the output of the
gcloud oracle-database database-connections describe command.
For more information, see Troubleshoot Database Connections and SQL runtime issues. |