Follow these instructions to replicate your Azure SQL database to your destination via Fivetran.
To connect your SQL Server database to Fivetran, you need:
- SQL Server version 2012 or above
- An Azure account with a DB Owner, SQL Server Contributor, or SQL Security Manager role
- ALTER ANY USER permissions in your database server
- Your database host’s IP (e.g.,
188.8.131.52) or domain (e.g.,
- Your database’s port (usually
- (If you want to connect using SSH) An SSH server
Choose connection method link
Decide whether to connect your SQL Server database directly or using an SSH tunnel.
Connect directly (TLS required)
IMPORTANT: You must have TLS enabled on your database to connect directly to Fivetran. Follow Azure’s TLS setup instructions to enable TLS on your database.
Fivetran connects directly to your database instance. This is the simplest connection method.
To connect directly, you will create a firewall rule to allow access to Fivetran’s IPs for your database’s region.
Connect using SSH (TLS optional)
Fivetran connects to a separate server in your network that provides an SSH tunnel to your database. You must connect through SSH if your database is in an inaccessible subnet on a virtual network.
To connect using SSH, you will create a firewall rule to allow access to your SSH tunnel server’s IP address.
Before you proceed to the next step, you must follow our SSH connection instructions to give Fivetran access to your SSH tunnel. If you want Fivetran to tunnel SSH over TLS, follow Azure’s TLS setup instructions to enable TLS on your database.
Configure a server firewall to grant Fivetran’s data processing servers access to your database.
Log in to the Azure console.
On the Azure main page, select SQL databases.
Click on the SQL database that you want to connect to Fivetran.
On the database overview page, find the server name and make a note of it. You will need it to configure Fivetran.
Click Set server firewall.
On the Firewall settings page, add a new firewall rule with a memorable name (for example,
Fivetran). What you enter in the IP fields depends on whether you’re connecting directly or using an SSH tunnel.
- If you’re connecting directly, enter Fivetran’s IPs for your database’s region.
- If you’re connecting using an SSH tunnel, enter your SSH tunnel server’s IP address.
Open a connection to your Azure SQL database.
Add a container database user for Fivetran by running the following command. Replace
<database>with the name of your database,
<username>with the username of your choice, and
<password>with a password of your choice:
USE; CREATE USER <username> WITH PASSWORD = '<password>';
Grant user permissionslink
Once you’ve created the Fivetran user, grant it SELECT permission for the database, schemas, tables, or specific columns you want Fivetran to sync. You can grant access to everything in a given database:
GRANT SELECT on DATABASE::to <username>;
or all tables in a given schema:
GRANT SELECT on SCHEMA::to <username>;
or a specific table:
GRANT SELECT ON. TO <username>;
or a set of specific columns in a table:
GRANT SELECT ON. ( , , ...) TO <username>;
or all but a set of specific columns in a table:
GRANT SELECT ON. TO <username>; DENY SELECT ON . ( , , ...) TO <username>;
Enable incremental updateslink
We use SQL Server’s built-in change tracking (CT) mechanism for incremental updates. When enabled, CT keeps a record of the table rows that have changed in a certain window of time (the default window is the most recent 2 days). This mechanism lets Fivetran copy only the rows that have changed since the last data sync so we don’t have to copy the whole table every time. To learn more about incremental updates, see our updating data documentation.
Enable change tracking at the database level:
ALTER DATABASESET CHANGE_TRACKING = ON;
Enable change tracking for each table you want to integrate:
ALTER TABLE. ENABLE CHANGE_TRACKING;
Grant the Fivetran user
VIEW CHANGE TRACKINGpermission for each of the tables that have change tracking enabled:
GRANT VIEW CHANGE TRACKING ON. TO <username>;
Finish Fivetran configurationlink
In your connector setup form, enter a destination schema prefix. This prefix applies to each replicated schema and cannot be changed once your connector is created.
In the Host field, enter your database host’s IP (for example,
184.108.40.206) or domain (for example,
Enter your database instance’s port number. The port number is usually
For the User, enter
<servername>is the first part of the server name you found in Step 2 (for example,
For the Password, enter the password for the Fivetran-specific user that you created in Step 3.
For the Database, enter the name of the database you want to connect to Fivetran.
Choose your connection method. If you selected Connect via an SSH tunnel, provide the following information:
- SSH hostname (do not use a load balancer’s IP address/hostname)
- SSH port
- SSH user
- If you enabled TLS on your database in Step 1, set the Require TLS through tunnel toggle to ON.
Click Save & Test. Fivetran tests and validates our connection to your Azure SQL database. Upon successful completion of the setup tests, you can sync your data using Fivetran.
Fivetran performs the following tests to ensure that we can connect to your Azure SQL database and that it is properly configured:
- The Connecting to SSH Tunnel Test validates the SSH tunnel details you provided in the setup form. It then checks that we can connect to your database using the SSH Tunnel. (We skip this test if you aren’t connecting using SSH.)
- The Connecting to Host Test validates the database credentials you provided in the setup form. It then verifies that the database host is not private and checks that we can connect to the host.
- The Validating Certificate Test generates a pop-up window where you must choose which certificate you want Fivetran to use. It then validates that certificate and checks that we can connect to your database using TLS. (We skip this test if you aren’t connecting directly.)
- The Connecting to Database Test checks that we can access your database.
- The Checking Access to Schema Test checks that we have the correct permissions to access the schemas in your database. It then verifies that your database contains at least one table.
- The Validating Replication Config Test verifies that your database has an incremental update mechanism enabled (either CDC or CT).
NOTE: The tests may take a few minutes to finish running.