Azure MS SQL Database is an intelligent, scalable, and relational database service built for the cloud. It can automate your database management and maintenance, including routine updates, backups, and security, enabling you to focus on working with your data.
You can ingest data from your Azure MS SQL database using Hevo Pipelines and replicate it to a Destination of your choice.
Prerequisites
Perform the following steps to configure your Azure MS SQL Source:
Create a Geo-Replication Database (Optional)
Geo-Replication is an Azure SQL database feature that allows you to create a readable secondary database in the same region or different regions.
Note: Creation of geo-replication database incurs additional costs.
To use an existing, active geo-replication database or connect Hevo to your master database, skip to Whitelist Hevo’s IP Addresses section.
To create a geo-replication database:
-
Log in to the Azure Portal.
-
Under Resources, Recent tab, select the database for which you want to create a geo-replication database.
-
In the left navigation pane, under Data management, click Replicas, and then click + Create replica.
-
On the Create SQL Database - Geo Replica page, below the Server drop-down, click Create new.
-
On the Create SQL Database Server page, specify the Server name and Location, and then click OK to create the SQL database server.
-
On the Create SQL Database - Geo Replica page, specify the Compute + Storage, and then click Review + Create to review your configuration.
-
Click Create to create a geo-replication database.
A notification is displayed to confirm that the geo-replication database was created successfully.
Whitelist Hevo’s IP Addresses
You need to whitelist the Hevo IP addresses for your region to enable Hevo to connect to your Azure SQL database. You can do this by creating firewall rules in your Microsoft Azure database settings as follows:
-
Access your Azure MS SQL instance.
-
Under Resources, Recent tab, select the database you want to synchronize with Hevo.
-
In the right pane, click the Set server firewall tab to open the Firewall settings.
-
Under Public access tab, select the Selected networks option, and then click + Add a firewall rule.
-
Specify a Rule name.
-
Specify Hevo’s IP addresses in the Start IP and End IP fields as per your region, and then click OK.
Note: As Hevo has specific IP addresses and not a range, the value in Start IP and End IP fields is the same.
-
Click Save.
-
Repeat this step to add the IP address for each applicable Hevo region.
Enable Change Tracking
The Change Tracking mechanism captures changes made to a database. In order to enable, or disable change tracking, the database user must have the ALTER DATABASE
privilege.
To enable change tracking, connect your Azure SQL Database in your SQL Client tool, and enter these commands:
Create a Database User and Grant Privileges
1. Create a database user (optional)
To create a database user, open your Azure MS SQL database in your SQL client tool and enter the following commands:
USE [<database>]; # <database> is the database name
CREATE USER hevo WITH PASSWORD = '<password>';
This creates a contained database user who grants access to the database user on an individual database level instead of the master database level.
2. Grant privileges to the user
The database user specified in the Hevo Pipeline must have the following global privileges:
To assign these privileges, connect your Azure SQL Database in your SQL Client tool, and enter these commands:
-
Grant SELECT
privilege at the table and schema level:
GRANT SELECT ON <schema_name>.<table_name> TO <username>;
-
Grant VIEW CHANGE TRACKING
privilege, if Pipeline Mode is Change Tracking or Table, and Query mode is Change Tracking:
GRANT VIEW CHANGE TRACKING ON <schema_name>.<table_name> TO <username>;
Retrieve the Hostname and Port Number (Optional)
Note: The Azure MS SQL hostnames start with your database name and end with windows.net.
For example:
Host : mssql.database.windows.net
Port : 1433
Refer to the steps below to gather the configuration details required to create your Hevo Pipeline:
To retrieve the hostname:
-
Log in to the Microsoft Azure Portal.
-
Under Resources, Recent tab, select your SQL database.
-
In the Essentials panel, locate the Server name. Use this as the hostname while creating your Pipeline.
The default port value is 1433.
Specify Azure SQL Server Connection Settings
Perform the following steps to configure Azure SQL Server as a Source in Hevo:
-
Click PIPELINES in the Navigation Bar.
-
Click + CREATE PIPELINE in the Pipelines List View.
-
On the Select Source Type page, select Azure SQL Server.
-
On the Configure your Azure SQL Server Source page, specify the following:
-
Pipeline Name: A unique name for the Pipeline, not exceeding 255 characters.
-
SQL Server Host: SQL Server host’s IP address or DNS.
The following table lists a few examples of SQL Server hosts:
Variant |
Host |
Amazon RDS SQL Server |
ms-sql-server-1.xxxxx.rds.amazonaws.com |
Azure MS SQL |
mssql.database.windows.net |
Generic MS SQL |
10.123.10.001 or mssql.westeros.inc |
Google Cloud SQL Server |
35.220.150.0 |
Note: For URL-based hostnames, exclude the http:// or https:// part. For example, if the hostname URL is https://mssql.database.windows.net, enter mssql.database.windows.net.
-
SQL Server Port: The port on which your SQL Server is listening for connections. Default value: 1433.
-
SQL Server User: The read-only user who has the permissions to read tables in your database.
-
SQL Server Password: The password for the read-only user.
-
Select an Ingestion Mode: The desired mode by which you want to ingest data from the Source. You can expand this section by clicking SEE MORE to view the list of ingestion modes to choose from. Default value: Change Tracking. The available ingestion modes are Change Tracking, Table, and Custom SQL.
Depending on the ingestion mode you select, you must configure the objects to be replicated. Refer to section, Object and Query Mode Settings for the steps to do this.
Note: For Custom SQL ingestion mode, all Events loaded to the Destination are billable.
-
Database Name: The database that you wish to replicate.
-
Schema Name: The schema that holds the tables to be replicated. Default value: dbo.
-
Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel, instead of directly connecting your SQL Server database host to Hevo. This provides an additional level of security to your database by not exposing your SQL Server setup to the public. Read Connecting Through SSH.
If this option is disabled, you must whitelist Hevo’s IP addresses. Refer to the content for your SQL Server variant for steps to do this.
-
Advanced Settings:
-
Include New Tables in the Pipeline: Applicable for all ingestion modes except Custom SQL. If enabled, Hevo automatically ingests data from tables created after the Pipeline has been built. If disabled, the new tables are listed in the Pipeline Detailed View in Skipped state, and you can manually include the ones you want and load their historical data. You can include these objects post-Pipeline creation to ingest data.
You can change this setting later.
-
Click TEST CONNECTION. This button is enabled once you specify all the mandatory fields. Hevo’s underlying connectivity checker validates the connection settings you provide.
-
Click TEST & CONTINUE to proceed for setting up the Destination. This button is enabled once you specify all the mandatory fields.
Object and Query Mode Settings
Once you have specified the Source connection settings in Step 6 above, do one of the following:
-
For Pipelines configured with the Change Tracking ingestion mode:
-
On the Select Objects page, select the objects you want to replicate.
-
Click CONTINUE. This button is enabled once you select at least one object for which Change Tracking is enabled.
Note:
-
Each object represents a table in your database.
-
You must enable Change Tracking for the objects you want to ingest data from. If disabled, Hevo adds these objects to your Pipeline in the SKIPPED state.
-
For customers signing up after Release 2.19, Hevo automatically uses the Unique Incrementing Append Only (UIAO) query mode for the objects that contain a unique column. For the others, it ingests data using the Full Load query mode.
-
For Pipelines configured with the Table ingestion mode:
-
On the Select Objects page, select the objects you want to replicate and click CONTINUE.
Note: Each object represents a table in your database.
-
On the Configure Objects page, specify the query mode you want to use for each selected object.
-
For Pipelines configured with the Custom SQL ingestion mode:
-
On the Provide Query Settings page, enter the custom SQL query to fetch data from the Source.
-
In the Query Mode drop-down, select the query mode, and click CONTINUE.
Data Replication
For Teams Created |
Default Ingestion Frequency |
Minimum Ingestion Frequency |
Maximum Ingestion Frequency |
Custom Frequency Range (in Hrs) |
Before Release 2.21 |
15 Mins |
5 Mins |
24 Hrs |
1-24 |
After Release 2.21 |
6 Hrs |
30 Mins |
24 Hrs |
1-24 |
Note: The custom frequency must be set in hours as an integer value. For example, 1, 2, or 3 but not 1.5 or 1.75.
- Historical Data: In the first run of the Pipeline, Hevo ingests all available data for the selected objects from your Source database.
- Incremental Data: Once the historical load is complete, data is ingested as per the ingestion frequency.
Read the detailed Hevo documentation for the following related topics:
Error 1003 - Authentication error
Potential Causes
- The credentials of the database user authorizing the connection are incorrect.
Suggested Actions
-
Verify that the password entered in the Configure your Source page for the authorizing user is correct.
-
Invite another team member with the required privileges to set up the Pipeline. Read Inviting and Moderating Team Members.
Error 1005 - Connection timeout
Potential Causes
- The database connection details are incorrect.
- Hevo’s IP addresses are not whitelisted.
Suggested Actions
-
Verify that the Database name entered in the Configure your Source page is correct.
-
Verify that the Database Port entered in the Configure your Source page is correct.
-
Verify that Hevo’s IP addresses for your region are whitelisted. Refer to the following for more information:
-
Set permissions for the respective SQL Server Source variant as follows:
-
Invite another team member with the required privileges to set up the Pipeline. Read Inviting and Moderating Team Members.
Error 1006 - Insufficient access
Potential Causes
- Hevo’s IP addresses are not whitelisted.
Suggested Actions
Error 1011 - Access denied
Potential Causes
- The username or password is incorrect.
Suggested Actions
-
Verify that the Database user entered in the Configure your Source page is correct.
-
Verify that the Database password entered in the Configure your Source page is correct.
-
Invite another team member with the required privileges to set up the Pipeline. Read Inviting and Moderating Team Members.
Limitations
-
Hevo does not support Azure CDC for replication.
-
Hevo does not fetch Views from the Azure MS SQL database automatically. As a workaround, you can create individual Pipelines in Custom SQL mode to fetch each View. However, some limitations may arise based on the type of data synchronization, the query mode, or the number of Events. Contact Hevo Support for more details.
-
Hevo does not support data replication from temporary tables.
-
Hevo does not load an Event into the Destination table if its size exceeds 128 MB, which may lead to discrepancies between your Source and Destination data. To avoid such a scenario, ensure that each row in your Source objects contains less than 100 MB of data.
Revision History
Refer to the following table for the list of key updates made to this page:
Date |
Release |
Description of Change |
Jan-07-2025 |
NA |
Updated the Limitations section to add information on Event size. |
Nov-11-2024 |
NA |
Updated sections, Create a Geo-Replication Database (Optional) and Whitelist Hevo’s IP Addresses as per the latest Azure SQL Server UI. |
Apr-29-2024 |
NA |
Updated section, Specify Azure SQL Server Connection Settings to include more detailed steps. |
Mar-05-2024 |
2.21 |
Added the Data Replication section. |
Jan-15-2024 |
NA |
Updated section, Limitations to add information about Hevo not supporting data replication from temporary tables. |
Jan-10-2024 |
2.19 |
Updated section, Object and Query Mode Settings as per the latest Hevo functionality. |
Nov-03-2023 |
NA |
Added section, Object and Query Mode Settings. |
Apr-21-2023 |
NA |
Updated section, Specify Azure SQL Server Connection Settings to add a note to inform users that all loaded Events are billable for Custom SQL mode-based Pipelines. |
Mar-09-2023 |
2.09 |
Updated section, Specify Azure SQL Server Connection Settings to mention about SEE MORE in the Select an Ingestion Mode section. |
Dec-07-2022 |
2.03 |
Updated section, Specify Azure SQL Server Connection Settings to mention about including skipped objects post-Pipeline creation. |
Dec-07-2022 |
2.03 |
Updated section, Specify Azure SQL Server Connection Settings to mention about the connectivity checker. |
Apr-21-2022 |
1.86 |
Updated section, Specify Azure SQL Server Connection Settings. |
Sep-08-2021 |
NA |
- Updated the third list item under Prerequisites - Updated sub-section Grant privileges to the user. |
Jul-26-2021 |
1.68 |
Added a note for the SQL Server Host field. |
Jul-12-2021 |
NA |
Added section, Specify Azure MS SQL Connection Settings. |
Apr-20-2021 |
1.61 |
Added the second bullet point to the Limitations section. |
Mar-09-2021 |
1.58 |
Replaced references to Logical Replication with Change Tracking as Change Tracking is a distinct Pipeline mode for SQL Server Source types. |
Feb-22-2021 |
1.57 |
Added sections: - Create a Geo-replication Database - Create a User and Grant Privileges - Retrieve the Hostname and Port Number |