SQL Server to PostgreSQL

Move Microsoft SQL Server tables into PostgreSQL, either once as a migration or on a schedule while SQL Server keeps running. Weld syncs the tables you choose incrementally, with column hashing for sensitive data, so PostgreSQL stays a current copy for reporting and applications.

4.8 on G2
Microsoft SQL ServerSource
WeldWeld
PostgreSQLWarehouse

Checked against Weld and vendor docs on

Weld · New sync
Microsoft SQL ServerSourceMicrosoft SQL ServerConnected
Tables to sync

Your own tables, picked when you set up the sync.

  • Extract
  • Load
  • Keep in sync
PostgreSQLDestinationPostgreSQLReady
mssql schema
  • mssql.Synced
  • mssql.Syncing
  • mssql.Synced
  • mssql.Synced

Trusted by data and AI teams

  • Flatpay
  • Holafly
  • eComplete
  • Dishoom
  • Danish Endurance
  • Female Invest
  • Son of a Tailor
  • Onomondo
  • Medik8
  • Pas Normal Studios
Options

Three ways to get SQL Server data into PostgreSQL

A one-time move and an ongoing copy are different jobs. Migration tools convert the schema once; a sync keeps data flowing while SQL Server stays the system of record.

p

pgloader

Best for
A one-time migration, schema included
Effort
Low to medium: one command or a load file, plus cast rules
Freshness
A single load run
Good to know
Discovers tables, indexes, primary and foreign keys and casts types by default: bit to boolean, uniqueidentifier to uuid, nvarchar to text. Its docs describe a load, not ongoing sync.
A

AWS Database Migration Service

Best for
Migrations with a cutover window on AWS
Effort
High for CDC: MS-Replication or MS-CDC, full backups, recovery model
Freshness
Full load, then ongoing replication
Good to know
Ongoing replication needs the Full or Bulk logged recovery model and MS-Replication or MS-CDC turned on. Identity properties and truncates are not carried over.

Weld

Best for
Keeping PostgreSQL current from a live SQL Server
Effort
Low: connect both, pick tables, choose a sync mode
Freshness
Incremental syncs on your schedule
Good to know
Merge or append incremental syncs, with full syncs at midnight to clear deleted rows. CDC for SQL Server is listed as coming soon in Weld's docs.
How it works

How to sync Microsoft SQL Server to PostgreSQL with Weld.
In the app, with the API or an agent.

Weld · Data warehouse
PostgreSQLData warehousePostgreSQLConnected
Data locationChosen when you connect
CredentialsService account or key, stored encrypted
Data

What lands in PostgreSQL
From Microsoft SQL Server to PostgreSQL.

SQL Server has no fixed schema for Weld to publish, so what lands in PostgreSQL is your own tables, one per table you select, plus a column Weld adds to every row.

  • Your selected tables

    Each lands with its columns, minus any you removed and with any you chose to hash. You can add or drop tables later in the sync's configuration.

  • _weld_synced

    The time Weld synced each row. Use it to check freshness and to drive incremental models in PostgreSQL.

  • Tables on incremental merge

    Updated from rows whose cursor, ideally updated_at, moved since the last run, matched on the primary key.

  • Tables on full sync at midnight

    Rewritten once a day so rows deleted in SQL Server disappear from PostgreSQL too.

Example query

How many rows did each table receive in the last 24 hours?
In PostgreSQL SQL.

Runs in PostgreSQL, assuming you named the destination schema mssql. Replace orders and customers with your own tables. _weld_synced is added by Weld; a full sync stamps every row, an incremental one only the rows it changed.

PostgreSQL · query
1select 'orders' as source_table,2  count(*) filter (where _weld_synced > now() - interval '24 hours') as rows_last_24h,3  max(_weld_synced) as last_synced4from mssql."orders"5union all6select 'customers',7  count(*) filter (where _weld_synced > now() - interval '24 hours'),8  max(_weld_synced)9from mssql."customers"
Weld MCP server

Ask your agent.
It queries PostgreSQL for you.

Connect Claude, Cursor, ChatGPT or your own agent to Weld over MCP. It reads the Microsoft SQL Server context, finds the tables it needs and runs the query in PostgreSQL.

Claude CodeOpus 5
>

Which Microsoft SQL Server tables do we have in PostgreSQL, and which is the largest?

Looking up what Weld has synced from Microsoft SQL Server.

●weld·search_available_references
⎿raw.mssql.*
tables, columns and freshness
●weld·get_reference_schema
⎿columns, types and nullability
●weld·run_query
⎿select count(*) from {{raw.mssql.…}}
submitted
●weld·get_query_status
⎿DONE
●weld·get_query_result
⎿rows returned
✓Answered from Microsoft SQL Server data in PostgreSQL
>Ask about your Microsoft SQL Server data
Under the hood

Things to know.
Before you sync Microsoft SQL Server.

Incremental syncs need a key and a cursor
The SQL Server connector runs full syncs by default. Merge mode needs a primary key and a cursor timestamp, preferably updated_at. Append mode works without updated_at but does not capture updates to existing rows.
Deletes need a full sync
Merge and append do not capture rows deleted in SQL Server. Set tables where deletes matter to run a full sync at midnight, which removes them from PostgreSQL.
No CDC from SQL Server yet
Weld's SQL Server CDC is listed as under development. Until it is live, freshness depends on your sync schedule, and deletes are cleared by full syncs rather than streamed.
Check type casts on a one-off migration
If you migrate with pgloader, its defaults cast datetime and datetime2 to timestamptz, tinyint to smallint and binary, hierarchyid and geography to bytea. Override them with CAST rules where your application expects something else.
FAQ

Common questions.
About Microsoft SQL Server to PostgreSQL.

Start syncing Microsoft SQL Server to PostgreSQL.

Set up your Microsoft SQL Server data pipeline in minutes. No credit card required. Free for 14 days.

Microsoft SQL ServerSource
WeldWeld
PostgreSQLWarehouse