# Microsoft SQL Server

> Connect a Datahub dataflow to Microsoft SQL Server.

The Microsoft SQL Server node allows dataflows to connect directly to a Microsoft SQL Server database and execute SQL queries.

This node can be used to:

- Retrieve data from SQL Server
- Execute custom SQL queries
- Read database tables and views
- Integrate SQL Server data into dataflows

## Configuration

| Property | Description |
| --- | --- |
| Connection | The SQL Server connection to use. |
| Query | Opens the SQL query configuration window. The query is validated using the SQL dialect of the selected connection type. |
| Query timeout | Maximum execution time in seconds before the query is stopped. |

### Connection configuration

| Setting | Description |
| --- | --- |
| Name | Name of the connection. |
| Connection type | Database type being used. |
| Connection string | SQL Server connection string. |
| Connection timeout | Connection timeout duration in seconds. |

Example connection string:

```
Server=myServerAddress;
Database=myDataBase;
User Id=myUsername;
Password=myPassword;
Encrypt=True;
TrustServerCertificate=True;
```

Use the Validate button to test the connection before saving.

## When to use it

Use this node to read from or write to SQL Server tables, views or queries.

## Tips

- Validate the connection string and credentials.
- Limit queries to the data that the flow actually needs.