How Babelfish works
Aurora PostgreSQL gets a TDS endpoint (port 1433) that understands the SQL Server wire protocol and much of T-SQL. Apps can keep using SQL Server drivers and many queries unchanged. Data is stored in PostgreSQL, and you can also query it with PostgreSQL tools on port 5432.
It's not 100% SQL Server: some features are unsupported or behave differently. Assessment decides whether it fits.
1. Assess with Babelfish Compass
- Script the database objects (SSMS → Generate Scripts, include all object types).
- Run Compass against the DDL:
BabelfishCompass.bat SalesReport C:\ddl\Sales.sql
- Review the HTML report: supported, review semantics, not supported (with counts per feature).
Rough guide: if unsupported items are few and in non-critical code, Babelfish is a good fit. Heavy CLR, Service Broker, cross-server linked queries or many unsupported built-ins → choose RDS/MI or a full PostgreSQL rewrite.
2. Choose the migration mode (at cluster creation — can't change later)
| Mode | Meaning |
|---|---|
| single-db | One T-SQL database; its schemas map to PostgreSQL schemas with the same names |
| multi-db | Several T-SQL databases; schemas are named <db>_<schema> in PostgreSQL |
Pick multi-db if the app uses several databases (cross-database queries within the cluster are supported).
3. Create the cluster
Create an Aurora PostgreSQL cluster with a parameter group where rds.babelfish_status = on and babelfishpg_tsql.migration_mode set, or tick Turn on Babelfish in the console. Note the TDS endpoint (<cluster>.cluster-xxxx.<region>.rds.amazonaws.com,1433).
4. Move the schema
- Run the generated DDL through SSMS or
sqlcmdagainst the TDS endpoint. - Fix objects that fail (Compass report tells you which), or rewrite them.
- Create logins and users through the TDS endpoint with T-SQL (
CREATE LOGIN,CREATE USER).
5. Move the data
| Method | Use |
|---|---|
| AWS DMS (target endpoint: Babelfish) | Full load + CDC for minimal downtime |
bcp out from SQL Server, bcp in through the TDS endpoint | Simple, offline |
| SSIS / ADF | Existing ETL tooling |
6. Connect the app
Change only the server name (and credentials) in the connection string; keep the SQL Server driver:
Server=sales-babelfish.cluster-abc.ap-south-1.rds.amazonaws.com,1433;Database=Sales;User Id=app;Password=...;Encrypt=True;
7. Test thoroughly
- Run full regression tests: Babelfish may return different results for things like collation behaviour, error messages, certain date functions, or transaction semantics.
- Performance test: query plans are PostgreSQL's; some T-SQL patterns need indexes or rewrites.
- Check tools: SSMS works for many tasks against the TDS endpoint; some designer features don't.
8. Operate
Aurora features apply: storage auto-scaling, up to 15 readers, Multi-AZ, Global Database, backups and PITR. Monitor with Performance Insights / CloudWatch Database Insights.
Tip
Start with an app you own the code for. Babelfish fits best when developers can fix the handful of incompatibilities; vendor packages often aren't certified on it.