All Products
Search
Document Center

ApsaraDB for OceanBase:Prerequisite operations

Last Updated:Jun 15, 2023

This topic describes how to enable the SQL audit feature of an RDS instance by using the log service (SLS) before you start a performance assessment task in OceanBase Migration Assessment (OMA).

Enable the SQL audit feature of an RDS instance

  1. Log on to ApsaraDB for RDS, and go to the Instances page.

  2. Specify the region at the top of the page and click the ID of the target instance to go to the details page of the instance.

    Important

    To enable the SQL audit feature of an RDS instance, the following prerequisites must be met:

    • The RDS for MySQL instance must be of the High Availability Edition or Enterprise Edition.

    • If you log on as a RAM user, you must have the read and write privileges on the RDS instance, such as the AliyunRDSFullAccess privilege.

  3. In the left-side navigation pane, click SQL Explorer, and choose Autonomy Service > SQL Explorer and Audit

  4. For more information about how to enable the SQL Explorer feature, see SQL Explorer.

    • If the RDS for MySQL instance locates in any of the following regions, you can click Enable to enable the SQL Explorer and audit features: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), China (Zhangjiakou), China (Hohhot), China (Chengdu), China (Guangzhou), China (Heyuan), China (Ulanqab), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta).

    • If the RDS for MySQL instance locates in a region other than the preceding regions, click Official Version to specify the retention period of the SQL audit logs, and click OK to enable the SQL Explorer feature.

Enable the SLS feature

  1. Log on to the SLS console and enable the SLS feature as prompted.

  2. In the Import Data section, choose Cloud Products > RDS SQL Audit - Cloud Products to go to the RDS SQL Audit page.

  3. At the Specify Logstore step, respectively select the created project and logstore from the Project and Logstore drop-down lists. Then, click Next.

    You can also click Create Now next to the Project or Logstore drop-down list to create a new project or logstore. For more information, see Create a project and a logstore.

  4. At the Specify Data Source step, complete the RAM authorization. Then, find the ID of the RDS instance for which you have enabled the SQL Explorer feature, and enable file delivery.

  5. Click Next.

Export data

  1. Return to the homepage of the SLS console.

  2. In the Projects section, click the name of the target project to go to the Logstores page.

  3. In the left-side navigation pane of the Logstore page, choose Data Transformation > Export, and click + next to OSS. Then, configure the OSS delivery feature and export data to the OSS bucket. For more information, see Create an OSS shipping job (new version).

    You can also click the name of the target logstore, specify the query period, and click Search & Analyze. After the query results are displayed, click the download icon to download the logs.