Prerequisites
Set up an SQL Server Instance (Optional)
To create a SQL Server database that you can use as a Destination in Hevo, you must have an active SQL Server instance. The steps to set up an SQL Server instance depend on whether you are using an on-premise SQL Server or an Azure SQL Database.
Set up an on-premise SQL Server Instance
This section explains the steps to install the SQL Server 2019 Evaluation Edition on a Microsoft Windows Server 2019. To continue using SQL Server post-trial expiry, you must upgrade to the SQL Server Enterprise or Standard Edition. Read SQL Server 2019: Hardware and software requirements for the hardware and software you need to install and set up SQL Server 2019.
Note: You must have administrative rights on the Windows server to set up the SQL Server instance.
1. Download SQL Server on Windows
-
Go to Microsoft Evaluation Center.
-
In the navigation bar, click SQL Server, and select SQL Server 2019 from the drop-down.

-
In the SQL Server 2019 page, click the Get Started for free tab, and then click Download the EXE.

-
In the Evaluate SQL Server 2019 page, specify the following and click Download now:

-
Provide your details such as First name, Last name, and Job role.
-
Provide your company details such as the name, its size, and country/region.
-
Provide your email address that you want to register for the free trial.
-
In the Please select your SQL Server 2019 download page, under EXE download, select 64-bit edition and save the server setup file.

-
Proceed to install the SQL Server.
2. Install the SQL Server on Windows
-
Go to the location where you saved the SQL Server setup file. For example, C:\MSSQL.
-
Launch the SQL Server setup file, SQL2019-SSEI-Eval.exe, and in the Select an installation type window, select Basic.

The Basic installation installs the SQL Server with the default configuration and starts the instance. Select the Custom installation type if you want to manually pick the components to install. You can select Download Media to download the installation file, to install the SQL Server later. Read the SQL Server installation guide for further guidance.
-
In the Microsoft SQL Server License Terms window, review and accept the license terms.

-
In the Specify SQL Server install location window, specify the INSTALL LOCATION, and click Install to start the installation process.

-
Click Connect Now if you want to connect to the installed SQL Server. This opens a command line window for testing the connection.

-
Click Install SSMS to install the SQL Server Management Studio (SSMS). You can use SSMS to connect to and manage your SQL Server instances and perform operations in it, such as changing the authentication method and creating login users and databases.
You have successfully installed the SQL Server and started the instance.
Set up an Azure SQL Database logical server
An Azure SQL database logical server is a central administrative container for your SQL databases. It manages the login credentials, firewall rules, and security settings for all databases hosted under it.
Perform the following steps to create an Azure SQL database logical server:
-
Log in to the Azure Portal.
-
In the top search bar, search for and select Azure SQL.

-
In the left navigation pane, under Azure SQL Database, click SQL logical servers, and then click + Create.

-
On the Create SQL Database Server page, in the Basics tab, do the following:

-
In the Project details section:
-
Subscription: Select your Azure subscription from the drop-down.
-
Resource group: Select an existing resource group from the drop-down or click Create new to create one. Read Azure Resource Groups to know more about creating and managing resource groups in Azure.
-
In the Server details section:
-
Server name: Specify a unique name for your server.
Note: The server is accessible at <server-name>.database.windows.net. Use this value as Database Host while configuring your SQL Server Destination in Hevo.
-
Location: Select the region from the drop-down where you want to host your server.
-
In the Authentication section, choose one of the following Authentication method options as per your requirements:
-
Use Microsoft Entra-only authentication: To connect to Hevo using a Client ID and Client Secret.
-
Use both SQL and Microsoft Entra authentication: To connect to Hevo using either a Client ID and Client Secret or a database username and password.
-
Click Review + create.
-
In the Review + create tab, review your configuration and click Create to create the logical server.
A notification is displayed confirming that the logical server has been successfully created.
Create a Database in the SQL Server Instance (Optional)
Once you have set up your SQL Server instance, create a database in it to use as a Destination. The steps to create a database depend on whether you are using an on-premise SQL Server or an Azure SQL Server.
Create a database in on-premise SQL Server
Note: Replace the placeholder values in all the commands with your own. For example, <database_name> with MSSQLDestination.
1. Create a database in your SQL Server
-
Open the SQL Server Management Studio (SSMS).
-
Connect to your SQL Server using a SQL login with the required privileges. Refer to Create a database user for Username and Password authentication section for steps to create one.

