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
Intro
Database Auditing and Compliance
Database auditing is the controlled recording and examination of activity that affects a database. It answers questions such as who connected, which identity issued a statement, which object the statement touched, what result occurred, and when the event happened. Compliance uses that evidence to show that required controls exist and operate over time.
An audit trail is not the same as a transaction log. A transaction log supports database recovery and consistency. An audit trail supports accountability, investigation, and control assessment. A monitoring dashboard can show current health, but it does not automatically provide durable evidence. The same event may feed monitoring, detection, investigation, and compliance, but each use has different requirements for scope, protection, retention, and review.
From requirement to evidence
A defensible audit program forms a chain:
- A law, standard, contract, or internal risk decision creates a requirement.
- A control objective translates that requirement into observable behavior.
- An audit policy selects the database events and identities that must be recorded.
- The database engine, proxy, cloud service, or application produces records.
- A protected pipeline collects, normalizes, stores, and retains those records.
- Detection rules and scheduled reviews examine the records.
- Evidence packages connect records, policy, review results, and remediation to the control objective.
The requirement rarely says which database switch to enable. HIPAA, for example, requires mechanisms that record and examine activity in systems containing electronic protected health information. NIST SP 800-53 separates audit-event selection, record content, generation, review, storage capacity, time synchronization, protection, and retention into related controls. PCI DSS Requirement 10 addresses logging and monitoring access to system components and cardholder data. These sources define outcomes. Database and platform documentation defines the mechanisms that can produce evidence for those outcomes.
Compliance is therefore not a product mode. Enabling an audit feature creates records; it does not prove that event coverage matches the requirement, that the records cannot be altered by the subjects being audited, that reviews occur, or that exceptions are resolved.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
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
