> For the complete documentation index, see [llms.txt](https://docs.rewst.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rewst.help/~/revisions/oox5xThRKRJizwPMPxvl/documentation/configuration/integrations/integration-guides/database-integration-setup.md).

# SQL Database integration setup

## What does the SQL Database integration do?

The SQL Database integration in Rewst allows users to connect to their existing Postgres, MySQL, or MSSQL database and perform queries on the database, including those hosted in Azure SQL or AWS RDS.&#x20;

Our integration works with [versions of MSSQL that are actively supported by Microsoft](https://docs.sqlalchemy.org/en/20/dialects/mssql.html#dialect-mssql).

{% hint style="info" %}
When enabling SQL Database integration and not using[ BYOD](/~/revisions/oox5xThRKRJizwPMPxvl/documentation/configuration/integrations/integration-guides/byod-for-dattormm.md), the following [completion handlers](/~/revisions/oox5xThRKRJizwPMPxvl/documentation/automations/workflows/completion-handlers-and-workflow-wrappers.md) will still be automatically enabled, and will need to be disabled manually:

* BOYD: Insert Data Into Database
* BYOD: Upsert Cache DB Data Listener<br>
  {% endhint %}

## Set up the integration

Once you've set up the database and have the necessary credentials, follow the below steps to configure a new integration:

1. Navigate to **Configuration > Integrations** in the left side menu of your Rewst platform.
2. Click or search for SQL Database.\
   \
   ![](/files/dkVnTqUAzbtbwudpc2Ei)
3. Click on the integration tile to launch the configuration page.
4. Under **Parameters**, click <img src="/files/ovhQE4V1QnsgnZHkW9o0" alt="" data-size="line"> to add a new database.
5. Complete the fields with your database information.\ <br>

   <figure><img src="/files/YwxaGdZjMk8pHkXbDbok" alt=""><figcaption></figcaption></figure>
6. Click **Save Configuration**.

{% hint style="warning" %}
If you are using the database integration to cache information from options generators, follow the [BYOD For Options Generators](/~/revisions/oox5xThRKRJizwPMPxvl/documentation/configuration/integrations/integration-guides/byod-for-dattormm.md) document
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.rewst.help/~/revisions/oox5xThRKRJizwPMPxvl/documentation/configuration/integrations/integration-guides/database-integration-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
