> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases

> Start flows from new database rows, run SQL on PostgreSQL, MySQL, SQL Server, Snowflake, BigQuery, Redshift, Databricks and Oracle, and create, alter or drop tables

Use the database nodes to start a flow when a query returns a new row, and to read and change your databases from inside a flow. This flow marks each new order as seen, updating only the row that started the run. Press **Run** to watch it.

Node
Output in this run

Each node needs a connection to its database, which you add in **Settings > Integrations**. Noxus tests the connection when you save it.

| Connection | Use it for | What it asks for |
| - | - | - |
| **Database** | PostgreSQL, MySQL and Microsoft SQL Server: SQL Query, Manage Database Schema and Database Row Added | **Database Type**, **Host**, **Port** (default 5432, so change it for MySQL or SQL Server), **Database**, **User**, **Password** |
| **Snowflake** | Snowflake SQL Query | **Account** (such as `xy12345.us-east-1`), **User**, **Password**, **Database**, **Schema** (default `PUBLIC`), **Warehouse** |
| **BigQuery** | BigQuery SQL Query | **Project ID**, **Dataset** (optional), **Credentials JSON** (the service account key) |
| **Amazon Redshift** | Redshift SQL Query | **Host** (the cluster endpoint), **Port** (default 5439), **Database**, **User**, **Password** |
| **Databricks** | Databricks SQL Query | **Server Hostname**, **HTTP Path** (of the cluster or SQL warehouse), **Access Token**, **Catalog** and **Schema** (both optional) |
| **Oracle** | Oracle SQL Query | **Host**, **Port** (default 1521), **Connection Type** (**Service Name** or **SID**), **Service Name / SID**, **User**, **Password** |

## Triggers

The trigger runs its query on a schedule you choose and starts one flow per new row. A row is new when its **Cursor column** value is above the last one seen. When you turn the trigger on, it records the highest value already in the results, so rows that existed before never start a flow. It works with a **Database** connection.

What it does

## Nodes

| Node | What it does |
| - | - |
| [SQL Query](#sql-query) | Runs SQL on PostgreSQL, MySQL or Microsoft SQL Server |
| [Manage Database Schema](#manage-database-schema) [From 1.11.0](https://docs.noxus.ai/core/changelog.md#1-11-0) | Creates, alters or drops tables, with a form or with DDL |

**Snowflake SQL Query**, **BigQuery SQL Query**, **Redshift SQL Query**, **Databricks SQL Query** and **Oracle SQL Query** work the same way as SQL Query, with the same fields and outputs. Each one uses its own connection.

What it does

## Troubleshooting

> [accordion] This query was not run because Allow Write Operations is off
>
> The query changes data or schema, or Noxus could not read it as a read-only query. Turn on **Allow Write Operations** if the change is intended, including for queries that create temporary tables.

> [accordion] The query returned more than ... rows, so only the first ... were kept
>
> Raise **Max rows**, or set it to 0 for no limit.

> [accordion] Failed to execute ... SQL query: ...
>
> The database rejected the query. The rest of the message is the database's reason.

> [accordion] Column type ... is not supported in General mode
>
> Switch to **Advanced** for arrays, defaults, custom types or other column options.

> [accordion] Advanced mode requires supported DDL syntax
>
> Advanced mode runs only CREATE, ALTER, DROP, TRUNCATE and COMMENT. For anything else, use SQL Query with **Allow Write Operations** on.

> [accordion] The schema change failed: ...
>
> The database refused the change. The rest of the message is its reason.

> [accordion] The query must be a single SELECT, or The query must only read data
>
> Database Row Added accepts one SELECT and nothing that writes. Remove any other statement.

> [accordion] On Microsoft SQL Server the query can't start with WITH
>
> Write the CTE as a subquery in the trigger's **Query**.

> [accordion] On Microsoft SQL Server, use a number or text column as the cursor
>
> SQL Server timestamps are more precise than the trigger can store. Use a number or text column, such as an id, as the **Cursor column**.

> [accordion] More than 1000 rows share the cursor value ...
>
> Pick a **Cursor column** with more distinct values, such as a unique id.

> [accordion] The query returned no ... column
>
> The **Cursor column** must be one of the columns the **Query** returns.

> [accordion] The query took longer than 30 seconds
>
> Make the trigger's **Query** faster, or have it return fewer rows.

> [accordion] Connection timed out
>
> Noxus could not reach the database when you saved the connection. Check **Host** and **Port**, and that the database accepts connections from Noxus.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.