r/SQL • • Mar 29 '26

PostgreSQL Daily SQL Server to PostGRE Synchronization

Looking for recommendations for performing once-daily replication (or synchronization) between an SQL Server (source) and Postgres (sink). The intent is to simply ensure that when a user performs a query or refresh for Postgres data, which is feeding a dashboard, the data is an accurate representation of the data in the SQL Server. This is all taking place on Windows Server 2022.

I found this reddit thread below on performing a similar activity using Debezium, but it is unclear to me if Kakfa is actually required (I'm currently not using Kafka). So my general question is, would Debezium still be the appropriate tool for completing this? Or is the once-daily requirement pointing towards a simpler solution such as a Python script that is run using Task scheduler?

https://www.reddit.com/r/PostgreSQL/comments/1hvff8t/mssql_to_postgre_replication/

https://github.com/debezium/debezium

2 Upvotes

22 comments sorted by

View all comments

Show parent comment

2

u/Sharp-Echo1797 Mar 29 '26

You can do it with python, but its going to be a process for every table. Query the new and changed records from SQL into a python dataframe, push them onto your postgres server, run a stored procedure on the postgres side to handle the update.

I've done this task from a postgres server to a redshift database, before Amazon offered their CDC Migration Service.

Its just that if your source and target are similar in SSIS, its just establish the 2 connections, query the source, delete any changed records in your target, insert the source records. It will be like 5 objects per table, and once you get one set working its a lot if copy paste. And handling the order of operations, which you are going to need to do either way.

2

u/Simple_Brilliant_491 Mar 29 '26

+1 for SSIS. It is pretty point and click for your straight copy scenario, and you can schedule it to run daily using SQL Server Agent. You can also parameterize it and use watermarks to do an incremental load if needed. It's not "cool" any more because it doesn't have the ability to do transformations in parallel so it's not good for "big data" scenarios. Hence Microsoft is investing in Fabric Data Factory and SSIS has been pretty stagnant the last few years.