How Do I Create GaussDB Databases Compatible with Source Databases?
Oracle as the Source
- Log in to your GaussDB instance as a user who has the permission to create databases.
- Create a GaussDB database compatible with Oracle.
Primary/Standby:
create database databasename dbcompatibility = 'A';
Distributed:
create database databasename dbcompatibility = 'ORA';
- Check whether the database is created.
select * from pg_database where datname = 'databasename';
- Primary/standby: If the value of datcompatibility is A, the database is created.
- Distributed: If the value of datcompatibility is ORA, the database is created.
MySQL as the Source
- Log in to your GaussDB instance as a user who has the permission to create databases.
- Create a GaussDB database compatible with MySQL.
Primary/Standby (B-compatible)
create database databasename dbcompatibility = 'B';
Primary/Standby (M-compatible)
create database databasename dbcompatibility = 'M';
Distributed:
create database databasename dbcompatibility = 'MySQL';
- Check whether the database is created.
select * from pg_database where datname = 'databasename';
- Primary/standby (B-compatible): If the value of datcompatibility is B, the MySQL-compatible database is created.
- Primary/standby (M-compatible): If the value of datcompatibility is M, the M-compatible database is created.
- Distributed: If the value of datcompatibility is MySQL, the database is created.
PostgreSQL as the Source Database
- Log in to your GaussDB instance as a user who has the permission to create databases.
- Create a GaussDB database compatible with PostgreSQL.
Primary/Standby:
create database databasename dbcompatibility = 'A';
Distributed:
create database databasename dbcompatibility = 'ORA';
- Check whether the database is created.
select * from pg_database where datname = 'databasename';
- Primary/standby: If the value of datcompatibility is A, the database is created.
- Distributed: If the value of datcompatibility is ORA, the database is created.
SQL Server as the Source Database
- Log in to your GaussDB instance as a user who has the permission to create databases.
- Create a GaussDB database compatible with SQL Server.
Primary/Standby:
create database databasename dbcompatibility = 'A' ;
Distributed:
create database databasename dbcompatibility = 'ORA';
- Check whether the database is created.
select * from pg_database where datname = 'databasename';
- Primary/standby: If the value of datcompatibility is A, the database is created.
- Distributed: If the value of datcompatibility is ORA, the database is created.
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