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

1. Go to the **Connection profiles** page.

   [Go to Connection profiles](https://console.cloud.google.com/oracle/integrations/list)

   You can view the list of the Database Connections.
2. Click the name of a Database Connection to view its details.

### gcloud

- **List Database Connections**

  Use the `gcloud oracle-database database-connections list` command to
  list Database Connections.

      gcloud oracle-database database-connections list \
          --project=PROJECT_ID \
          --location=REGION

  Replace the following:
  - <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project.
  - <var translate="no">REGION</var>: the region where your Database Connections are located.
- **View Database Connection details**

  Use the `gcloud oracle-database database-connections describe` command to
  view details of a Database Connection.

      gcloud oracle-database database-connections describe CONNECTION_ID \
          --project=PROJECT_ID \
          --location=REGION

  Replace the following:
  - <var translate="no">CONNECTION_ID</var>: the ID of the Database Connection.
  - <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project.
  - <var translate="no">REGION</var>: the region where your Database Connection is located.

### API

- **List Database Connections**

  To list Database Connections, run the following `curl` command:

  ```
  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:
  - <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project.
  - <var translate="no">REGION</var>: the region where your Database Connections are located.
- **View Database Connection details**

  To view details of a Database Connection, run the following `curl` command:

  ```
  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:
  - <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project.
  - <var translate="no">REGION</var>: the region where your Database Connection is located.
  - <var translate="no">CONNECTION_ID</var>: 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](https://docs.cloud.google.com/oracle/database/docs/troubleshoot-database-connection.md.txt). |