# Connect to a Database Tool to Run Ad Hoc Queries

## Create an Immuta user SQL account

{% hint style="warning" %}
The query engine must be enabled in your tenant to create a user SQL account. Contact your Immuta representative for details.
{% endhint %}

1. Navigate to your **Profile page**.
2. Click the [**SQL Credentials tab**](#user-content-fn-1)[^1], and then **Create Account**.
3. Fill out the required fields following these guidelines:

   * Usernames must be unique and can only consist of lowercase letters, numbers, and underscores ( `_` ).
   * Usernames cannot start with a number and can be no longer than 63 characters.
   * Passwords should not contain braces ( `{` ).

   Your SQL password will never be displayed in the Immuta console, so be sure to store it in a secure location.
4. Click **Create**.

These are the credentials you will use for authentication when you connect your database tool to Immuta to query data sources.

## Connect database tool

1. Connect your database tool (for example, [DBeaver](https://dbeaver.com/docs/dbeaver/Database-driver-PostgreSQL/)) to Immuta’s PostgreSQL tenant using the credentials you created in the previous section. For a list of database tools PostgreSQL supports, see the [PostgreSQL Clients page](https://wiki.postgresql.org/wiki/PostgreSQL_Clients).
2. Query data sources registered from any of the following data platforms in your database tool:
   * Apache Impala
   * Netezza
   * Oracle
   * PostgreSQL
   * Teradata

[^1]: If this tab is not visible in your tenant, contact your Immuta representative to enable it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/latest/governance/data-consumers/query-data/connect-to-a-database-tool-to-run-ad-hoc-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
