Data Management (DMS) allows you to import large amounts of data to a database in a quick manner. This helps you save manpower and resources.
Supported database types
- RDS: ApsaraDB RDS for MySQL, ApsaraDB RDS for MariaDB, ApsaraDB RDS for SQL Server, ApsaraDB RDS for PostgreSQL, and ApsaraDB RDS for PPAS
- PolarDB: PolarDB for MySQL, PolarDB for PostgreSQL, and PolarDB-O
- PolarDB-X
- OceanBase
- AnalyticDB: AnalyticDB for MySQL and AnalyticDB for PostgreSQL
- Self-managed databases: MySQL, SQL Server, and PostgreSQL databases
Note
- You can use the
INSERT INTO
,INSERT IGNORE
, orREPLACE INTO
statement to write data to the MySQL, PolarDB for MySQL, OceanBase, AnalyticDB for MySQL, and PolarDB-X databases. - You can use only the
INSERT INTO
statement to write data to other databases.
Background information
- Scenarios
- Initialize application data.
- Import data to DMS in the event of emergencies, for example, import backup data to roll back a misoperation.
- Supported file formats
- TXT files. Each TXT file for importing data can be up to 5 GB in size.
- SQL scripts. Each SQL script for importing data can be up to 5 GB in size. By default, you can use only INSERT and REPLACE statements to import data to database instances that are managed in Security Collaboration mode. If you want to use other SQL statements to import data, modify the security rules for data import as a database administrator (DBA) or DMS administrator. To modify the security rules, click the SQL Correct tab on the Security Rules tab and set the Checkpoints parameter to Batch Data import rules.
- CSV files. Values in a CSV file must be separated by commas (,). The first row must be field names.
Usage notes
- If you need to use SQL statements to import only a small amount of data, we recommend that you submit a Normal Data Modify or Lockless change ticket.
- If you submit a Large Data Import ticket to import a large amount of data to a table, the table will be locked even if you set the OnlineDDL parameter to Open (DMS OnlineDDL first) for the database instance.
- We recommend that you use SQL statements with better performance to import a large
amount of data, such as
INSERT
,UPDATE
, andDELETE
statements. Indexes of primary keys are used in the UPDATE and DELETE statements.