# Creating an Oracle Database connection in Yandex DataLens


{% note warning %}

Yandex Cloud holds no responsibility for configuring a remote connection on an external database server side. When connecting an external database that is not a Yandex Cloud resource:

* Make sure the database uses an SSL certificate signed by a SSL certificate authority. You will not be able to create a connection in DataLens if the database uses a self-signed SSL certificate.
* Grant database access to the following DataLens IP ranges (`/` is followed by the subnet mask length):

  {% list tabs group=ip_address %}

  - ipv4 {#ipv4}

    * `178.154.242.176/28`
    * `178.154.242.192/28`
    * `178.154.242.208/28`
    * `178.154.242.128/28`
    * `178.154.242.144/28`
    * `178.154.242.160/28`
    * `130.193.60.0/28`

  - ipv6 {#ipv6}

    * `2a02:6b8:c03:500:0:f83d:a987:0/112`
    * `2a02:6b8:c02:900:0:f83d:a987:0/112`
    * `2a02:6b8:c0e:500:0:f83d:a987:0/112`
    * `2a02:6b8:c41:1300:0:f83d:a987:0/112`

  {% endlist %}

{% endnote %}


To create an Oracle Database connection:

1. Open the [new connection creation page](https://datalens.ru/connections/new).
1. Under **Databases**, select the **Oracle Database** connection.
1. Configure the connection as follows:

   * **Host name**: Specify the path to the master host or the IP address of the Oracle Database master host. You can specify multiple hosts in a comma-separated list. If you fail to connect to the first host, DataLens will select the next one from the list.
   * **Port**: Specify the Oracle Database connection port. The default port is 1521.
   * **Path to database**: Specify the service name or the system ID of the database to connect and select the **Service name** or **SID** option, respectively.
   * **Username**: Specify the username for the Oracle Database connection.
   * **Password**: Enter the password for the specified user.
   * **Cache TTL in seconds**: Specify the cache TTL or leave the default value. The recommended value is 300 seconds (5 minutes).
   
   * **Raw SQL level**: Enables you to use an ad-hoc SQL query to [generate a dataset](../../dataset/settings.md#sql-request-in-datatset). This option is disabled by default. When enabling it, you will need to select the raw SQL level:
   
      * **Allow subqueries in datasets**: Describe dataset sources using [SQL queries](../../dataset/settings.md#sql-request-in-datatset).
      * **Allow subqueries in datasets and source parameterization**: Describe dataset sources using SQL queries and use [source parameterization](../../dataset/settings.md#parametrization).
      * **Allow subqueries in datasets, source parameterization, and QL charts**: Describe dataset sources using SQL queries, use source parameterization, and [create QL charts](../../concepts/chart/ql-charts.md).

   ![image](../../../_assets/datalens/operations/connection/connection-oracle.png)

1. Optionally, test the connection by clicking **Check connection**.
1. Click **Create connection**.


1. Select the [workbook](../../workbooks-collections/index.md) to save your connection to or create a new one. If using legacy folder navigation, select a folder to save the connection to. Click **Create**.


1. Enter a name for the connection and click **Create**.

## Additional settings {#additional-settings}

You can specify additional connection settings under **Advanced connection settings**:

* **TLS**: Indicates whether TLS is required. When this option is enabled, the connection requires using SSL.
* **CA Certificate**: To upload a certificate, click **Attach file** and select the certificate file. When the certificate is uploaded, the field shows the file name.
* **Disable data export**: When this option is on, the data export item will not be available in the ![icon](../../../_assets/console-icons/ellipsis.svg) menu for the charts based on this connection. However, you will still be able to copy chart data and take screenshots.