Skip to main content

SQL Server Setup

Here is everything you need to do before creating a SQL Server resource.

Environments

We support the following SQL Server environments:

The Meroxa Platform has been tested against the following SQL Server versions: SQL Server 2012 - 2019

Setup

To setup SQL Server, follow these steps:

  1. Before you can add, the SQL Server instance needs to be accessible by Meroxa. You may:

  2. Enable Change Data Capture:

For changes to be captured, CDC support must be enabled for the SQL Server database and every table.

Database 

To enable CDC to a database named meroxa, run the following SQL commands:

-- ====  
-- Enable Database for CDC template
-- ====
USE meroxa
GO
EXEC sys.sp_cdc_enable_db
GO

Table

To enable CDC to a table named dbo.User, run the following SQL commands:

-- ====
-- Enable CDC on table 'User' in 'dbo' schema
-- ====
exec sys.sp_cdc_enable_table
@source_schema = 'dbo',
@source_name = 'User',
@role_name = NULL
GO

Verify

You may verify if you have CDC enabled for a given table or database using the following commands:

-- ====
-- Check if CDC is enabled for databases
-- ====
SELECT name, is_cdc_enabled FROM sys.databases;
GO

-- ====
-- Check if CDC is enabled for tables
-- ====
SELECT name, is_tracked_by_cdc FROM sys.tables;
GO
  1. After you've enabled CDC for your databases and tables, you are now ready to add your SQL Server resource to Meroxa.