All Products
Search
Document Center

ApsaraDB for OceanBase:Create an SQL file parsing task

Last Updated:Dec 29, 2025

In performance assessment, an SQL file parsing task generates files specific for migration assessment based on the selected source traffic. The files are then replayed for assessment. This topic describes how to create an SQL file parsing task.

Limitations

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

  • The migration assessment service supports file parsing only for the source database.

Non-OceanBase database as the source

  1. Create an SQL file parsing 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 Parsing in the upper-right corner.

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

    Parameter

    Description

    Assessment Task Name

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

    Cloud Vendor

    Select Alibaba Cloud Database from the drop-down list.

    Source Database Type

    Select the required database type from the drop-down list. You can select RDS_MySQL, PolarDB-X 1.0, PolarDB-X 2.0, TIDB, or POLARMYSQL.

  3. Click Next. Configure the parameters on the Configure Data Collection page.

    Data Collected From can be set to OSS Import or Upload File. Before performance assessment, you must obtain the traffic files of the RDS_MySQL, PolarDB-X, or POLARMYSQL instance and export the files to an Object Storage Service (OSS) bucket or save the files to your local storage. For more information, see Obtain the traffic files of an instance.

    Note
    • We recommend that you create a dedicated user for the migration assessment service and grant the user only privileges on relevant buckets. For more information about the Alibaba Cloud account system, see the documentation of Resource Access Management.

    • If you select TIDB for Source Database Type, only the Upload File option is supported for Data Collected From.

    • If you store SLS traffic files in an OSS bucket, select OSS Import to import traffic files for performance assessment.

      Parameter

      Description

      AccessKey Account

      The AccessKey ID of your Alibaba Cloud account.

      AccessKey Password

      The AccessKey secret of your Alibaba Cloud account.

      OSS Bucket for Log Import

      The name of the OSS bucket from which the logs are imported.

      File Directory

      The directory to which the traffic files are delivered.

      Traffic Collection Time Range

      The time period for assessment. Objects generated during the specified time period are assessed. The maximum time period is 24 hours.

      If no data is obtained, no log files were generated within the specified time range.

      Click Verify. After the verification succeeds, parsable files are displayed in Valid Files.

    • If you store SLS traffic files in the local storage, select Upload File and manually import a file in the corresponding format for assessment. You can upload only one file with a maximum size of 5 GB.

      • When the source database type is RDS_MySQL or PolarDB-X 2.0, valid values of File Type are SLS File and SQL Insight File.

        You can upload an SLS file in the JSON, CSV, or ZIP format, or an SQL insight file in the CSV or ZIP format.

      • When the source database type is PolarDB-X 1.0, you can upload a file in the CSV or ZIP format.

      • When the source database type is TIDB, you can upload a file in the JSON, CSV, LOG, or ZIP format.

      • When the source database type is POLARMYSQL, you can upload a file in the JSON, CSV, or ZIP format.

  4. Select the created instance from the Source Database Instance drop-down list.

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

  6. After the precheck succeeds, click Start to execute the SQL file parsing task.

    After the task starts, you can view its information, such as the task progress, on the Assessment Tasks tab. For more information, see View the details of a performance assessment task. After a file is separately parsed, it will be displayed on the Parsed Files tab of the Performance Assessment page.

OceanBase database as the source

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

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

    Parameter

    Description

    Assessment Task Name

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

    Cloud Vendor

    Select Alibaba Cloud Database from the drop-down list.

    Source Database Type

    The database type. Select OB_MySQL or OB_Oracle from the drop-down list.

    Source Database Instance

    Select a created database instance from the drop-down list.

    Tenant

    Select a tenant from the drop-down list.

  3. Click Next. Configure the parameters on the Configure Data Collection page.

    Important

    If SQL audit is disabled for the source tenant, data collection is not supported. Click Go open. On the SQL Audit page that appears, click Start SQL Audit.

    Parameter

    Description

    Data Collected From

    If the source database type is OB_MySQL or OB_Oracle, you can select Collect from Audit Views.

    Note

    This collection method is available for limited-time free trial.

    Traffic Collection Time Range

    You can select a start time and end time for data collection. A maximum span of 30 days is supported, and data in at most 24 hours can be parsed at a time.

    Click Verify. After the verification succeeds, parsable files are displayed in Valid Files.

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

  5. After the precheck succeeds, click Start to execute the SQL file parsing task.

    After the task starts, you can view its information, such as the task progress, on the Assessment Tasks tab. For more information, see View the details of a performance assessment task. After a file is separately parsed, it will be displayed on the Parsed Files tab of the Performance Assessment page.