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 in the upper right corner of the SQL Query page. After this function is enabled, executed SQL statements will be saved on 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 by time range, keyspace name, or keyword.

    Figure 1 SQL history
    • To go to the Keyspace Management page, click a keyspace 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.