Audit Guide
Data auditing supports real-time database activity monitoring by recording detailed information about every database query, including read, update, and delete operations. It also logs user activity together with changes to database configurations and system settings. This guide describes how to configure DataSunrise to audit all queries executed against a specified target database.
Audit logs are stored either in the DataSunrise-integrated SQLite database or in an external database. This logged data helps organizations meet requirements from regulatory standards such as SOX, HIPAA, PCI DSS, and other applicable regulations.
Data Audit functionality operates in both Sniffer and Proxy deployment modes. Within the Data Audit section, administrators can configure audit rules to monitor database activity and apply filters based on database users, client IP addresses, or application sources.
To enhance your understanding of data auditing, we highly recommend visiting our YouTube channel to watch our videos on this topic. These videos not only showcase our auditing solution but also familiarize you with alternative data auditing methods using native DBMS features.
The Importance of Database Auditing
Database auditing plays a critical role in identifying unauthorized access, tracking administrative actions, and maintaining detailed records of activity involving sensitive information. For organizations governed by regulations such as GDPR, SOX, HIPAA, and PCI DSS, comprehensive visibility into database access and user behavior is essential for demonstrating compliance.
Using advanced auditing capabilities offered by solutions such as DataSunrise, security teams can detect unusual behavior faster, investigate security events more effectively, and collect the evidence needed for compliance assessments. Without reliable auditing controls, unauthorized operations, security policy violations, and insider activity may remain undetected, increasing the risk of financial impact and reputational harm.
What is DataSunrise Data Audit?
DataSunrise Data Audit is a central platform capability that gives organizations detailed visibility into database activity and user actions. Using proxy or sniffer deployment modes, it monitors database traffic continuously and records SQL queries, data modifications, authentication events, and connection attempts in real time.
These features help organizations apply least-privilege principles, supervise privileged users, and meet compliance requirements under regulations such as HIPAA, SOX, and PCI DSS. Built-in filtering, reporting, and alerting tools also support incident investigations, forensic reviews, and continuous compliance monitoring.
Creating an Audit Rule
Let’s assume that you’ve already created the target database profile. Then to audit our test database, it is necessary to create and configure an Audit Rule. In this case, the sequence of actions is the following:
- Navigate to Audit → Rules. Then click Add Rule to create a new Audit Rule.
- Configure your Audit Rule to log all queries to the database (see notes below).
In the Main section subsection, the target database information is specified. It includes database type (PostgreSQL), database instance (as the target database entry is named in the Configurations) and the Rule’s logical name.
By default, the “Audit” action is selected. It means that DataSunrise will audit user queries when the rule is triggered. To log database responses (the output), the Log Data checkbox is checked.
Since the current scenario requires all user queries to be audited, Filter Sessions are left as by default. Thus, any query to the database regardless of its source IP address will trigger the rule.
Filter Statements settings are as by default as well. Thus, DataSunrise will audit all queries directed to all database objects.
Viewing Database Audit Results
This stage includes demonstration of auditing results. The Audit Rule which was created at the previous stage is configured to be triggered by any incoming user query. Here’s what happens when DataSunrise receives a user query.
- Let’s send the following query via PGAdmin:
- The database outputs the table contents:
- Now let’s check the auditing results in the DataSunrise’s Web Console. Navigate to the Data Audit → Transactional Trails subsection.
- To view detailed information about some event, click event’s ID. In a new tab, the event’s details will be displayed: code of the query, basic information, session information, database objects involved in the query and the query results.
SELECT * FROM public.customers;
Each event logs comprehensive metadata including IP addresses, application names, timestamps, and execution details.
Scrolling down reveals additional event details, including the complete SQL query statement and database objects the query touches. The query accessed sensitive data fields including credit card numbers, email addresses, and ZIP codes.
Query results can be displayed, but enabling this feature significantly impacts audit database storage consumption.
Real-World Use Cases: Applying DataSunrise Data Audit
The DataSunrise Data Audit engine isn’t just a logging tool—it’s a compliance enabler and incident response ally. Here’s how organizations use it to meet regulatory and operational requirements in live environments:
| Use Case | How DataSunrise Helps |
|---|---|
| SOX Compliance | Tracks privileged user activity on financial systems and logs changes to critical configurations. Supports external audit reviews with detailed transaction histories. |
| HIPAA Monitoring | Audits all queries involving PHI, including read access to medical records. Captures session metadata for accountability and breach investigation. |
| PCI DSS Enforcement | Monitors credit card data access in real time and logs queries that touch PAN fields. Supports alerting on unauthorized access attempts. |
| Data Exfiltration Detection | Flags suspicious query volumes, DUMP statements, and unapproved exports—especially from new IPs or clients. |
| Insider Threat Visibility | Captures admin actions, schema modifications, and unusual object access—all correlated with user identities and timestamps. |
Because DataSunrise works at the proxy layer, it can enforce auditing even when the database’s native logging is disabled or bypassed. This makes it an essential part of modern data security and governance strategies.
Conclusion
Database auditing is an essential part of sensitive data protection because it provides continuous visibility into database operations, supports the detection of suspicious activity, and helps organizations meet regulatory requirements. Without complete audit trails, it becomes much harder to determine who accessed protected information, which actions were carried out, and whether security controls were applied correctly. A structured auditing approach improves transparency, reinforces accountability, and enables faster security investigations.
DataSunrise supports these objectives through centralized auditing of database sessions, SQL queries, user activity, and transactions. With proxy-based monitoring, configurable audit rules, and detailed session analysis, the platform provides comprehensive insight into how sensitive information is accessed, changed, and used across heterogeneous database environments.
Consolidating audit data within a single platform allows security teams to investigate incidents more effectively, streamline compliance reporting, and identify unauthorized access or unusual behavior sooner. Administrators can examine user actions, review audit events, analyze suspicious activity, and produce supporting evidence for standards and regulations such as SOX, HIPAA, PCI DSS, and GDPR without depending entirely on native database auditing features.
From a limited set of business-critical databases to complex hybrid and multi-cloud infrastructures, DataSunrise delivers the centralized oversight, scalability, and control required for reliable database auditing. Continuous monitoring, policy-driven auditing, and detailed reporting help organizations improve governance, reduce security exposure, and maintain consistent protection for sensitive data.