# SQL Server

> Connect SQL Server clients to Mimus 19.0.1 with Babelfish for PostgreSQL and assess a T-SQL application before migration.

---

LLMS index: [llms.txt](/llms.txt)

---

Mimus 19.0.1 implements SQL Server compatibility with **Babelfish for PostgreSQL**. SQL Server clients connect to a PostgreSQL backend over Tabular Data Stream (TDS, default TCP port 1433) and submit T-SQL. The DBA uses a native PostgreSQL connection (default 5432) to initialize Babelfish, inspect the physical tables and back up the cluster.

## Start with one table {#start}

On Rocky Linux 10.3 x86-64, FreeTDS 1.5.18 logged in to `master`, inserted two rows and read back a sum of 42. A PostgreSQL connection saw the same rows in `wire.master_dbo` (database and schema). Deploy TDS on its own Mimus instance if the application also uses MySQL. Follow [installation and initialization](/docs/mssql/install/) and [your first TDS connection](/docs/mssql/connect/) to repeat the check.

| What you need to decide | Where to look |
| --- | --- |
| Which logical database, schema and login should an application use? | [Database, schema and role mapping](/docs/mssql/mapping/) |
| Will my driver, stored procedures and transactions work? | [T-SQL and client compatibility](/docs/mssql/compatibility/) |
| How do I move data, back it up and verify recovery? | [Migration and operations](/docs/mssql/operations/) |
| How do I create an encrypted table over TDS and verify its indexes and large values? | [Create encrypted permanent tables over TDS](/docs/mssql/encrypted-tables/) |
| My procedure uses both encrypted and temporary tables. What can reach disk in plaintext? | [Temporary tables, table variables and plaintext on disk](/docs/mssql/temporary-storage/) |
| How do I diagnose a failed login, import or restore? | [Known limits and troubleshooting](/docs/mssql/status/) |

## What the version identifies {#version}

Mimus is based on PostgreSQL `REL_19_0`. Patch 400 imports the Babelfish kernel changes. Patch 401 ports them to PG19 and integrates the protocol handlers. The frozen nine-patch baseline has kernel tree `e94b1957f077` and Babelfish extension tree `7ae1f519a130`. The earlier connection and source-build examples in this manual used kernel tree `98c4dca860f0`. The encrypted-table and temporary-object guides use candidate image `a3b80a5a99a1` with additional patches. Check the kernel and extension trees together when identifying a build. [Candidate build manifest](/docs/patches/mssql/#tde-increments)

## Upstream credit {#credits}

Babelfish for PostgreSQL comes from Amazon Web Services and the Babelfish and PostgreSQL contributors. Its extensions are available under Apache-2.0 or the PostgreSQL License. The monetary type derives from EDB / 2ndQuadrant’s fixeddecimal. The modified PostgreSQL kernel carries the PostgreSQL License. [Upstream extensions and notices](https://github.com/babelfish-for-postgresql/babelfish_extensions) · [Upstream kernel](https://github.com/babelfish-for-postgresql/postgresql_modified_for_babelfish)

For additional T-SQL and migration reference, consult the [PG.CENTER Babelfish manual](https://doc.pg.center/babelfish/).

---

Section pages:

- [Install and initialize](/docs/mssql/install/): Prepare a matching server and extension set, then initialize one physical database using psql.
- [First TDS connection](/docs/mssql/connect/): Log in with FreeTDS, write two rows and check them from PostgreSQL. Configure and verify an encrypted connection.
- [Databases, schemas and roles](/docs/mssql/mapping/): Resolve logical T-SQL names to real PostgreSQL objects and manage each kind of principal from its own endpoint.
- [T-SQL and client compatibility](/docs/mssql/compatibility/): Compare driver operations, procedure calls, type precision, collation and rollback with the application’s requirements.
- [Create encrypted permanent tables over TDS](/docs/mssql/encrypted-tables/): Prepare a database key on PG, create a table from a SQL Server client and verify the table, indexes and out-of-line values.
- [Temporary tables, table variables and plaintext on disk](/docs/mssql/temporary-storage/): Use all three T-SQL temporary objects alongside encrypted permanent tables and identify where rows and query spills can reach disk in plaintext.
- [Migration and operations](/docs/mssql/operations/): Plan a SQL Server cutover, reconcile data across endpoints and choose a backup method with a tested recovery path.
- [Known limits and troubleshooting](/docs/mssql/status/): Diagnose a failed login, temporary-object errors with TDE, interrupted sessions and misleading import results.

---

Backlinks:

- [Introduction](/docs/intro/)
- [Install and initialize](/docs/mssql/install/)
- [Known limits and troubleshooting](/docs/mssql/status/)
- [Protocol, dialect and origins](/docs/mysql/architecture/)
- [400 / 401 · SQL Server](/docs/patches/mssql/)
