- DATE:
- AUTHOR:
- PowerSync Product Team
SQL Server Backend Database Support: Beta Release
SQL Server backend database support in PowerSync has reached beta, meaning it's production-ready for tested deployments. We're also releasing the PowerSync .NET SDK in beta simultaneously
Together, these releases bring production-ready PowerSync support for teams building on the Microsoft stack.
The key capability we needed to reach this milestone was schema change handling, bringing SQL Server in line with our Postgres, MongoDB, and MySQL adapters. Schema changes are a normal part of any production database, and with this update, PowerSync replication keeps working as your schema evolves, with minimal manual intervention.
What's new: schema change handling
PowerSync uses SQL Server's Change Data Capture (CDC) to track changes in your database. CDC writes changes to separate change tables, which PowerSync polls to replicate data to clients. With some exceptions, schema changes to source tables, do not alter the schema of the change tables. In such cases PowerSync will warn you that CDC for the table needs to be disabled and re-enabled to update the schema of the change table (doing so requires database admin access).
PowerSync now detects, and where possible handles the following schema changes:
Table creation: When a new source table that matches your Sync Streams/Rules is created, PowerSync will detect it as soon as CDC is enabled for the table and start replicating it.
Table drops: Automatically detected and handled while PowerSync is running. If the Service was stopped when the table was dropped, you'll need to redeploy your Sync Rules manually to remove the stale bucket data.
Table renames: Detected automatically. Bucket data for the old table name is removed.
Column modifications: Column changes are detected and a warning is logged that CDC will need to be disabled and re-enabled for the table.
Beta status
SQL Server backend support is in a Beta release: it's production-ready for tested use cases, APIs are stable, and any breaking changes will be communicated clearly. See Feature Status for our full definitions.
Getting started
To connect SQL Server as a backend, follow the SQL Server setup and configuration guide.
If your schema changes over time, see Implementing schema changes. Note: Schema change handling for SQL Server was introduced in version 1.20.2 of the PowerSync Service. This version is currently being rolled out to existing PowerSync Cloud instances. You can upgrade manually to this version by deploying an update to your Cloud instance.
Supported databases:
SQL Server 2019+: Standard, Enterprise, Developer, Evaluation editions
Azure SQL: Database and Managed Instances
Limitations
Dropped tables are not detected if the PowerSync Service was stopped during the drop. Redeploy Sync Streams/Sync Rules in that case to remove stale data.
Spatial data types are returned as JSON objects as supplied by the Tedious node-mssql client. See the notes here.
There is an inherent latency in replicating data from SQL Server to PowerSync. See the docs for more details.
Feedback and help
Join us on Discord or open an issue on GitHub to ask questions, get help or share feedback.