Data Management (DMS) provides the Test Data Generation feature, powered by a built-in algorithm engine, to help you quickly populate database tables with various types of test data — such as random values, region names, and virtual IP addresses — without writing scripts or exposing production data.
Prerequisites
Before you begin, ensure that you have:
A database of one of the supported types listed below
Permissions to manage the database in DMS
Supported databases:
| Database type | Supported instances |
|---|---|
| MySQL | ApsaraDB RDS for MySQL, PolarDB for MySQL, ApsaraDB MyBase for MySQL, PolarDB-X, AnalyticDB for MySQL, and third-party MySQL databases |
| SQL Server | ApsaraDB RDS for SQL Server, ApsaraDB MyBase for SQL Server, and third-party SQL Server databases |
| PostgreSQL | ApsaraDB RDS for PostgreSQL, PolarDB for PostgreSQL, ApsaraDB MyBase for PostgreSQL, AnalyticDB for PostgreSQL, and third-party PostgreSQL databases |
| MariaDB | ApsaraDB RDS for MariaDB and third-party MariaDB databases |
| OceanBase | ApsaraDB for OceanBase in MySQL mode |
| PolarDB | PolarDB for PostgreSQL (Compatible with Oracle) |
Usage notes
One table per task. To populate multiple tables, submit a separate task for each.
Up to 1,000,000 rows can be generated per task.
Throughput is throttled to prevent database overload:
1,000,000 rows × 4 fields: approximately 60 seconds
1,000,000 rows × 40 fields: approximately 120–180 seconds
Generate test data
Log in to DMS 5.0.
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the console and choose . On the Test Data Generation Tickets page, click Test Data Generation in the upper-right corner.
NoteAlternatively, open the SQL console for your database, right-click a table in the table list, and choose Data Plans > Test Data Generation.
On the Ticket Application page, fill in the parameters in the Application step and click Submit.
Parameter Description Task name A name that helps approvers understand the purpose of the task and helps you find it later. Database name The database within the instance. Enter a prefix to search, then select from the results. Table name The table to populate. Enter a prefix to search, then select from the results. Multiple tables are supported. Configure the algorithm The data generation rule for each field. This parameter appears only after you select a table. See Algorithms for details. Number of rows generated The number of rows to generate. Maximum: 1,000,000. Conflict handling How DMS handles primary key or unique key conflicts during data writing: Skip when encountering data conflicts skips conflicting rows and continues writing the rest. Replace when encountering data conflict overwrites existing rows and continues writing the rest. Change stakeholder Users who can view the ticket details. Only users involved in the ticket, including approvers, have access. Wait for a database administrator (DBA) to approve the ticket. After approval, DMS automatically generates the test data and writes it to the target table.
NoteBy default, test data generation tickets are approved by DBAs. For more information, see Test data generation.
Algorithms
For each field in the target table, choose one of the following algorithms based on your data requirements.
| Algorithm | Use when you need to | Supported field types |
|---|---|---|
| Random | Generate varied data within defined bounds, such as sequential IDs or values in a numeric range | INTEGER, TEXT, DATETIME |
| Customize | Generate semantically meaningful data such as names, city names, or industry codes | TEXT only |
| Enumeration | Restrict values to a predefined set | INTEGER, TEXT, DATETIME |
Random
INTEGER fields — choose one of two build types:
Self-increasing sequence: generates a sequential series. Set the Starting value and Step.
Interval number: generates values within a range. Set the Minimum value and Maximum value.

TEXT fields — choose one of two build types:
Variable-length string: generates strings of varying length. Set the Minimum length, Maximum length, and Character range.
Do not repeat string: generates unique string values. Set the Options.

DATETIME fields — generates random date and time values within a specified time range.
Customize
Use the Customize algorithm when you need semantically meaningful TEXT data, such as personal information, geographic location information, and industry-related standard data.

Enumeration
Use the Enumeration algorithm when you want DMS to randomly select from a predefined list of values. Add the values to the list before submitting. Supported for INTEGER, TEXT, and DATETIME fields.

What's next
After the test data is written to the database:
Query and inspect the data in the DMS SQL console. See Manage a database on the SQLConsole tab.
Monitor database performance under load. See Real-time performance monitoring.