Creating Table Structures in the Destination Database
Currently, DRS can only migrate data from the source instance to the destination DDM instance. It cannot migrate table structures or other objects in the source database. To migrate table structures and other objects, you need to create table structures and indexes in the destination database based on table structures of the source schema. Any source objects that have no corresponding objects created in the destination cannot be migrated. For more constraints, see Before You Start.
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click Service List on the left and choose Databases > Distributed Database Middleware.
- On the Instances page, locate the required instance and click Log In in the Operation column.
- On the displayed page, enter the username and password created in Creating a DDM Account, and click Test Connection.
- After the connection is successful, click Log In to log in to the DDM instance.
- Click the db_test_info schema created in Creating a Schema and Associating It with the RDS for MySQL Instance.
- Run the following SQL statements in database db_test_info to create table db_test_info_001 with the same structure as the source:
create table db_test_info_001(
column19 TIMESTAMP ,
column18 VARCHAR(256) ,
column11 DATETIME ,
column10 ENUM('a','b','c') ,
column13 FLOAT(2,1) ,
column12 YEAR ,
column15 VARCHAR(64) not null,
column14 DOUBLE(2,1) ,
column17 INT ,
column16 LONGTEXT ,
column20 TIME ,
column21 BIT(8) ,
column22 LONGBLOB ,
column23 MEDIUMINT ,
column24 VARCHAR(20) ,
column9 DECIMAL(2,1) ,
column8 VARCHAR(1024) ,
column5 SMALLINT ,
column4 DATE ,
column7 VARCHAR(32) ,
column6 SET('hehe','xixi','haha') ,
column1 char(1) ,
column0 MEDIUMINT ,
column3 BIGINT ,
column2 TINYINT ,
primary key(column19,column11,column17)
);
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