Stitch Documentation
has moved!

Please update your bookmarks to

If you're not automatically redirected after 5 seconds, click here.

Connecting Microsoft SQL Server (MSSQL)

Replicating Views
Stitch supports replicating views for MSSQL. Click here for more info.

SSL Connections
Stitch supports SSL connections for MSSQL.

Trying to set up a Microsoft Azure database? 
See this doc for connection instructions.

Having trouble connecting?
Ensure that your SQL Server collation is case-insensitive.

We like to make things as easy as possible, but you'll need some tech expertise to connect your Microsoft SQL Server (MSSQL) database to Stitch. To do this, you should be comfortable with SQL and setting up server connections. We recommend looping in a developer to help you get things moving if you haven't done this before.

Connecting MSSQL is a six-step process:

  1. Check your server settings
  2. Whitelist the Stitch IP addresses
  3. Create an MSSQL Stitch user
  4. Enter the connection info into Stitch
  5. Define the Replication Frequency
  6. Select tables and columns to sync

If you need some help figuring out your hosting details, ping the developer helping you or feel free to get in touch with us.

Checking Your Server Settings

This is where being tech savvy or working with a developer will come in handy. Connecting a MSSQL database to Stitch requires that your server:

  • Allow connections over TCP/IP
  • Mixed mode authentication

Make sure your server is set up properly before continuing.

Whitelisting the Stitch IP Addresses

For the connection to be successful, you must configure your firewall to allow access from our IP addresses. Whitelist the following IPs before continuing onto the next step:


Creating a Stitch MSSQL User

To bring your MSSQL data into Stitch, the system will run SELECT queries on your database. Initially this is done to get a snapshot of the database's structure. After your first update cycle is complete, you can set Replication Methods for individual tables to potentially reduce your update times and the load on your server.

Creating a user with SELECT privileges can either be done via a query or the UI. In this section, we'll walk you through using the query method. 

Note that anything inside square brackets - [like this] - is something you need to define when running the commands yourself.

After logging in to your database, the first step is to create a SQL login for the database user. You can accomplish this by running the following query:

CREATE LOGIN [stitch_username] WITH PASSWORD=’[password]’

Next, we need to grant the user access to the database:

USE [database]

After we've successfully granted access, we need to create the database user and map them to the database:

CREATE USER [stitch_username] FOR LOGIN 

The last step is to grant the user SELECT privileges. Running the following query will give the user SELECT privileges to all tables in the database:

GRANT SELECT to [stitch_username]

If you don’t want to limit the Stitch user to specific tables, you can move onto the next section. If you do, however, you can use this query:

GRANT SELECT ON [schema name].[table name] TO [stitch_username]

The next step is to enter the credentials into Stitch and test the integration.

Entering Connection Info into Stitch

To wrap things up, we need to enter the connection and user info into Stitch.

  1. On the Stitch dashboard page, click the Add an Integration button.
  2. Click the MSSQL icon.

Enter the following info into this page:

  • Integration name: This is the name that will display on the Stitch dashboard for the integration; it’ll also be used to create the schema in your data warehouse.

    For example, the name “MSSQL Marketing” would create a schema called mssql_marketing in the data warehouse.
  • Username: The username for the MSSQL Stitch user
  • Password: The password for the MSSQL Stitch user
  • Port: MSSQL's port on your server
  • Host: By default, this will be localhost. In general, it will be the bind-address value for your MSSQL server, which by default is (localhost), but could also be some local network address (e.g. or your server's public IP address.

In addition, click the Connect using SSL checkbox if you're using an SSL connection.

In the next step, you'll define the integration's replication frequency and save the connection.

Defining the Replication Frequency

The Replication Frequency controls how often Stitch will attempt to replicate data from your data warehouse. By default, the frequency is set to 30 minutes, but you can change it to better suit your needs.

When you're finished, click the Save Integration button to save the connection.

Selecting Tables and Columns to Sync

Now that your MSSQL database is connected to Stitch, the next step is selecting the tables and fields you want to sync.


Was this article helpful?
0 out of 0 found this helpful


Questions or suggestions? If something in our documentation is unclear, let us know in the comments!