Skip to main content
Skip table of contents

Query Audit

Overview

QueryPie records the history of executed queries and actions performed on the database.

Viewing Query Audit

image-20240730-090702.png

Administrator > Audit > Databases > Query Audit

  1. Navigate to the Administrator > Audit > Databases > Query Audit menu.

  2. Logs are displayed in descending order based on the execution date.

  3. You can search the logs using the search bar at the top left of the table with the following criteria:

    1. Name: User's name

    2. Table(s): Name of the table(s) involved

  4. Click the filter button to the right of the search field to filter logs using AND/OR conditions with the following options:

    image-20240730-091338.png
    1. Connection Name: Name of the DB connection

    2. Database Type: Type of the database

    3. SQL Type: Type of SQL statement

    4. Action Type: Type of action

      • SQL Execution: Executing an SQL statement

      • Export Data: Exporting data

      • Export Schema: Exporting schema

      • Import Data: Importing data

      • Import Schema: Importing schema

      • Copy Clipboard: Copying to clipboard

    5. Executed At: Date and time of execution

    6. Result: Success or failure of the task

    7. Prevented: Whether the access was blocked by a policy

    8. Table Resolved: Whether the table was involved

    9. Executed From: Source of the query execution

      • Web Editor: Executed from the QueryPie web editor

      • Proxy: Executed through QueryPie proxy

      • SQL Request: Executed through the SQL Request workflow

      • SQL Job: Executed by an SQL Job

      • SQL Export Request: Executed through the SQL Export Request workflow

    10. Label: Whether it is a DB ledger

  5. Click the refresh button at the top right of the table to update the log list.

  6. The table provides the following column information:

    1. No: Event identification number

    2. Executed At: Date and time of execution

    3. Result: Success or failure of the task

    4. Name: User's name

    5. Email: User's email

    6. Action Type: Type of action

    7. Connection Name: Name of the DB connection

    8. Database Type: Type of the database

    9. Privilege Name: User's access privilege

    10. Client IP: User's client IP address

    11. Replication Type: Type of DB replication

    12. DB Host: Connected DB host

    13. DB Name: Name of the database

    14. DB User: DB user ID

    15. Table(s): Name of the table(s) involved

    16. SQL Type: Type of SQL statement

    17. Query: Executed query statement

    18. Time(ms): Execution time in milliseconds

    19. Rows: Number of rows affected

    20. Data Size: Size of the data affected

    21. Client Name: Name of the client used (e.g., DataGrip)

    22. Error Message: Records of execution failures or other issues

    23. Execution Reason: Reason for executing the query

    24. Prevented: Whether the access was blocked by a policy

    25. Label: Whether it is a DB ledger

    26. Executed From: Source of the query execution

Viewing Query Audit Details

Click on any row to view detailed information about the query.

image-20240730-091103.png

Administrator > Audit > Databases > Query Audit > Query Audit Details

  • The drawer on the right displays the following basic query audit information:

    1. Result: Success or failure of the task

    2. Name: User's name

    3. Action Type: Type of action

    4. SQL Type: Type of SQL statement

    5. Privilege Name: User's access privilege

    6. Privilege Type: Type of user access privilege

    7. Data Size: Size of the data affected

    8. Time(ms): Execution time in milliseconds

    9. Executed At: Date and time of execution

    10. Executed From: Source of the query execution

    11. Label: Whether it is a DB ledger

    12. Connection Name: Name of the DB connection

    13. Replication Type: Type of DB replication

    14. Client Name: Name of the client used (e.g., DataGrip)

    15. Client IP: User's client IP address

    16. Host Name: Name of the host executing the connection

    17. Database Type: Type of the database

    18. DB Host: Connected DB host

    19. DB Name: Name of the database

    20. DB User: DB user ID

    21. Table(s): Name of the table(s) involved

  • At the bottom, the executed query statement and additional details are displayed:

    1. Query: Executed query statement

    2. First 10 Rows: Sample of the first 10 rows of the executed SELECT statement

      • This field is displayed only if the Display the first 10 rows in Query Audit setting is enabled (default: Off).

        • Refer to DB Connection Security Settings under Security.

      • Copy Data: Button to copy pre/post data

    3. Error Message: Records of execution failures or other issues

    4. Execution Reason: Reason for executing the query

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.