SQL Server to PostgreSQL

SQL Server to PostgreSQL migration services.

Change the database platform without losing application behavior, data trust, or operating control. Datrick leads compatibility, conversion, validation, cutover, and stabilization.

Written scope first. No calendar gate.

Operating problem

SQL Server dependencies extend beyond T-SQL objects.

A SQL Server estate may rely on stored procedures, SQL Agent jobs, linked servers, identity behavior, collations, data types, reporting extracts, integration packages, drivers, Windows authentication, backup routines, and operational habits that do not transfer directly to PostgreSQL.

A conversion report identifies syntax gaps. It does not prove that concurrency, transactions, errors, time zones, case behavior, reporting, jobs, and business workflows will behave correctly. Those differences require decisions across database and application ownership, with named acceptance evidence for each material behavior.

Datrick leads one migration backlog across schema, code, data, application, and operations. Each material difference is classified, assigned, tested, and connected to cutover and rollback evidence.

Engagement coverage

What the engagement covers.

The final boundary follows the estate and risk. These workstreams define the normal decision surface.

Scope

Compatibility assessment

SQL Server versions, schemas, T-SQL, jobs, linked resources, data types, collations, drivers, integrations, security, and operations.

Scope

PostgreSQL target design

Topology, schemas, extensions, identity strategy, access, availability, recovery, monitoring, maintenance, and ownership.

Scope

T-SQL and workload conversion

Procedures, functions, triggers, queries, error handling, temporary objects, transaction behavior, and application patterns.

Scope

Data and job migration

Repeatable load, change handling, identity state, reconciliation, schedules, external dependencies, and failure behavior.

Scope

Application and BI validation

Drivers, ORM behavior, concurrency, reporting, exports, integrations, representative workflows, and performance baselines.

Scope

Cutover and operation

Freeze, final movement, evidence gates, acceptance, rollback triggers, stabilization, runbooks, and PostgreSQL support ownership.

Process and ownership

How the engagement runs.

Datrick leads the technical process, maintains the decision record, and makes unresolved risk visible.

1. Map SQL Server behavior

Datrick inventories technical objects and the application and operating behavior that depends on them.

2. Decide conversion versus redesign

Each difference is classified by business effect, implementation path, test requirement, and impact on PostgreSQL operation.

3. Rehearse the production event

Data movement, application release, job activation, reconciliation, performance checks, acceptance, and rollback are timed together.

4. Stabilize PostgreSQL ownership

Datrick leads issue triage, production evidence, performance follow-up, runbooks, and closure of the migration backlog.

Ownership boundary

Datrick owns database assessment, PostgreSQL target decisions, conversion planning, technical rehearsal, reconciliation design, cutover control, and stabilization backlog. The client retains application release ownership, business validation, platform approvals, user communication, and final production authority unless delegated.

Service levels

The migration scope defines defect severity, decision timing, rehearsal gates, cutover communication, escalation, rollback authority, and stabilization coverage.

Conversion scope

SQL Server to PostgreSQL migration challenges: where the platforms behave differently.

Schema conversion tools move tables. These are the differences that decide whether the application behaves the same after cutover.

Code

T-SQL to PL/pgSQL

Stored procedures, functions, and triggers are rewritten, not translated line by line. Error handling, temporary tables, table variables, MERGE statements, and dynamic SQL each need a decision and a test.

Data

Types, collation, and case

DATETIME, MONEY, BIT, UNIQUEIDENTIFIER, and NVARCHAR map to PostgreSQL types with different precision and comparison rules. SQL Server collations are often case-insensitive; PostgreSQL compares case-sensitively by default, which changes joins, lookups, and unique constraints.

Concurrency

Locking and isolation

PostgreSQL uses multi-version concurrency control. NOLOCK hints, lock escalation assumptions, and isolation-level settings in application code are reviewed and removed or redesigned.

Performance

Indexes and query plans

Clustered indexes, included columns, filtered indexes, and plan hints have no one-to-one equivalent. Critical queries are baselined on SQL Server and measured again on PostgreSQL before cutover.

