Azure SQL Server
On This Page
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.
The MS SQL Server version is 2008 or higher.
CHANGE TRACKING and ALTER DATABASE privileges are granted to the database user, if Pipeline Mode is Change Tracking or Table, and Query mode is Change Tracking.
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, select the database for which you want to create a geo-replication database.
In the left navigation pane, under Settings, click Geo-Replication.
Under Target regions, select your target region.
In the Create secondary page, specify your Target server, the Pricing tier, and then, click OK to create a secondary 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, select the database you want to synchronize with Hevo.
In the right pane, click the Set server firewall tab to open the Firewall settings.
Create a firewall rule:
Specify a Rule name.
Specify Hevo’s IP addresses in the Start IP and End IP fields as per your region.
Note: As Hevo has specific IP addresses and not a range, the value in Start IP and End IP fields is the same.
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:
Enable change tracking at the database level:
ALTER DATABASE [<database>] SET CHANGE_TRACKING = ON;
Enable change tracking for each table you want to integrate:
ALTER TABLE [<schema>].[<table>] ENABLE CHANGE_TRACKING;
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:
SELECTprivilege at the table and schema level:
GRANT SELECT ON <schema_name>.<table_name> TO <username>;
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.
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 Recent resources, 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
In the Configure your Azure SQL Server Source page, specify the following:
Pipeline Name: A unique name for the Pipeline.
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 22.214.171.124
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.
For Ingestion mode as Table, read Object Settings for steps to configure the objects to be replicated.
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.
- 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 change this setting later.
Click TEST & CONTINUE to proceed for setting up the Destination.
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.
Refer to the following table for the list of key updates made to this page:
|Date||Release||Description of Change|
|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.|
- Create a Geo-replication Database
- Create a User and Grant Privileges
- Retrieve the Hostname and Port Number