This topic describes how to create a Babelfish for ApsaraDB RDS for PostgreSQL instance.
Prerequisites
Babelfish can be enabled only during instance creation. The instance must meet the following requirements:
-
Major engine version: PostgreSQL 15
-
Product series: Basic Edition or High-availability Edition
-
Product type: Standard Edition
Usage notes
-
You cannot enable Babelfish for an existing ApsaraDB RDS for PostgreSQL instance.
-
After enabling Babelfish, you cannot disable it.
-
After the instance is created, a database named
babelfish_dbis automatically initialized. This is a critical database for the Babelfish feature. Do not delete this database. Otherwise, the instance will become unavailable.
Create a Babelfish-enabled RDS for PostgreSQL instance
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.
-
Click Create Instance.
-
Follow the configuration wizard to create the instance.
This topic describes the key parameters for enabling Babelfish when you create an ApsaraDB RDS for PostgreSQL instance. For information about other parameters, see Create an ApsaraDB RDS for PostgreSQL instance.
The following table describes the key parameters.
Parameter
Value
Engine
Select PostgreSQL 15.
After selecting the database engine and version, select Enable Babelfish.
Instance Type
Select an available instance type.
Babelfish Migration Mode
Specifies the Babelfish migration mode. This option is available only after selecting Enable Babelfish.
-
single-db: You can create only one SQL Server database in the Babelfish for ApsaraDB RDS for PostgreSQL instance. This database is created as a regular PostgreSQL schema.
-
multi-db: You can create multiple SQL Server databases. Each database is created in a different PostgreSQL schema with the format
<database_name>_<schema_name>to prevent naming conflicts.
For more information about how to choose a migration mode, see Migration modes.
Initial Account
Specifies the initial account used to manage both Babelfish and PostgreSQL.
ImportantThis privileged account cannot be deleted after creation.
The account name must meet the following requirements:
-
The name must be 2 to 63 characters in length.
-
The name can contain only lowercase letters, digits, and underscores (_).
-
The name must start with a letter and end with a letter or a digit.
-
The name cannot start with
pg. -
The name cannot be an SQL keyword. For more information, see SQL Keywords.
Password
The password for the initial account.
NoteYou can change the password after the instance is created. For more information, see Reset a password.
The password must meet the following requirements:
-
The password must be 8 to 32 characters in length.
-
The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
-
The following special characters are supported:
!@#$%^&*()_+-=.
-
Check the Babelfish status
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Basic Information.
-
In the Configuration Information section, view the Minor Engine Version and Babelfish Status.
View the Babelfish management account
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Accounts.
-
On the User Account tab, find the privileged account that was created during instance creation. Its status is Active.
View the endpoint and TDS port
Prerequisites
The instance has a configured whitelist. For more information, see Configure a whitelist.
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Database Connection.
You can view the internal and public endpoints and the TDS port. On the Database Connection page, find the
Internal Endpoint(for example,pgm-xxx.pgsql.pre.rds.aliyuncs.com) and theBabelfish TDS Internal Port(default:1433). To add an IP address to the whitelist, click Configure Whitelist next to the internal endpoint.Note-
To use a public endpoint, click Apply for Public Endpoint. For more information, see Apply for or release a public endpoint.
-
To change the Babelfish TDS port, click Change Endpoint. For more information, see View or modify endpoints and ports.
-
API reference
|
API |
Description |
|
Creates an RDS instance. |
|
|
Queries the details of an instance. |
|
|
Allocates a public endpoint. |
|
|
Modifies an endpoint. |
|
|
Queries endpoints. |