Database Auditing and Compliance
Database auditing records who accessed or changed database resources, what they did, when it happened, and whether it succeeded. Compliance work turns those records into protected, reviewable evidence that specific security and privacy requirements are operating as intended.
itDatabases and data storage | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Database Auditing and Compliance
Database auditing is the record of activity that matters when somebody needs to establish who did what to a database and when. It exists because a transaction log can help restore data but cannot, by itself, explain accountability. A monitoring dashboard can announce trouble. An audit trail has the less glamorous task of leaving evidence behind after everyone has gone home and remembered their meeting.
The shape to keep is an evidence chain. A requirement becomes a control objective, then an audit policy, then an event record, then protected storage, review, and remediation. Each link has an irritating habit of being necessary. A perfectly configured database switch does not establish that the right events were selected, that records survived delivery, or that anyone reviewed an exception.
The important decision is not which product has the longest feature list. It is what one event source can actually see. Native auditing understands database objects and privileges. A proxy sees only traffic that crosses its path. Cloud logs can show management activity without showing every SQL statement. Application correlation, a shared request value linking application and database events, is needed when connection pooling makes many people look like one database account. The vocabulary is less poetic than it sounds, which is probably for the best.
The surprising part is that more logging can weaken the result. Full SQL text and parameters can contain sensitive data. Broad capture can consume storage, add latency, and hide the few events a reviewer needs in a large pile of technically accurate clutter. The target is enough evidence for the control objective, not a diary written by every query the database has ever considered.
Protection also reaches farther than a retention setting. Immutability, resistance to changing or deleting records under the relevant threat model, fails when an administrator can disable collection, redirect the destination, or suppress an alert before a record arrives. That is why the pipeline, its roles, its clocks, its capacity, and its failure signals belong to the control alongside the records.
Read the Intro for the full data path and its trust boundaries. Open Slides for the source comparison and the fail-open or fail-closed decision. Keep the Cheatsheet nearby when mapping events, testing failures, or assembling a bounded evidence package. The Quiz checks whether the distinctions survive contact with a plausible system. They should. The system may object, but that is what tests are for.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final
Supports
- Audit and Accountability control family
- Event selection, content, generation, review, protection, retention, time, capacity, and failure response
- Requirement-to-control and evidence-chain model
- https://csrc.nist.gov/pubs/sp/800/53/a/r5/final
Supports
- Security and privacy control assessment methodology
- Reproducible evidence and assessment procedures
- https://csrc.nist.gov/pubs/sp/800/92/final
Supports
- Enterprise log-management infrastructure and processes
- Collection, storage, analysis, and operational log responsibilities
- September 2006 publication milestone
- https://csrc.nist.gov/pubs/sp/800/53/r3/final
Supports
- Audit and Accountability control-family history
- August 2009 publication milestone
- https://www.hhs.gov/hipaa/for-professionals/compliance-enforcement/audit/protocol-edited/index.html
Supports
- HIPAA audit-controls requirement to record and examine system activity
- Policy, procedure, communication, and review evidence around technical controls
- https://www.hhs.gov/sites/default/files/ocr/privacy/hipaa/administrative/securityrule/securityrulepdf.pdf
Supports
- February 2003 Security Rule milestone
- Audit controls in section 164.312(b)
- https://www.hhs.gov/hipaa/for-professionals/index.html
Supports
- April 2005 Security Rule compliance date
- Security Rule scope and safeguards
- https://www.congress.gov/bill/104th-congress/house-bill/3103/all-actions
Supports
- HIPAA enactment on August 21, 1996
- https://www.sec.gov/rules-regulations/statutes-regulations
Supports
- Sarbanes-Oxley enactment on July 30, 2002
- Corporate responsibility and financial disclosure reforms
- https://www.pcisecuritystandards.org/documents/PCI-DSS-v4-0-SAQ-D-Service-Provider.pdf
Supports
- Requirement 10 logging and monitoring controls
- Audit-log content, review, protection, retention, and response
- https://www.pcisecuritystandards.org/about_us/press_releases/securing-the-future-of-payments-pci-ssc-publishes-pci-data-security-standard-v4-0/
Supports
- PCI DSS version 4.0 publication on March 31, 2022
- https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32016R0679
Supports
- GDPR adoption on April 27, 2016
- Accountability, processing security, and records protection context
- https://eur-lex.europa.eu/eli/reg/2016/679/2016-05-04
Supports
- GDPR application from May 25, 2018
- https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/introduction-to-auditing.html
Supports
- Database auditing definition and purposes
- Unified audit policies, user context, successful and failed operations, and consolidated trail
- https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/managing-unified-audit-trail.html
Supports
- Unified audit record generation, storage, independence from transaction commit, and trail management
- https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/guidelines-auditing.html
Supports
- Focused audit-policy guidance
- Volume, performance, suspicious-activity, and sensitive SQL text considerations
- https://learn.microsoft.com/en-us/sql/t-sql/statements/create-database-audit-specification-transact-sql?view=sql-server-ver17
Supports
- SQL Server audit specifications, actions, principals, securables, and enabled state
- https://dev.mysql.com/doc/refman/8.4/en/audit-log.html
Supports
- MySQL Enterprise Audit policy-based connection and query logging
- Filter storage, formats, and commercial licensing
- https://dev.mysql.com/doc/refman/8.4/en/audit-log-restrictions.html
Supports
- MySQL top-level SQL and non-SQL API coverage limits
- https://github.com/pgaudit/pgaudit
Supports
- PostgreSQL session and object audit logging
- Statement classes, relation detail, installation, volume, latency, new-object, and superuser limits
- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/DBActivityStreams.html
Supports
- Managed database activity streaming to Kinesis
- Administrative separation, supported deployment limits, and policy requirements
- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/DBActivityStreams.Monitoring.html
Supports
- Database activity fields, SQL text, bind-variable sensitivity, and stream lifecycle
- https://learn.microsoft.com/en-us/azure/azure-sql/database/auditing-overview?view=azuresql
Supports
- Azure SQL audit events and destinations
- Compliance assistance without a compliance guarantee
- https://docs.cloud.google.com/logging/docs/audit
Supports
- Cloud audit-log classes, identity, access, immutability, routing, and retention
- Data Access audit-log default behavior
- https://docs.oracle.com/en/database/oracle/audit-vault-database-firewall/20/sigcc/concepts.html
Supports
- Oracle Audit Vault architecture, heterogeneous trail collection, repository, and database firewall
- Network-path monitoring boundary and product landscape placement
- https://www.ibm.com/docs/en/gdp/12.x?topic=walkthroughs-monitor-data-activity-enforce-least-privilege
Supports
- Guardium monitoring of privileged activity, DML, DDL, and access trends
- Product landscape placement
- https://www.datasunrise.com/documentation/
Supports
- DataSunrise database auditing, security policies, and centralized console
- Product landscape placement
- https://github.com/sindresorhus/awesome
Supports
- Discovery route to Awesome Database Tools and security lists
- https://github.com/mgramin/awesome-db-tools
Supports
- Discovery of Acra and Databunker as database-security projects
- https://github.com/getprobo/awesome-compliance
Supports
- Discovery of Wazuh as compliance-oriented security monitoring
- https://docs.cossacklabs.com/acra/security-controls/security-logging-and-events/
Supports
- Acra security events, SQL firewall logging, SIEM integration, and protected audit logging
- Awesome Links rationale
- https://databunker.org/doc/security/
Supports
- Databunker API audit trail and protected personal-data model
- Awesome Links rationale
- https://documentation.wazuh.com/current/compliance/index.html
Supports
- Wazuh log analysis and mappings to PCI DSS, HIPAA, NIST, and GDPR
- Awesome Links rationale
