# Add a database (/core/build/data-connections/how-to/add-a-database)









<CalloutContainer type="info">
  <CalloutDescription>
    **Target Audience**: Non technical users
  </CalloutDescription>
</CalloutContainer>

### Goal [#goal]

Connect a PostgreSQL, MySQL, ClickHouse, Snowflake, Oracle, Azure SQL, or Google BigQuery database/warehouse to Toucan.ai to enable metadata analysis and chart creation.

***

### Prerequisites [#prerequisites]

* A verified [Toucan.ai account](/core/getting-started/quick-start/subscribe-to-toucan).
* An active organization.
* Valid credentials/connection details depending on the selected connector:
  * PostgreSQL/MySQL: Host, Database Name, Username, Password, Port, and SSL settings.
  * ClickHouse: Host, Username, Password (optional), Port, and TLS setting.
  * Snowflake: Account, User, Private Key (PEM), Warehouse, Database, and optional Role/Schema/Passphrase.
  * Oracle: Host, Port, User, Password, and Service Name, plus an optional Schema owner (plus a TLS wallet ZIP when your database requires TLS).
  * Azure SQL: Host, Port, Database, User, and Password.
  * BigQuery: A Google service account credentials JSON file.
* Network access granted to Toucan.ai static IPs (see [Supported Databases](/core/build/data-connections/supported-databases)).

***

### Steps [#steps]

#### 1. Navigate to the Database Section [#1-navigate-to-the-database-section]

* Click the **Database** tab from the Toucan.ai home page.
* View the list of currently connected databases.

#### 2. Initialize the Connection [#2-initialize-the-connection]

* Click the **Add a database** button in the top-right corner.
* Select a connector from the available list (**PostgreSQL**, **Google BigQuery**, **MySQL**, **ClickHouse**, **Snowflake**, **Oracle**, **Azure SQL**).

<img alt="Add a database" src="__img0" />

#### 3. Input Connection Details [#3-input-connection-details]

* Enter a **Name** to identify the connection internally.
* Then provide the details required by your connector:

##### PostgreSQL [#postgresql]

* **Host** address (e.g., `database.mycompany.com`)
* **Port** (default: `5432`)
* **Database** name (e.g., `analytics`)
* **Username** and **Password**
* **SSL** toggle based on your security requirements

<img alt="Add a PostgreSQL database " src="__img1" />

##### BigQuery [#bigquery]

* Upload your Google service account credentials **JSON** file (credentials format depends on your service account)
* The form will load fields such as `project_id`, `client_email`, and the private key from the JSON

> If you need to review or edit values, you can open **View raw credentials** (collapsible section) inside the form.

##### MySQL [#mysql]

* **Host** address
* **Port** (default: `3306`)
* **User** and **Password**
* **Charset**
* **Database** name
* **SSL Mode**
* If **SSL Mode** is enabled, fill in **SSL CA**, **SSL Cert**, and **SSL Key**.

##### ClickHouse [#clickhouse]

* **Host** address (for example `hostname.clickhouse.cloud`)
* **Port** (default: `9000`)
* **User**
* **Password** (optional, depending on your ClickHouse setup)
* **TLS** toggle

##### Snowflake [#snowflake]

* **Account** (for example `xy12345.us-east-1`)
* **User**
* **Warehouse** (for example `COMPUTE_WH`)
* **Database**
* **Schema** (optional)
* **Role** (optional)
* **Private key (PEM)**
* **Private key passphrase** (optional)

##### Oracle [#oracle]

* **Host** address (e.g. `db.example.com`, or your cloud provider’s hostname)
* **Port** (default `1521`; TLS setups often use a different port—use the value from your provider)
* **User**
* **Password**
* **Service name** (e.g. `ORCL` or the service name from your connection details)
* **Schema (owner)** (optional) — the schema that owns the tables to expose. In Oracle, [a schema is a database user and shares the same name as the user](https://docs.oracle.com/en/database/oracle/oracle-database/19/admqs/managing-schema-objects.html), so this defaults to the connecting user. Set it when the login account reads tables owned by a different schema (e.g. a read-only account granted `SELECT` on another owner's tables); otherwise no tables are found.
* **TLS wallet (ZIP)** — only when your database requires TLS; upload the wallet archive as provided by your vendor (do not unzip it first)
* **Server certificate DN**, this optional field is displayed after you upload your TLS wallet and allow to verify the identity of a Oracle server during TLS connexion by indicating the Distinguished Name (DN) awaited in the server certificate. This option is required if you use a custom certificate or if you want to use a full DN matching

<CalloutContainer type="info">
  <CalloutDescription>
    **Oracle TLS wallet**:
    For managed Oracle databases that require TLS, download the wallet from your provider’s console (e.g. Autonomous Database → **Database connection** → download wallet), then upload that ZIP in the form. Toucan.ai accepts ZIP files up to 500 KB with wallet files at the archive root or in a single folder.

    Not supported: pasting files individually, archives larger than 500 KB, deeply nested folder layouts, or relying on `tnsnames.ora` instead of filling **Host**, **Port**, and **Service name** in the form.
  </CalloutDescription>
</CalloutContainer>

##### Azure SQL [#azure-sql]

* **Host** address (e.g. `myserver.database.windows.net`)
* **Port** (default `1433`)
* **Database** name
* **User**
* **Password**
* **Trust server certificate** (optional, under **Advanced settings**) — skips server certificate validation. Only needed for a self-signed on-prem SQL Server instance; leave it off for Azure SQL.
* **Include materialized views** (optional, under **Advanced settings**)

<CalloutContainer type="info">
  <CalloutDescription>
    The connection always encrypts traffic. Server certificate validation is on by default and needs no extra setup, since Azure SQL's certificate is already CA-signed — turn on **Trust server certificate** only to skip validation for a self-signed on-prem instance.
  </CalloutDescription>
</CalloutContainer>

#### 4. Validate and Save [#4-validate-and-save]

* Click **Test Connection** to verify that the credentials and network settings are valid.
* Wait for the success notification.
* Click **Connect** to save the configuration to your organization.

<img alt="HR Database" src="__img2" />

<CalloutContainer type="warning">
  <CalloutDescription>
    **Constraint**: If the test fails, verify that Toucan.ai IP(s) are allow-listed in your firewall. The UI will display an IP under **IP Whitelist**, and Toucan.ai also publishes the static IP `51.15.216.216` in its documentation.
  </CalloutDescription>
</CalloutContainer>

***

### Conclusion [#conclusion]

The database is now connected and visible in your organization's database list. You may proceed to analyze the data with AI to generate metadata descriptions.

**Suggested** **Next Steps**: [How-to: Analyse your database with AI](/core/build/analyze-your-database-with-ai/how-to/analyze-your-database-with-ai)
