/

SQL Server

Database connector

SQL Server

Read every insert, update and delete from SQL Server change data capture as a typed event. Use it to trigger workflows, join in context and merge results back into your tables.

Connect SQL Server
Connect SQL Server
See setup steps
See setup steps

Database

Category

CDC

Sync mode

p95 900 ms

Latency

9 min

Setup time

What it can do

Triggers · 3
  • Row insertedCDC
  • Row updatedCDC
  • Row deletedCDC
Actions · 5
  • Run a read queryRead
  • Insert a rowWrite
  • Update rowsWrite
  • Merge by keyWrite
  • Execute a stored procedureWrite

Overview

The SQL Server connector reads from the change tables that SQL Server maintains when change data capture is on. Workflows react to committed changes without triggers on your tables, and every event shows up in the trace of the run it started.

Teams use it to post journal entries to NetSuite when a ledger row lands, to keep Salesforce accounts in step with an ERP and to ask for approval in Microsoft Teams before a large credit note goes out.

Supported versions

  • SQL Server 2016 SP1 to 2022, Standard or Enterprise edition

  • Azure SQL Database, Azure SQL Managed Instance and Amazon RDS for SQL Server

  • Connections over TLS, with optional SSH tunnel or Azure Private Link

How CDC works

The SQL Server Agent capture job copies changes from the transaction log into change tables. Tessel reads those tables in log sequence order with cdc.fn_cdc_get_all_changes, checks each row against the schema and remembers the last LSN it delivered, so a restart picks up where it stopped.

EXEC sys.sp_cdc_enable_db;

EXEC sys.sp_cdc_enable_table
  @source_schema = N'dbo',
  @source_name   = N'Invoices',
  @role_name     = N'tessel_cdc';
EXEC sys.sp_cdc_enable_db;

EXEC sys.sp_cdc_enable_table
  @source_schema = N'dbo',
  @source_name   = N'Invoices',
  @role_name     = N'tessel_cdc';
EXEC sys.sp_cdc_enable_db;

EXEC sys.sp_cdc_enable_table
  @source_schema = N'dbo',
  @source_name   = N'Invoices',
  @role_name     = N'tessel_cdc';

Retention

The CDC cleanup job keeps three days of changes by default. If Tessel is paused for longer than that, it snapshots the affected tables again and marks the gap in the trace. Raise the retention with sys.sp_cdc_change_job if you pause connectors often.

Permissions needed

A db_owner turns on CDC once. After that, Tessel's login only needs read access and membership in the gating role named when each table was enabled. Write access is only required if a workflow writes back.

  • db_datareader on the database

  • Membership in the gating role, for example tessel_cdc

  • INSERT, UPDATE and EXECUTE only where you write back

Setup

Six steps. About nine minutes.

Most of the time goes into enabling CDC on each table. Tessel confirms the capture job is running before you continue.

  1. Make sure SQL Server Agent is runningSQL Server1 min
  2. Enable CDC on the database and tablesSQL Server3 min
  3. Create a tessel login and add it to the gating roleSQL Server2 min
  4. Allow Tessel's static IPs for your regionNetwork1 min
  5. Paste the connection details and pick tablesTessel2 min
  6. Insert a test row and watch the event arriveVerify900 ms

Your change tables, put to work.

Connect SQL Server on the free plan. Up to three builders and 10,000 runs a month, no card required.

Connect SQL Server
Connect SQL Server
All integrations
All integrations

One email a month. Only what shipped.

A1

Product

C1

Layouts

D1

Company

E1

Template

F1

All systems operational
fra41 ms
iad38 ms
sin52 ms

C2

Elsewhere

XLinkedInGitHubYouTube

E2

Move across the wordmark168 blocks · iso 30°

One email a month. Only what shipped.

A1

Product

C1

Layouts

D1

Company

E1

Template

F1

All systems operational
fra41 ms
iad38 ms
sin52 ms

C2

Elsewhere

XLinkedInGitHubYouTube

E2

Move across the wordmark168 blocks · iso 30°

One email a month. Only what shipped.

A1

Product

C1

Layouts

D1

Company

E1

Template

F1

All systems operational
fra41 ms
iad38 ms
sin52 ms

C2

Elsewhere

XLinkedInGitHubYouTube

E2

Move across the wordmark168 blocks · iso 30°

Create a free website with Framer, the website builder loved by startups, designers and agencies.