Operations

Jobs and scheduling

SQL Server Agent jobs, maintenance plans, and alerts move to a scheduler and monitoring stack chosen for the PostgreSQL target. Each job gets an owner and a failure path.

Integration

Linked servers, SSIS, and reporting

Linked servers, SSIS packages, SSRS reports, and drivers that depend on SQL Server are inventoried. Each is converted, replaced, kept on SQL Server, or retired.

Production event

Cutover and rollback, decided before the weekend.

Zero downtime is not promised. The outage window, the rollback point, and the person who can call it are agreed in writing.

1. Freeze and final sync

Schema changes stop. The last data movement runs and replication lag is confirmed at zero.

2. Reconcile

Row counts, checksums on critical tables, and agreed business totals are compared between source and target.

3. Switch the application

Connection strings, jobs, and integrations move to PostgreSQL in the rehearsed order.

4. Accept or roll back

Acceptance checks run against a fixed list. If a rollback criterion is met, the application returns to SQL Server, which stays intact until sign-off.

5. Stabilize

Query performance, job outcomes, and error rates are watched against the SQL Server baseline through an agreed stabilization period.

Production Migration Notes: nine operating notes from live migration work

Guides: migration checklist · data type mapping · T-SQL to PL/pgSQL conversion · migration tools

The source still has to run until cutover. Backup review, SQL Agent jobs and query tuning on the SQL Server side are described under SQL Server DBA services.

Published proof

Database work that expanded because the operating model held.

Verified duration

5+ years

A confidential IT service firm relationship began with urgent DBA/NOC and migration work, then expanded into BI, reporting, analytics, and ongoing data operations. The IT service firm retained the client relationship.

Verified scope

DBA, NOC, migration, BI

No client name, logo, system detail, or unsupported metric is added. Read the evidence boundary on the case study page.

Review the managed DBA case study

Related decisions

Continue with the page that matches the operating question.

Frequently asked questions

Questions buyers ask before written scoping.

What is included in a SQL Server to PostgreSQL migration?

The scope can include compatibility assessment, PostgreSQL target design, schema, T-SQL and data conversion, job and integration work, application validation, rehearsal, reconciliation, cutover, rollback planning, stabilization, and handover.

Which SQL Server features need special review?

Stored procedures, SQL Agent jobs, linked servers, identity behavior, collations, data types, temporary objects, error handling, authentication, reporting dependencies, and SQL Server-specific performance patterns commonly require explicit decisions.

How are T-SQL procedures migrated?

Procedures are classified for direct translation, adaptation, application relocation, redesign, or retirement. The decision depends on behavior, coupling, performance, maintainability, and the target operating model.

How is data accuracy proven?

Reconciliation combines structural checks, counts, value comparisons, aggregates, business rules, and representative application results. Required evidence and acceptance owners are defined before production cutover.

Can Datrick operate PostgreSQL after migration?

Yes. Stabilization can transition into a separately scoped PostgreSQL consulting or managed database operations engagement with written authority, service levels, and exclusions.

How do you convert a SQL Server database to PostgreSQL?

In layers, and the schema is the smallest one. Conversion tools move tables and data types. Stored procedures, functions, and triggers are rewritten in PL/pgSQL, not translated line by line. SQL Agent jobs, linked servers, SSIS packages, and reports are each converted, replaced, kept on SQL Server, or retired. The conversion is complete when the application behaves the same on PostgreSQL and the data reconciles with SQL Server, not when the schema loads.

Related guides: SQL Server migration checklist · SQL Server data type mapping · T-SQL to PL/pgSQL conversion · SQL Server migration tools · Production Migration Notes · data migration playbook

Production Migration Notes

Operating notes from live migration work, by email.

One short note when a new one is published. Unsubscribe at any time by replying to the email.

Written intake

Describe the database, business risk, current ownership, and required decision.

Datrick reviews the situation and returns a direct scope recommendation or the questions required to qualify it.

Submit the written intake