# SQL Connector

<figure><img src="/files/6AosIXO1XPAWdqkjqz6p" alt="" width="167"><figcaption></figcaption></figure>

## Actions

The SQL Helper has only one default action - execute SQL.

## Setting up your SQL Helper

#### Connector Auth

To start setting up your connector auth, either go to Settings -> Connector Auth and add a new auth, or add the SQL Helper to a flow and click "Create new Auth".

#### Base Domain

The Base Domain for the SQL Connector Auth has the following schema:

```
{{ Database Driver }}://{{ Host }}/{{ Database }}{{ Additional Driver Details }}
```

Which is built together based on these input fields:

<figure><img src="/files/HUTVWBECabpuUnXSf1LM" alt="" width="563"><figcaption></figcaption></figure>

In case the database driver and dialect of your database is not listed, please reach out to us. \
Many of the [drivers and dialects listed here](https://docs.sqlalchemy.org/en/14/dialects/) are supported out of the box and we can add them as an option in a few minutes. However, the ones currently not listed, haven't been specifically tested yet and might require additional implementation time from our site.

In most cases, you **will not need a dialect at all**. If you get an error message, try the first listed dialect for your database.

#### Username and Password

In almost all cases, it is advisable to create a separate user for Locoia. To find out how to create a user and manage permissions, please consult your respective database's user guide.

Once you have a user you want to use for DI, simply enter the username and password in these fields.

## Additional instructions for specific dialects

### Amazon RDS

If you need help connecting your DI SQL Helper to Amazon RDS, consult [this article](/connectors/connectors/aws-rds-database-how-to-connect.md).

### Oracle

To connect to Oracle, append your service name to the end of the connection string, where you would normally enter the database name (`</database>`).

Known errors and their meanings:

* TNS: listener does not currently know of SID given in the connect descriptor => The database name is not provided correctly. This needs to be added at the end with a slash like above `mysubdatabase`.
* ORA-00900: Invalid SQL statement / Ungültige SQL-Anweisung =>The SQL statement is not correct. Please check your syntax and confirm with the Oracle reference.

### Microsoft SQL Server

For some Microsoft SQL Server connections, you need to enter `?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes` in the **Additional Driver Details** field in order to specify that the database required ODBC Driver 18 in order to connect.


---

# 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://docs.locoia.com/connectors/helpers/sql-helper.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.