-
In the Object Explorer, under your SQL server name, right-click on Databases, and select New Database.

-
In the New Database dialog, specify a Database name, and click OK, to create the database.

You can provide this database name while configuring your SQL Server Destination.
2. Create a schema in your database (Optional)
-
Log in to your SQL Server instance as a master user using an SQL client tool, such as sqlcmd. For example, sqlcmd -U hevouser.
-
Enter the following commands to access your database and create a schema in it:
USE [<your_database_name>]
GO
CREATE SCHEMA [<schema_name>]
GO
You can provide this schema name while configuring your SQL Server Destination.
Create a database in Azure SQL Server
Perform the following steps to create a database in an Azure SQL Server:
-
Log in to the Azure Portal.
-
In the top search bar, search for and select Azure SQL.

-
In the left navigation pane, under Azure SQL Database, click SQL databases, and then click + Create.

-
On the Create SQL Database page, in the Basics tab, specify the following:

-
In the Project details section:
-
Subscription: Select your Azure subscription.
-
Resource group: Select an existing resource group from the drop-down or click Create new to create one. Read Azure Resource Groups to know more about creating and managing resource groups in Azure.
-
In the Database details section:
-
Database name: Specify a unique name for your database. Use this as Database Name while configuring your SQL Server Destination in Hevo.
-
Server: Select the logical server you created in the Set up an Azure SQL Database logical server section.
-
Workload environment: Choose Development or Production based on your requirements. This setting applies default performance and configuration settings appropriate for each environment. You can modify these settings after creation.
-
Click Review + create.
-
In the Review + create tab, review your configuration and click Create to create the database.
A notification is displayed confirming that the database has been successfully created.
Allowlist Hevo IP Addresses for your Region
You must allowlist the Hevo IP addresses for your region to enable Hevo to connect to your SQL Server Destination. The steps to allowlist these IP addresses depend on whether you are using an on-premise SQL Server or an Azure SQL Server.
To allow Hevo to connect to your on-premise SQL Server, perform the following steps:
-
Enable the TCP/IP port
-
Verify the TCP/IP port
-
Restart the SQL Server instance
-
Create inbound rules
1. Enable the TCP/IP port
The TCP/IP protocol enables Hevo to communicate with your SQL Server instance over the network. To do this:
-
Open the SQL Server Configuration Manager.
-
In the left pane, click SQL Server Network Configuration, and then double-click Protocols for <Your SQL Server Instance Name>. The default instance names are MSSQLSERVER and MSSQLSERVER01.

-
In the right pane, if the Status field of the TCP/IP Protocol Name is Disabled, then perform this step. Else, skip to the Verify the TCP/IP port section.
-
Right-click TCP/IP and select Enable.

-
Click OK to acknowledge the dialog box that warns you to restart the services for the changes to take effect.
2. Verify the TCP/IP port
After enabling TCP/IP, verify the port on which your SQL Server instance is listening for connections. To do this:
-
Right-click the TCP/IP Protocol Name and select Properties.

-
In the TCP/IP Properties dialog, click the IP Addresses tab.
-
Scroll down to the IPAll section and note the TCP Port for your SQL Server instance.

-
Click OK.
3. Restart the SQL Server instance
Once you have verified the TCP/IP port, restart the SQL Server instance for the changes to take effect. To do this:
-
In the left pane, click SQL Server Services.
-
In the right pane, right-click the SQL Server (<Your SQL Server Instance Name>) and select Restart.

You have successfully enabled TCP/IP for your SQL Server instance.
4. Create inbound rules
After restarting the SQL Server instance, create an inbound rule to allowlist Hevo’s IP addresses for your region. To do this:
-
Press Windows + R to open the Run dialog box.
-
Type wf.msc in the Open field and click OK.

-
In the window that appears, click Inbound Rules in the left pane, and then click New Rule in the right pane.

-
In the Rule Type dialog, select Custom and click Next.

