Updated on 2024-08-29 GMT+08:00

SQL History

After you toggle on Save Executed SQL Statements, DAS will save the SQL statements you executed in the SQL window for future view. You can also execute the SQL statements again with no need to enter them again in the SQL window.

Prerequisites

  • You have enabled Save Executed SQL Statements.
  • After you enable Save Executed SQL Statements, executed SQL statements will be recorded in the DAS management host.

Constraints on Usage

SQL statement execution records can be stored for up to one year.

Procedure

  1. Log in to the DAS console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner, and under Databases, click Data Admin Service.
  4. In the navigation pane on the left, choose Development Tool.

    You can also click Go to Development Tool on the overview page.

  5. Locate the DB instance that you want to log in to and click Log In in the Operation column.
  6. On the top menu bar, choose SQL Operations > SQL History.
  7. On the displayed page, search for execution information about the target SQL statement by time range, database name, or keyword.

    • To access the Database Management page, click a database name.
    • To copy a SQL statement, click it in the SQL Statement column.
    • To execute a SQL statement, click Open in SQL window in the Operation column.