Migration and operations
Move a SQL Server application
- For a source supplied as a SQL Server .bak file, restore it in SQL Server first. Export the application DDL, including procedures, triggers, logins, users and grants. Inventory SQL generated by the driver as well. Babelfish Compass can flag constructs for review. Validate the flagged paths and the application’s own queries on the matching Mimus build. Babelfish migration guide
- Choose the mapping mode and collation for the target. Create the user database and its principals through TDS. Replay the DDL in dependency order. For a procedure, check the result sets, types and return status the caller consumes. Review ignored or rewritten clauses individually before accepting a successful import.
- Copy a representative batch with the intended driver. Compare counts by primary-key range, NULL counts, totals and values that can round or truncate. Check identity/sequence state for the next insert. Compare rows through TDS and native PG using the physical schema mapping.
- Rehearse cutover at a consistent point. Stop source writes or capture and apply outstanding changes. Run the application under its normal login, check transactions and reconcile both sides before redirecting writers. Retain the source and record how to reconcile any writes accepted after cutover.
Choose the instance boundary
Run TDS alongside native PostgreSQL. Give MySQL a separate instance and data directory, including when the two applications use different logical databases. Each instance shares preloads, roles and startup requirements across its databases. Connection architecture
An earlier two-node research run loaded both dialects, TDE and Spock on Rocky x86-64. FreeTDS and PyMySQL exchanged rows in a predefined encrypted table. Use that result as evidence for the tested storage and replication path. Choose each deployment’s listener independently. Database mapping · Spock replication
Back up the cluster and prove it can restart
Record the kernel tree, extension versions, shared_preload_libraries and SHOW mimus_required_features with the backup. Installing a Babelfish component records a cluster dependency. Restore with the matching kernel and babelfishpg_tds available at startup. When using TDE, preserve the original key providers and all keys needed for the backup and WAL.
On an earlier integrated PG19 build, JDBC wrote values 2 and 40 into a persistent encrypted table. VACUUM FULL rewrote its file. With plaintext WAL throughout, a streaming physical backup passed verification. With the source stopped and the original keys available, the restored instance served both rows over PG and TDS (sum 42) and PG confirmed encryption. When WAL is or may have been encrypted, use the matching Percona streaming backup tool in encrypted mode (pg_tde_basebackup -E -Fp -X stream). Recover to a separate data directory and read the committed rows through both endpoints. PG TDE manual · Percona backup and restore
Logical archives and upgrades
With the two-row example in place, run the Mimus client tools in the OS postgres shell, on the same PG socket. Use a new directory for the archive. pg_dump connects to the physical database. pg_restore -l reads the local archive. In the recorded pre-header-fix run the listing contained BABELFISHCHECKS and TABLE DATA master_dbo mimus_probe.
For a logical database selection, the Mimus tools recognize --bbf-database-name. One logical database dump omits server logins. Inventory globals, database users, their mappings and grants separately. The tested archive listing proves export. Independent restoration of a complete Babelfish logical database, including principals, ownership, procedures and correct TDS reads, still awaits acceptance on the final artifacts. Treat an archive as recoverable only after restoring and reconciling it on a separate instance. Upstream dump selection and checks
The dump embeds checks for equal PostgreSQL server_version_num and equal Babelfish migration mode on restore. A different minor version can therefore fail as well. There is no validated in-place cross-major Babelfish upgrade for this release. The bundled pg_upgrade also refuses a TDE-marked source or destination, including its precheck. For a version or layout change, build a new target, recreate compatible application DDL and principals, and move application data through a verified export/import path. Reconcile it before retiring the original. A same-PG19 binary change or a physical backup restored with its original binaries has different prerequisites.