All Products
Search
Document Center

ApsaraDB for OceanBase:Create an SQL file replay task

Last Updated:Dec 29, 2025

In performance assessment, an SQL file replay task replays parsed traffic by time to the target database. This topic describes how to create an SQL file replay task.

Limitations

  • Only users with the AliyunOceanBaseFullAccess permission can create SQL file replay tasks. For more information about the permission policy, see AliyunOceanBaseFullAccess.

  • The migration assessment service supports replay of only parsed files. For more information, see Create an SQL file parsing task.

Procedure

  1. Create an SQL file replay task.

    1. Log on to the

      ApsaraDB for OceanBase console.

    2. In the left-side navigation pane, choose Migration Assessment > Performance Assessment.

    3. On the Performance Assessment page, choose Create > SQL File Replay in the upper-right corner.

      You can also click Start Replay next to the target parsed file on the Parsed Files tab of the Performance Assessment page.

  2. On the Set Up Target Database page, configure the parameters.

    Parameter

    Description

    Assessment Task Name

    The name of the assessment task. You can specify a custom task name.

    Select Parsed File

    Select a parsed file from the drop-down list.

    If you create an SQL file replay task on the Parsed Files page, you cannot modify this parameter.

    Target Database Instance

    Select the target database instance from the drop-down list. Make sure that the table schemas and data of the target instance are consistent with those of the source instance to ensure normal stress testing.

  3. Click Next. On the Replay Schema Configuration page, configure the parameters.

    Parameter

    Description

    Tenant

    Select the ID of the tenant where the target database instance resides from the drop-down list.

    Target Account

    The username of a user in the target database.

    Password

    The password of the database user.

  4. Click Verify.

  5. After the verification succeeds, select Parse File Schema in the Replay Schema Configuration section. Then, select a target from the drop-down list and specify whether to replay schemas to the target.

    You can also select Parse File Schema and then click Batch Configure Targets for Schema Replay in the upper-right corner. In the dialog box that appears, select the targets for schema replay and click OK.

  6. Click Next. On the Configure Workload Replay page, configure the parameters.

    Parameter

    Description

    Replay Type

    The replay type. Valid values: Read Traffic (DQL) and Write Traffic (DML).

    Replay Speed

    Select the replay speed from the drop-down list. Maximum replay speed: 10x.

    Replay at a higher speed increases the queries per second (QPS) and transactions per second (TPS) of traffic so that the replay can be completed within a shorter time frame. For example, if the replay speed is set to 2x, the time required to replay the same traffic can be reduced by half, such as from four hours to two hours.

    Sampling Rate

    Select the sampling rate from the drop-down list. Maximum sampling rate: 100%.

    Simulate Concurrency

    Specify whether to enable concurrency simulation. If you set the parameter to No, the replay speed will be slow.

    Read/Write Splitting

    Specify whether to enable read/write splitting.

  7. Click Next. The system automatically performs a precheck.

  8. After the precheck succeeds, click Start to execute the SQL file replay task.

    After the task starts, you can view the assessment report on the Assessment Tasks tab. For more information, see View a performance assessment report.

    Important

    When you start replay, the migration assessment service automatically adds a whitelist named in the omaxxx format to the replay target instance that you selected. This ensures that the replay server can normally connect to your database.