Amazon RDS MS SQL
ON THIS PAGE
Amazon Relational Database Service (RDS) allows you to deploy, and scale multiple editions of MS SQL Server in minutes with cost-efficient and resizable compute capacity.
You can ingest data from your Amazon RDS MS SQL Server using Hevo Pipelines and replicate it to a Destination of your choice.
Prerequisites
-
The MS SQL Server version is 2008 or higher.
-
If Pipeline mode is Change Tracking:
-
SELECT and VIEW CHANGE TRACKING privileges are granted to the database user.
Perform the following steps to configure your Amazon RDS MS SQL Source:
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 Amazon RDS MS SQL database in your SQL Client tool, and enter these commands:
-
Enable change tracking at the database level:
ALTER DATABASE <database_name> SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 3 DAYS, AUTO_CLEANUP = ON)
The
CHANGE_RETENTION
value specifies the time period for which change tracking information is retained. You can useAUTO_CLEANUP
to enable or disable the cleanup task that removes old change tracking information. Read Enable Change Tracking for a Database. -
Enable change tracking at the table level:
ALTER TABLE <schema_name>.<table> ENABLE CHANGE_TRACKING
Repeat this step for each table you want to replicate using log-based incremental replication. Read Enable Change Tracking for a Table.
Note: Hevo does not support Change Data Capture (CDC) for Amazon RDS MS SQL.
Whitelist Hevo’s IP Addresses
You need to whitelist the Hevo IP addresses for your region to enable Hevo to connect to your Amazon RDS MS SQL database. To do this:
-
Open the Amazon RDS console.
-
In the left navigation pane, click Databases (or Instances if you are using an older version).
-
In the Databases section on the right, click the DB identifier of the Amazon RDS MS SQL instance.
Note: The instance does not necessarily have to be a replica as long as it whitelists Hevo’s IP address for the region.
-
In the Connectivity & security tab, ensure Public Accessibility is set to Yes.
-
Click the link text under Security, VPC security groups to open the Security Groups panel.
-
In the Security Groups panel, click Inbound rules tab, and then, Edit inbound rules.
-
In the Edit inbound rules page:
-
Click Add rule.
-
In the Port range column, enter the port of your Amazon RDS MS SQL instance. The default value is 1433.
-
In the Source column, select Custom from the drop-down and enter Hevo’s IP addresses for your region.
-
Click Save rules.
-
-
Click the Outbound rules tab, and then, Edit outbound rules.
-
Repeat step 7, to configure Outbound Rules.
Create a User and Grant Privileges
1. Create a user (optional)
To create a database user, log in to your Amazon RDS MS SQL instance as a masteruser
in your SQL Client tool, and enter these commands:
-
Select a database schema
USE <schema_name>;
-
Create a database user:
CREATE LOGIN hevo WITH PASSWORD = '<enter_password>'; CREATE USER hevo for login hevo;
Note: Skip this step if you are using an existing database user.
2. Grant privileges to the user
The database user specified in the Hevo Pipeline must have the following global privileges:
-
SELECT
-
VIEW CHANGE TRACKING
(If Pipeline Mode is Change Tracking)
To assign these privileges, log in to your Amazon RDS MS SQL instance as a masteruser
in your SQL Client tool and enter the following commands:
-
Grant
SELECT
privilege at the database level:GRANT SELECT ON DATABASE::<database> TO <db_username>;
-
Grant
SELECT
privilege at the table and schema level:GRANT SELECT ON <schema_name>.<table_name> TO <db_username>;
-
Grant
VIEW CHANGE TRACKING
privilege, if Pipeline Mode is Change Tracking:GRANT VIEW CHANGE TRACKING ON <schema_name>.<table_name> TO <username>;
Limitations
- Hevo does not support Change Data Capture (CDC) for Amazon RDS MS SQL.
Revision History
Refer to the following table for the list of key updates made to the page:
Date | Release | Description of Change |
---|---|---|
09-Mar-2021 | 1.58 | Replaced references to Logical Replication with Change Tracking as Change Tracking is a distinct Pipeline mode for SQL Server Source types. |
22-Feb-2021 | 1.57 | Added section Create a User and Grant Privileges. |