Share
Azure SQL Server (Edge) Setup Guide

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 Add Hevo IP Addresses to your Database Allowlist section.

To create a geo-replication database:

  1. Log in to the Azure Portal.

  2. Under Resources, select the database for which you want to create a geo-replication database.

    Select database

  3. In the left navigation pane, under Settings, click Geo-Replication.

  4. Under Target regions, select your target region.

    Select target region

  5. In the Create secondary page, specify your Target server, the Pricing tier, and then, click OK to create a secondary database.

    Create secondary page

A notification is displayed to confirm that the geo-replication database was created successfully.

Notification


Add Hevo IP Addresses to your Database Allowlist

You must add Hevo’s IP address for your region to the database IP allowlist, enabling Hevo to connect to your Azure SQL Server database. You can do this by creating firewall rules in your Microsoft Azure database settings as follows:

  1. Access your Azure MS SQL instance.

  2. Under Resources, select the database you want to synchronize with Hevo.

    Select Database

  3. In the right pane, click the Set server firewall tab to open the Firewall settings.

    Set Firewall

  4. Create a firewall rule:

    1. Specify a Rule name.

    2. 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.

      Set Firewall Rule

    3. Click Save.

    4. 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:

  • SELECT

  • VIEW CHANGE TRACKING

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:

    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:

  1. Log in to the Microsoft Azure Portal.

  2. Under Recent resources, select your SQL database.

    Select database

  3. In the Essentials panel, locate the Server name. Use this as the hostname while creating your Pipeline.

    Retrieve hostname

The default port value is 1433.


Specify Azure SQL Server Connection Settings

  1. In the Configure your Azure SQL Server Source page, specify the following:

    Azure SQL Server settings

      • Source Name: A unique name for your Source, not exceeding 50 characters. For example, Azure SQL Server.
    • Database Host: SQL Server host’s IP address or DNS.

      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.

    • Database Port: The port on which your SQL Server is listening for connections. Default value: 1433.

    • Database User: The read-only user who has the permissions to read tables in your database.

    • Database Password: The password for the read-only user.

    • Database Name: The database that you wish to replicate.

  2. Additional Settings

    • Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel instead of directly connecting your Azure SQL database host to Hevo. This provides an additional level of security to your database by not exposing your Azure SQL Server setup to the public. Read Connecting Through SSH.
      If this option is disabled, you must configure your Source to accept connections from Hevo’s IP addresses.

    • Use SSL: Enable this option to use an SSL-encrypted connection. Specify the following:

      • CA File: The file containing the SSL server certificate authority (CA).

      • Client Certificate: The client’s public key certificate file.

      • Client Key: The client’s private key file.

  3. Click Test & Continue.

Last updated on Dec 17, 2024

Tell us what went wrong

Skip to the section