All Products
Search
Document Center

ApsaraDB for OceanBase:Create an SQL file parsing task

Last Updated:Aug 21, 2024

You can select any of the following three modes for a performance assessment task as needed: Full Performance Assessment, SQL File Parsing, and SQL File Replay. This topic describes how to create an SQL file parsing task.

Limitations

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

Procedure

  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 Performance Assessment Task > SQL File Parsing in the upper-right corner.

  2. On the Select Source Type page, specify related parameters.

    Parameter

    Description

    Assessment Task Name

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

    Instance Source

    Select Alibaba Cloud Database from the drop-down list.

    Database Type

    The database type. You can select RDS_MySQL, PolarDB-X 1.0, PolarDB-X 2.0, OB_MySQL, or OB_Oracle.

    Database Instance

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

    Tenant

    This parameter is available only when you select OB_MySQL or OB_Oracle for Database Type.

  3. Click Next. Configure the parameters on the Traffic Analysis Settings page.

    • If you select RDS_MySQL, PolarDB-X 1.0, or PolarDB-X 2.0 for Database Type, Traffic Collection Mode can be set to Import File from OSS or Upload File. Before the performance assessment, you must go to the SLS console and enable the SQL audit feature for RDS for MySQL or PolarDB-X. For more information, see Prerequisite operations.

      • If you store SLS traffic files in an Object Storage Service (OSS) bucket, select Import File from OSS to import traffic files for the performance assessment.

        Parameter

        Description

        AccessKey Account

        The AccessKey ID of your Alibaba Cloud account.

        AccessKey Password

        The AccessKey Secret of your Alibaba Cloud account.

        Source OSS Bucket

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

        File Delivery Directory

        The directory to which the traffic files are delivered.

        Traffic Collection Range

        Data generated in the specified time range will be assessed. The time span cannot exceed 24 hours.

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

        Click Verify. After the verification succeeds, the Valid Files list shows the parsable files.

      • If you store SLS traffic files in the local storage, select Upload File and manually import files in the CSV or JSON format for assessment.

    • If you have selected OB_MySQL or OB_Oracle for Database Type, configure the following parameters.

      Parameter

      Description

      Traffic Collection Mode

      If the source 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 Range

      You can select a start time and end time for traffic collection. A maximum span of 30 days is supported.

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

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

    After the task starts, you can view information such as the progress of the task on the Performance Assessment Tasks page. For more information, see View details of a performance assessment task. If a file is parsed in a separate parsing task, you can view the file parsing record by choosing Performance Assessment > Parsed Files.