-
In the Program dialog, select This program path, specify the path to the sqlservr.exe file, and then click Next.
Note: The sqlservr.exe file is generally found in the %ProgramFiles%\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn\ folder.

-
In the Protocol and Ports dialog, do the following:

-
Select TCP from the Protocol type drop-down.
-
Select Specific Ports from the Local port drop-down.
-
Specify the port on which your SQL Server listens for connections.
Note: By default, SQL Server listens for connections on port 1433.
-
Click Next.
-
In the Scope dialog, select These IP addresses and click Add.

-
In the IP Address window that appears, enter Hevo’s IP address for your region and click OK.

-
(Optional) Click Add and repeat step 8 to allowlist all the IP addresses for your region.
-
Click Next.
-
In the Action dialog, ensure that Allow the connection is selected and click Next.

-
In the Profile dialog, ensure that all the check boxes are selected and click Next.

-
In the Name dialog, specify a name for your inbound rule and click Finish.

Create Firewall Rules for Azure SQL Server
Perform the following steps to create the firewall rules in your SQL database network settings to allowlist the Hevo IP addresses for your region:
-
Log in to the Azure Portal.
-
Under Azure services, select More services.

-
On the All services page, search for and select All resources.

-
On the All resources page, click the SQL database you want to connect to Hevo.

-
In the right pane of <Your Database Name> page, click Set server firewall.

-
On the Networking page, under the Public access tab, select the Selected networks option.

-
Under Firewall rules, click + Add a firewall rule.

-
In the Add a firewall rule dialog box, do the following to add your firewall rule:

-
Specify the following:
-
Rule name: A name to identify the rule. For example, HevoIndia.
-
Start IP: The starting address of the IP range.
-
End IP: The ending address of the IP range.
Note: As Hevo has specific IP addresses and not a range, the value in the Start IP and End IP fields is the same. For example, 13.235.131.126 for the India region.
-
Click OK.
-
Repeat steps 7 and 8 to add all the IP addresses for your Hevo region.
-
Click Save to save the firewall rules.

Set up Microsoft Entra ID Authentication
Note: This section is applicable only if you want to configure your SQL Server Destination using Microsoft Entra ID authentication.
Microsoft Entra ID is a cloud-based identity and access management service that allows you to create and manage application identities called Service Principals, which can be granted access to your Azure resources. A Service Principal acts as a dedicated identity for an application, similar to how a user account represents a person.
To connect your SQL Server Destination to Hevo using Microsoft Entra ID authentication, perform the following steps:
-
Register a Service Principal in Microsoft Entra ID
-
Generate a Client Secret for the Service Principal
1. Register a Service Principal in Microsoft Entra ID
Perform the following steps to register a Service Principal in Microsoft Entra ID:
-
Log in to the Azure Portal.
-
In the top search bar, search for and select Microsoft Entra ID.

-
In the left navigation pane, click Manage, and then click App registrations.

-
On the App registrations page, click + New registration.

-
On the Register an application page, do the following:

-
Name: Specify a unique name for your app. For example, Hevo-SQL-Server-Connector.
-
Supported account types: Select the scope of accounts that can use this application. To know more about the available options, refer to Supported account types in Microsoft Entra ID.
-
Click Register to register the application in Microsoft Entra ID.
-
In the Essentials section, copy and save the Application (client) ID. Use this value as Client ID while configuring your SQL Server Destination in Hevo.

2. Generate a Client Secret for the Service Principal
Perform the following steps to generate a Client Secret for the Service Principal:
-
In the left navigation pane, under Manage, click Certificates & secrets.

-
In the Client secrets tab, click + New client secret.

-
In the Add a client secret slide-in page, do the following:

-
Click Add.
-
In the Client secrets tab, copy the Value of the secret and save it securely like any other password.

