Create an SQL file parsing task

Updated at:

An SQL file parsing task is part of a performance evaluation. It formats selected source traffic for migration evaluation and replay. This topic describes how to create an SQL file parsing task.

Limits

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

  • Migration evaluation only supports parsing files from the source database.

Non-OceanBase source databases

  1. Create an SQL file parsing task.

    1. Log on to the OceanBase console .

    2. In the navigation pane on the left, click Migration Evaluation > Performance Evaluation.

    3. On the Performance Evaluation page, click Create Performance Evaluation > SQL File Parsing in the upper-right corner.

  2. On the Select Source Type page, configure the parameters.

    Parameter

    Description

    Evaluation Task Name

    The custom name of the evaluation task.

    Instance Source

    From the drop-down list, select Alibaba Cloud Database.

    Source Database Type

    From the drop-down list, select the required database type. Options include RDS_MySQL, PolarDB-X 1.0, PolarDB-X 2.0, TiDB, or POLARMYSQL.

  3. Click Next. On the Traffic Parsing Configuration page, configure the parameters.

    For Traffic Collection Method, you can select Import from OSS or Upload File. Before you perform a performance evaluation, you must obtain the traffic files from your RDS for MySQL, PolarDB-X, or PolarDB for MySQL instance and export them to Object Storage Service (OSS) or save them locally. For more information, see Obtain traffic files of an instance.

    Note
    • Create a dedicated user for the migration evaluation service and grant permissions only on the relevant buckets. For more information, see Resource Access Management.

    • If you set Database Type to TiDB, only Upload File is supported for Traffic Collection Method.

    • If you saved the traffic files from Simple Log Service (SLS) to OSS, select Import from OSS to import the traffic files for evaluation.

      Parameter

      Description

      AccessKey ID

      The AccessKey ID of your Alibaba Cloud account.

      AccessKey Secret

      The AccessKey secret of your Alibaba Cloud account.

      OSS Bucket for Log Import

      Enter the name of the OSS bucket where the logs are imported.

      File Delivery Folder

      Enter the folder where the traffic files are delivered.

      Traffic Collection Scope

      Select the time range for the evaluation. The maximum time range is 24 hours.

      If no data is obtained, it means no log files were generated within the selected time range.

      After you configure the parameters, click Validate. After the validation is successful, the Valid File List displays the files that can be parsed.

    • If you saved the traffic files from SLS to your local computer, select Upload File to manually import the files in the correct format for evaluation. The maximum file size is 5 GB, and you can upload only one file.

      • If the source database type is RDS for MySQL or PolarDB-X 2.0, File Type includes SLS File and SQL Explorer File.

        You can upload SLS files in JSON, CSV, or ZIP format, and SQL Explorer files in CSV or ZIP format for evaluation.

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

      • If the source database type is TiDB, you can upload files in JSON, CSV, LOG, or ZIP format.

      • If the source database type is PolarDB for MySQL, you can upload files in JSON, CSV, or ZIP format.

  4. From the Source Database Instance drop-down list, select the created instance.

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

  6. After the precheck is successful, click Start to begin the SQL file parsing task.

    After the task starts, you can view its progress and other information on the Performance Evaluation Task page. For more information, see View the details of a performance evaluation task. Parsed files are saved on the Performance Evaluation > Parsed File List page.

Source: OceanBase database

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

  2. On the Select Source Type page, configure the parameters.

    Parameter

    Description

    Evaluation Task Name

    The custom name of the evaluation task.

    Instance Source

    From the drop-down list, select Alibaba Cloud Database.

    Source Database Type

    From the drop-down list, select the required database type. Options include OB_MySQL or OB_Oracle.

    Source Database Instance

    From the drop-down list, select the created database instance.

    Tenant

    From the drop-down list, select the appropriate tenant.

  3. Click Next. On the Traffic Parsing Configuration page, configure the parameters.

    Important

    Traffic collection is not supported if SQL Audit is not enabled for the source tenant. To enable it, click Enable Now to go to the SQL Audit page and then click Enable SQL Audit.

    Parameter

    Description

    Traffic Collection Method

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

    Note

    This collection method is free for a limited time.

    Traffic Collection Scope

    You can select the start and end times for traffic collection. The supported time span is 30 days, and the maximum duration for a single parsing task is 24 hours.

    After you configure the parameters, click Validate. After the validation is successful, the Valid File List displays the files that can be parsed.

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

  5. After the precheck is successful, click Start to begin the SQL file parsing task.

    After the task starts, you can view its progress and other information on the Performance Evaluation Task page. For more information, see View the details of a performance evaluation task. Parsed files are saved on the Performance Evaluation > Parsed File List page.