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

# Microsoft SQL Server as a data source

> Bring data from Microsoft SQL Server to Nekt.

SQL Server is Microsoft's relational database management system designed for enterprise applications and data warehousing. It provides robust data storage, advanced analytics, and business intelligence capabilities with features for high availability, security, and performance optimization.

<img height="50" src="https://mintcdn.com/nekt/ACccwuqhDqzX14tV/assets/logo/logo-sqlserver.png?fit=max&auto=format&n=ACccwuqhDqzX14tV&q=85&s=59e5ce8d6c9c381ded656b036b38b647" data-path="assets/logo/logo-sqlserver.png" />

## Required pre work

In order to connect Nekt to a database, you have to do some pre work to ensure access is granted in a secure way. So, make sure to check [this guide](/sources/pre-work-db-connection) before proceeding.

## 1. Add account access

1. Once you have done the pre work defined in section 0, you can inform your database accesses. In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Postgres option from the list of connectors.

2. Click **Next** and you'll be prompted to add your database access.

<Note>
  You must ensure your database accepts incoming connections from Nekt, and the database user has `SELECT` permissions in order to fetch data.
</Note>

3. Click **Next**.

<Accordion title="Advanced Configuration: Filtering Tables">
  If you have a large database with many tables, you can use the `filter_tables` configuration option to speed up discovery and limit which tables are available for sync. This is particularly useful for databases with hundreds or thousands of tables.

  **Table Filtering Format:**

  Tables can be specified as a comma-separated list with the following patterns:

  * `schema.table` - Match a specific table in a specific schema
  * `table` - Match a table with this name in any schema
  * Wildcard patterns using `*` (matches any sequence) and `?` (matches single character)

  **Examples:**

  Basic filtering:

  ```json theme={null}
  "dbo.customers,dbo.orders,products"
  ```

  Using wildcards:

  ```json theme={null}
  "user_*,dbo.order_*,temp_????"
  ```

  This would match:

  * `user_accounts`, `user_profiles`, etc. (in any schema)
  * `dbo.order_items`, `dbo.order_history`, etc. (in dbo schema only)
  * `temp_2023`, `temp_test`, etc. (exactly 4 characters after `temp_`)

  If `filter_tables` is not specified, all tables in the selected schemas will be available.
</Accordion>

### 2. Select streams

Choose which data streams you want to sync - you can select all streams or pick specific ones that matter most to you. We recommend selecting only the tables that are useful for you from you. You can add new tables at anytime after the source is created.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select a name for each table (which will contain the fetched data) and the type of sync.

* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** and make this process faster!

* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new data - which is good if, for example, you want to keep every record ever fetched.
  * Full table: every time the extraction happens, we'll get the current state of the data - which is good if, for example, you don't want to have deleted data in your catalog.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/get-started/core-concepts/triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can determine when to execute a [full sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync). This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

<Card title="Download Microsoft SQL Server skills file" icon="wand-magic-sparkles" href="/sources/microsoft-sql-server.md">
  Microsoft SQL Server connector documentation as plain markdown, for use in AI agent contexts.
</Card>
