How Do I Create GaussDB Databases Compatible with Source Databases?
Ensure that the compatibility mode used during database creation is the same as the GaussDB compatibility mode selected and confirmed during database evaluation.
Creating a GaussDB Database Compatible with Oracle
The automated conversion solution of UGO for migration from Oracle, PostgreSQL, and SQL Server to GaussDB is actually designed for migration to GaussDB compatible with Oracle. Perform the following steps to create a GaussDB database compatible with Oracle:
- Log in to your GaussDB instance as a user who has the permission to create databases.
- Create a GaussDB database compatible with Oracle.
Centralized:
create database databasename dbcompatibility = 'A';
Distributed:
create database databasename dbcompatibility = 'ORA';
- Check whether the database is created.
select * from pg_database where datname = 'databasename';
- Centralized: If the value of datcompatibility is A, the database is created.
- Distributed: If the value of datcompatibility is ORA, the database is created.

UGO does not support migration from PostgreSQL to GaussDB (PostgreSQL-compatible mode).
Creating a GaussDB Database Compatible with MySQL
If the source database type is MySQL or GoldenDB, perform the following steps to create a GaussDB database compatible with MySQL:
- Log in to your GaussDB instance as a user who has the permission to create databases.
- Create a GaussDB database compatible with MySQL.
GaussDB Centralized (B-compatible mode):
create database databasename dbcompatibility = 'B';
GaussDB Centralized (M-compatible mode):
create database databasename dbcompatibility = 'M';
Distributed:
create database databasename dbcompatibility = 'MySQL';
- Check whether the database is created.
select * from pg_database where datname = 'databasename';
- GaussDB Centralized (B-compatible mode): If the value of datcompatibility is B, the database is created.
- GaussDB Centralized (M-compatible mode): If the value of datcompatibility is M, the database is created.
- GaussDB Distributed: If the value of datcompatibility is MySQL, the database is created.

For migration from GoldenDB to GaussDB Centralized, only GaussDB Centralized (B-compatible mode) is supported.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot