All Products
Search
Document Center

Data Management:Use the operation audit feature

Last Updated:Mar 28, 2026

Data Management (DMS) provides the operation audit feature to help you retain, report on, and analyze database activity across your DMS environment. Use it to:

  • Retain a full audit trail of SQL statements, tickets, and logon events

  • Report on operations at the database, instance, or global level

  • Analyze activity to troubleshoot security incidents and meet compliance requirements

Modules and log retention

Modules

The operation audit feature consists of two modules.

ModuleScopeIncludes
Operation LogsAll operations performed in DMSManagement operations (instance management, user management, database account management), configuration operations (global DMS configuration, database ticket configuration), SQL Console statements, tickets, logon information
Operation AuditOperations performed on databases in DMSSQL Console statements, tickets, instance information
Note

In the Operation Audit module, only DMS administrators, database administrators (DBAs), ticket submitters, and stakeholders involved in the ticket approval process can view ticket details.

Log retention period

Log retention depends on the control mode and sensitive data protection status of each database instance.

ConditionRetention period
Instance managed in Stable Change or Security Collaboration mode, OR sensitive data protection is enabled3 years
Instance managed in Flexible Management mode AND sensitive data protection is disabled1 day

To extend the retention period, change the control mode or enable sensitive data protection. See Change the control mode of an instance and Enable the sensitive data protection feature.

Important

Changing the control mode affects which historical logs remain visible:

  • Flexible Management to another mode: The retention period changes from 1 day to 3 years, effective from the day of the change. Logs generated while the instance was in Flexible Management mode cannot be viewed.

  • Stable Change or Security Collaboration to Flexible Management: Only logs from the previous day remain visible. Logs from earlier dates may be deleted and cannot be viewed.

Access the operation audit feature

The entry point and scope of audit data depend on your role and where you navigate in the DMS console.

Auditing scopeWhat you seeHow to navigateSupported roles
DatabaseOperations on the current database onlyOn the SQL Console tab, move the pointer over the caozuoshenji icon in the upper-right corner and select Operation Audit. Alternatively, right-click the database in the instance list and choose Audit > Operation Audit.DMS administrator, security administrator, DBA, instance owner, regular user (regular users see only their own operations)
InstanceOperations on the current instance onlyIn the instance list, right-click the database and choose Audit > Operation Audit.DMS administrator, security administrator, DBA, instance owner, regular user (regular users see only their own operations)
GlobalAll operations across DMSIn the top navigation bar, move the pointer over Security and Specifications and click Operation Audit.DMS administrator, security administrator, DBA

Download operation records

The following steps download all SQL statements executed in the SQL Console over the previous 30 days.

Prerequisites

Before you begin, make sure you have:

  • Access to DMS console V5.0

  • A role with global audit access (DMS administrator, security administrator, or DBA)

Steps

  1. Log on to the DMS console V5.0.

  2. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All functions > Security and Specifications > Operation Audit.

    Note

    In normal mode, choose Security and Specifications > Operation Audit in the top navigation bar.

  3. Click SQL window list.

  4. Set Time to Last One Month and click Search.

  5. Click the 下载按钮 icon to download the results as an XLSX file.

    Note

    To preview and export more results, set Items Per Page to 100 before downloading.

Export operation logs

DMS provides two ways to export operation logs depending on your workflow.

MethodHow
APICall the GetOpLog operation
Simple Log ServiceSee Export operation logs of DMS to Simple Log Service

What's next

  • You can download operation logs only by calling the GetOpLog operation.

  • Set up continuous log export to Simple Log Service for long-term retention and SIEM integration.