Use this as Client Secret while configuring your SQL Server Destination in Hevo.
Note: If the Client Secret configured in the Destination expires or is revoked from the Microsoft Entra ID portal, Hevo cannot authenticate with the Destination. As a result, no data is loaded. To resume data replication, modify the Destination configuration with a valid Client Secret. Once the updated secret is saved, Hevo re-authenticates the Destination, and data loading resumes.
Create a Database User and Grant Privileges
1. Create a database user (Optional)
The steps to create a database user depend on the authentication method you want to use to connect your SQL Server Destination to Hevo.
Create a database user for Username and Password authentication
Note: Skip to the Grant privileges for Username and Password authentication section if you are using an existing database user.
Perform the following steps to create a database user in your SQL Server database:
-
Connect to your SQL Server database as an admin user with any SQL client tool, such as sqlcmd.
-
Run the following commands:
-- Select the master database to create a login
USE master;
CREATE LOGIN <login_user> WITH PASSWORD = '<password>';
-- Add a database user to your database for the login created above
USE <database_name>;
CREATE USER <database_user> FOR LOGIN <login_user>;
Note: Replace the placeholder values in the commands above with your own. For example, <login_user> with hevouser.
Create a database user for Microsoft Entra ID authentication
To allow Hevo to connect to your Azure SQL database using Microsoft Entra ID authentication, you must create an external user for the Service Principal you registered in the Set up Microsoft Entra ID Authentication section. Perform the following steps to do this:
-
Connect to your Azure SQL database as an admin user with any SQL client tool, such as sqlcmd.
-
Run the following command to create a database user for the Service Principal:
USE [<database_name>];
GO
CREATE USER [<service_principal_name>] FROM EXTERNAL PROVIDER;
Note: Replace the placeholder values in the commands above with your own. For example, <service_principal_name> with the name of the Service Principal you registered in the Set up Microsoft Entra ID Authentication section.
2. Grant privileges to the database user
The privileges that Hevo requires to connect to and load data into your SQL Server Destination depend on the authentication method you select while configuring your Destination.
Grant privileges for Username and Password authentication
The following table lists the privileges that Hevo requires to connect to and load data into your SQL Server Destination:
| Privilege Name |
Privilege Description |
Applies to |
| ALTER |
Allows Hevo to create, alter, and drop objects from the schema. |
SCHEMA |
| INSERT |
Allows Hevo to insert rows, synonyms, tables and columns, and views and columns into the schema or database. |
- SCHEMA - DATABASE |
| SELECT |
Allows Hevo to select rows, synonyms, tables and columns, and views and columns from the schema or database. |
- SCHEMA - DATABASE |
| UPDATE |
Allows Hevo to update rows, synonyms, tables and columns, and views and columns in the schema or database. |
- SCHEMA - DATABASE |
| CREATE TABLE |
Allows Hevo to create tables in the database. |
DATABASE |
Perform the following steps to grant the required privileges to the database user for creating the database objects needed to load and store your data:
-
Log in to your SQL Server instance as a login user using an SQL client tool, such as sqlcmd. For example, sqlcmd -U hevouser.
-
Enter the following command to access the database in which you created the database user:
-
Enter the following commands to grant privileges to the database user:
GRANT ALTER, SELECT, INSERT, UPDATE ON SCHEMA::<schema_name> TO <username>
GO
GRANT CREATE TABLE, INSERT, SELECT, UPDATE ON DATABASE::<database_name> to <username>
GO
Note: Replace the placeholder values in all the commands above with your own.
Grant privileges for Microsoft Entra ID authentication
To allow Hevo to read data from and write data to your Azure SQL database, you must grant the Service Principal the following privileges:
| Privilege |
Allows Hevo to |
| db_datareader |
Read data from all tables in your database. |
| db_datawriter |
Write data to all tables in your database. |
| CREATE TABLE |
Create tables in your database during the historical load. |
| ALTER on SCHEMA |
Create, alter, and drop objects from the schema. |
Perform the following steps to grant these privileges to the Service Principal:
-
Connect to your Azure SQL database as an admin user with any SQL client tool, such as sqlcmd.
-
Run the following commands:
USE [<database_name>];
GO
ALTER ROLE db_datareader ADD MEMBER [<service_principal_name>];
ALTER ROLE db_datawriter ADD MEMBER [<service_principal_name>];
GRANT CREATE TABLE TO [<service_principal_name>];
GRANT ALTER ON SCHEMA::<schema_name> TO [<service_principal_name>];
Note: Replace the placeholder values in the commands above with your own. For example, <service_principal_name> with the name of the Service Principal you registered in the Set up Microsoft Entra ID Authentication section.