Identifying your version of Babelfish
You can query Babelfish to find details about the Babelfish version, the Aurora PostgreSQL version, and the compatible Microsoft SQL Server version. You can use the TDS port or the PostgreSQL port.
To use the TDS port to query for version information
Use
sqlcmd
orssms
to connect to the endpoint for your Babelfish DB cluster.sqlcmd -S
bfish_db.cluster-123456789012
.aws-region
.rds.amazonaws.com,1433 -Ulogin-id
-Ppassword
-ddb_name
To identify the Babelfish version, run the following query:
1>
SELECT CAST(serverproperty('babelfishversion') AS VARCHAR)2>
GOThe query returns results similar to the following:
serverproperty ------------------------------ 3.4.0 (1 rows affected)
To identify the version of the Aurora PostgreSQL DB cluster, run the following query:
1>
SELECT aurora_version() AS aurora_version2>
GOThe query returns results similar to the following:
aurora_version ------------------------------------------------- 15.5.0 (1 rows affected)
To identify the compatible Microsoft SQL Server version, run the following query:
1>
SELECT @@VERSION AS version2>
GOThe query returns results similar to the following:
Babelfish for Aurora PostgreSQL with SQL Server Compatibility - 12.0.2000.8 Dec 7 2023 09:43:06 Copyright (c) Amazon Web Services PostgreSQL 15.5 on x86_64-pc-linux-gnu (Babelfish 3.4.0) (1 rows affected)
As an example that shows one minor difference between Babelfish and Microsoft SQL Server, you can run
the following query. On Babelfish, the query returns 1
, while on
Microsoft SQL Server, the query returns NULL
.
SELECT CAST(serverproperty('babelfish') AS VARCHAR) AS runs_on_babelfish
You can also use the PostgreSQL port to obtain version information, as shown in the following procedure.
To use the PostgreSQL port to query for version information
Use
psql
orpgAdmin
to connect to the endpoint for your Babelfish DB cluster.psql host=
bfish_db.cluster-123456789012
.aws-region
.rds.amazonaws.com port=5432 dbname=babelfish_db user=sa
Turn on the extended feature (
\x
) ofpsql
for more readable output.babelfish_db=>
\xbabelfish_db=>
SELECTbabelfish_db=>
aurora_version() AS aurora_version,babelfish_db=>
version() AS postgresql_version,babelfish_db=>
sys.version() AS Babelfish_compatibility,babelfish_db=>
sys.SERVERPROPERTY('BabelfishVersion') AS Babelfish_Version;The query returns output similar to the following:
-[ RECORD 1 ]-----------+----------------------------------------------------------------------------------------------- aurora_version | 15.5.0 postgresql_version | PostgreSQL 15.5 on x86_64-pc-linux-gnu, compiled by x86_64-pc-linux-gnu-gcc (GCC) 9.5.0, 64-bit babelfish_compatibility | Babelfish for Aurora Postgres with SQL Server Compatibility - 12.0.2000.8 + | Dec 7 2023 09:43:06 + | Copyright (c) Amazon Web Services + | PostgreSQL 15.5 on x86_64-pc-linux-gnu (Babelfish 3.4.0) babelfish_version | 3.4.0