Updated on 2024-05-28 GMT+08:00

Viewing Text Audit History

Scenarios

You can view details about the text to be audited.

To use this function, submit an application.

Prerequisites

A text has been submitted for audit.

Procedure

  1. Log in to the UGO console.
  2. In the navigation pane on the left, choose SQL Audit > Statement Audit. The SQL Text page is displayed by default.
  3. In the History area, view the historical records, including the database type, data source, SQL statement, and audit time.

    Only the latest 10 records are displayed.
    Figure 1 Viewing text audit history

  4. Click View Details to view the audit result and content of the SQL statement.

    If the audit fails, the failure cause is displayed.
    • Violated Rules: Based on the selected rule template, the system provides the violated rule name, risk level, and suggestions.

      Click the content in the Question Segment column to highlight the question segment in the text. To cancel the highlight, click the content again.

    • Unmatched Rules: The rules related to the source database are not matched because:

      • No data source is selected.
      • Data source connection fails.
      • The user permission is insufficient.
      • The schema is incorrectly selected.
      • The schema table is not found.

      The displayed information includes the rule name, risk level, and unmatched reason.

    • Table Structure: Based on the selected rule template, the system provides the table structure information which the SQL statement to be audited depends on, including the object name, object type, and owner.
    • Execution Plans: The execution plans of the SELECT, UPDATE, DELETE, and INSERT statements are obtained.
    • Click the value next to Rule Template to go to the specific template information.

      To obtain the table structure, you must have the permissions to read system catalogs and system views.

      GaussDB system catalogs: tables, pg_class, pg_namespace, relnamespace, pgxc_class, pg_settings, pg_get_viewdef, columns, pg_tables, pg_index, table_constraints, pg_partition, pg_get_tabledef, check_constraints, key_column_usage, pg_get_keywords, gs_package, DB_CONSTRAINTS, and ADM_IND_COLUMNS.

      MySQL system catalogs: information_schema.TABLES, information_schema.COLUMNS, INFORMATION_SCHEMA.STATISTICS, and INFORMATION_SCHEMA.TABLE_CONSTRAINTS.

    Figure 2 Viewing details