Data Management (Data Management (DMS)) provides the empty database initialization feature. You can use this feature to synchronize the schemas of the source database to an empty database that contains no table. This way, schemas can be synchronized between databases with ease. You can use this feature to synchronize the schemas of databases that are deployed across multiple regions and units.
Prerequisites
- The source and destination databases are of the following types:
- MySQL: ApsaraDB RDS for MySQL, PolarDB for MySQL, MyBase for MySQL, PolarDB-X, AnalyticDB for MySQL V3.0, and MySQL databases from other sources
- SQL Server: ApsaraDB RDS for SQL Server, MyBase for SQL Server, and SQL Server databases from other sources
- PostgreSQL: ApsaraDB RDS for PostgreSQL, PolarDB for PostgreSQL, MyBase for PostgreSQL, AnalyticDB for PostgreSQL, and PostgreSQL databases from other sources
- MariaDB: ApsaraDB for MariaDB TX and MariaDB databases from other sources
- ApsaraDB for OceanBase in MySQL mode
- PolarDB for Oracle
- The security rule named Enable execution capability (if closed, other rules are invalid) is enabled for the destination database. For more information, see Enable SQL-based synchronization.
Note If this rule is disabled, the schema synchronization feature can only compare the schemas of two different databases but cannot execute SQL statements to synchronize the schemas.
- The destination database is an empty database that contains no table.
Note If the destination database contains tables, you can use the schema synchronization feature. For more information, see Synchronize schemas.
- The query permissions on the source database are granted to your account. For more information, see View owned permissions.
- The permissions to alter tables in the destination database are granted to your account. For more information, see View owned permissions.