Help Center/ GaussDB/ FAQs/ Database Usage/ How Do I Use DAS to Query SQL Statements Executed in GaussDB?
Updated on 2024-11-11 GMT+08:00

How Do I Use DAS to Query SQL Statements Executed in GaussDB?

DAS is a professional database management tool with a graphical user interface. You can enable SQL Explorer to query related SQL statements.

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > Data Admin Service The DAS console is displayed.
  4. In the navigation pane, choose Intelligent O&M > Instance List to go to the Instance Overview page.
  5. On the Instance Overview page, select GaussDB Instances in the filter area.

    Figure 1 Instance overview

  6. Locate the instance you want to view and click Details.
  7. Choose SQL > SQL Explorer to view full SQL query details of the instance.
  8. On the SQL Statements tab, toggle on Enable DAS SQL Explorer. Query the SQL statements executed by the current instance by time range, user, keyword, operation type, database, or other filters.
  9. Filter operation types by referring to Table 1 and click Export to export the corresponding SQL statements.

    Table 1 Common SQL statement types

    Type

    Keyword

    DDL

    CREATE, DROP, ALTER

    DML

    INSERT, UPDATE, DELETE, SELECT

    DCL

    GRANT, REVOKE

    A maximum of 10,000 SQL statements can be displayed. If you need to view more, click Export.

    A maximum of 100,000 records can be exported.