Database activity monitoring (DAM) watches what is being done to data right now, query by query, while data security posture management (DSPM) works out where sensitive data lives and who could reach it, so buying one in place of the other leaves either a blind spot at runtime or a blind spot in the inventory. The two categories now overlap in marketing, and some buyers ask whether DSPM is replacing DAM. It is not: they answer different questions and produce different evidence. This guide compares them on threat model, architecture, coverage of cloud data stores, monitoring of privileged and service accounts, and compliance use, then gives decision criteria and worked scenarios. It is written for data security, database and cloud security teams and for buyers sequencing spend. For product evaluation, see the Database Activity Monitoring buyer's guide and the Data Security Posture Management (DSPM) guide.
Key takeaways
- Short answer: DAM is detection, DSPM is discovery. DAM records and alerts on statements executed against known databases; DSPM finds and classifies sensitive data across stores, including ones nobody registered, and reports exposure and excess access.
- DSPM does not see the query that stole the data. Posture scans run on a schedule and look at configuration, content samples and permissions. A valid credential running SELECT * at 03:00 is a runtime event that only an audit or activity stream captures.
- DAM does not see the copy it was never pointed at. A snapshot restored into a test account, a CSV export in object storage or an unmanaged cloud SQL instance sits outside DAM coverage until something tells DAM it exists, which is exactly what DSPM output is for.
- Privileged and service accounts are DAM's strongest case. Tamper resistant capture of DBA and application account activity, with separation from the people being watched, is the control auditors ask for and the one posture tools do not provide.
- Buy in sequence, connect the outputs. Run discovery to size and rank the estate, put runtime monitoring on the crown jewel stores DSPM identifies, and feed DSPM classification into DAM policies so alerts carry sensitivity context.
The short answer
DAM answers "who ran what against this database, and was it normal?" DSPM answers "where is our sensitive data, how exposed is it, and who has access to it?" The first is a continuous record of behaviour; the second is a periodically refreshed map of state. Microsoft describes its own DSPM as answering what data you have, where it is stored, who can access it and how it is protected, which is a good one-line definition of the category. AWS describes Database Activity Streams as a near real-time stream of database activity for monitoring, alerting and compliance, which is the runtime half.
The overlap is real but narrow: some DSPM platforms ingest database audit logs to show data access patterns, and some DAM products include a discovery and classification module. Treat each as a secondary feature. A DSPM tool reading audit logs is only as good as the audit configuration underneath it, and a DAM discovery module usually scans the databases DAM already knows about.
Side-by-side comparison
| Dimension | Database activity monitoring (DAM) | Data security posture management (DSPM) |
|---|---|---|
| Core question | What is happening to this data now? | Where is sensitive data and who could reach it? |
| Primary input | Native audit trails, activity streams, agents or network capture of SQL traffic | Cloud and SaaS APIs, metadata, sampled content, identity and permission graphs |
| Timing | Continuous, near real time | Scheduled or event triggered rescans (for example a 30 day reprofile default in one cloud service) |
| Scope | Registered databases and data warehouses | Object storage, managed databases, warehouses, SaaS and file shares, including unknown copies |
| Main output | Audit records, alerts, session reports, optional blocking | Inventory, classification, exposure findings, access findings, remediation tasks |
| Detects | Bulk reads, unusual query patterns, privilege changes, SQL injection signatures, policy violations by DBAs | Public or cross-account exposure, sensitive data in the wrong place, stale copies, over-permissioned identities |
| Misses | Stores it is not connected to; data once it leaves the database | The individual query or session that misuses legitimate access |
| Privileged user angle | Records DBA and service account actions with separation of duties | Shows which identities hold access, not what they did with it |
| Compliance evidence | Audit trail of access to regulated data, retained and protected | Data inventory, classification records, proof of exposure remediation |
| Typical owner | Database security, SOC | Data security, cloud security, privacy |
Database activity monitoring in depth
Threat model
DAM assumes the attacker, or the careless insider, already has a working connection. The threats are misuse of valid credentials, DBAs reading data they administer but do not need, application accounts used outside the application, privilege escalation through GRANT and role changes, and SQL injection reaching the database through a web tier. MITRE D3FEND names the injection-focused part of this as Database Query String Analysis (D3-DQSA): intercepting query operations through software hooks or network collection and analysing the query strings for signs of attack.
Architecture in words
Modern DAM leans on engine-native auditing and forwards it somewhere the database administrators cannot alter. Three capture patterns exist, often combined:
- Native audit: Oracle unified auditing writes to a single trail in the AUDSYS schema, where the underlying table accepts inserts only and attempts to delete or update it are themselves audited; predefined policies such as ORA_SECURECONFIG and ORA_LOGON_FAILURES are typically on by default. PostgreSQL relies on the pgAudit extension, whose session logging is controlled by pgaudit.log classes (READ, WRITE, FUNCTION, ROLE, DDL, MISC) and whose object logging scopes reads and writes to specific tables through pgaudit.role. Azure SQL auditing writes to a storage account, Log Analytics or Event Hubs at server or database level.
- Managed activity streams: Amazon RDS Database Activity Streams push JSON activity records to a Kinesis data stream encrypted with a customer KMS key; database administrators have no access to the collection, transmission or processing of the stream, and with a locked audit policy they cannot alter the policy or remove audit logs. Google Cloud SQL for PostgreSQL sends pgAudit output to Cloud Logging as Data Access audit logs once the cloudsql.enable_pgaudit flag is set.
- Agents and network capture: host agents or traffic sensors reconstruct sessions where native audit is unavailable or where inline blocking is required. They add deployment and upgrade work.
A collector normalises events, applies policies (sensitive table access, after-hours DBA activity, row counts above a threshold, new client programs), and forwards alerts and evidence to the SIEM. See the Database Audit Log Detection Guide for detection logic on these logs.
Failure modes
- Best-effort capture: pgAudit documents that audit logging is best-effort and not transactional, so entries can be lost on crash or log destination failure, and that superusers cannot be reliably audited. RDS activity streams are asynchronous and favour database performance, emitting an event marking windows where records may have been lost. Azure SQL auditing notes that some events may not be recorded under very high load.
- Volume and cost: pgAudit warns that logging in analytical workloads can exceed data size and that even moderate OLTP logging adds latency. Teams respond by auditing too little.
- Truncation: Azure SQL audit records keep only the first 4,000 characters of the statement field, so long generated queries arrive incomplete.
- Coverage drift: new instances, read replicas and restored snapshots appear without audit policy. RDS activity streams do not support read replicas.
Controls that make it work
Ship logs off the host to a store the DBA team cannot administer; lock or protect audit policy changes and alert on them; use object-level auditing on sensitive tables rather than logging everything; mask literals where the platform supports it (Cloud SQL offers cloudsql.pgaudit_mask_literals on PostgreSQL 14 and later) so the audit trail does not become a second copy of the regulated data; and alert on gaps in the stream as well as on content.
DSPM in depth
Threat model
DSPM assumes data sprawls faster than anyone records it. The threats are sensitive data in a store with weak controls, public or cross-account exposure, shadow copies made for analytics or testing, and identities, human and machine, that hold far more access than they use. The ATT&CK technique most associated with the outcome is T1530 Data from Cloud Storage; DSPM reduces the number of places where that technique pays off.
Architecture in words
DSPM connects agentlessly through cloud and SaaS APIs, enumerates data stores, samples content to classify it, and joins the result with permission and network context. The native cloud services show the pattern clearly (listed alphabetically):
- Amazon Macie: builds an inventory of S3 general purpose buckets, produces policy findings (for example public access or sharing with other accounts) and sensitive data findings, and runs automated sensitive data discovery by sampling representative objects, with deeper targeted discovery jobs on demand.
- Google Cloud Sensitive Data Protection: data profiles at project, table and column level for BigQuery and Cloud SQL and at bucket level for Cloud Storage, each carrying predicted infoTypes plus data risk and sensitivity levels; by default data is reprofiled after 30 days when relevant changes occur, with daily, weekly or monthly schedules available.
- Microsoft Purview DSPM: discovers and classifies sensitive data, shows access patterns and oversharing, and offers guided objectives such as preventing oversharing and exfiltration, with DLP policies and sensitivity labels as remediation actions.
Commercial DSPM platforms add multi-cloud and SaaS coverage and an identity graph. See the DSPM vs DLP guide for how DSPM hands off to enforcement.
Failure modes
- Sampling misses: automated discovery samples rather than reading everything, so small pockets of sensitive data in large stores can be missed until a full job runs.
- Database connectivity: profiling a managed database usually needs connection details or credentials per instance (Cloud SQL profiling requires them), so self-managed and on-premises databases are often the last covered.
- Findings without owners: exposure findings accumulate in a console with no route to the team that owns the store.
- Snapshot in time: a store that was private at the last scan can be opened and drained before the next.
Controls that make it work
Map every store to an owner, push findings into ticketing with service levels by sensitivity, scan with read-only identities that are themselves monitored, and trigger rescans on change events rather than waiting for the schedule. The scanner's own identity is a high value target: see Securing the DSPM platform.
Coverage of cloud data stores
| Store type | DAM approach | DSPM approach |
|---|---|---|
| Managed relational (RDS, Azure SQL, Cloud SQL) | Native audit or activity streams forwarded to a collector | API discovery, connection-based profiling of tables and columns |
| Self-managed database on a VM or on premises | Native audit, agent or network sensor | Often needs a connector or credentials; frequently a coverage gap |
| Cloud data warehouse | Platform query and access history forwarded to SIEM | Classification of schemas and columns, access mapping |
| Object storage | Not a database: use storage data events, not DAM | Core strength: inventory, exposure and content findings |
| Snapshots, backups, exports | Invisible until restored and registered | Discovered as copies; flagged where location or access is wrong |
| SaaS applications | Out of scope | Covered where the platform has a connector |
The pattern is consistent: DSPM is wide and shallow in time, DAM is narrow and deep in time. The Database Security Guide covers the hardening that sits beneath both.
Privileged and service account monitoring
This is where the categories differ most. DSPM tells you that the reporting service account holds SELECT on the customer schema and has not used half its grants in 90 days; that is a least privilege finding (NIST SP 800-53 AC-6). DAM tells you that the same account connected from a laptop through a desktop SQL client and read four million rows; that is an incident.
- DBAs: auditors expect administrator activity to be captured somewhere administrators cannot edit, which maps to NIST SP 800-53 AU-9 Protection of Audit Information. Oracle's AUDIT_ADMIN and AUDIT_VIEWER roles and RDS's locked audit policies exist for this split.
- Application and service accounts: baseline the client program, source network and statement shapes for each account, then alert on deviation. A service account used interactively is one of the highest signal alerts DAM produces.
- Machine credentials from DSPM: use DSPM's access graph to pick which service accounts to baseline first, and feed DAM alerts back to the identity team so stale grants are removed. See the Database Credential and Access Security Guide and the database user access review method.
The Snowflake customer data theft campaign of 2024 shows the runtime gap: attackers logged in with infostealer credentials on accounts without MFA and used ordinary clients and standard SQL to list and copy tables, which looked like normal use. Posture tooling would have shown the data was sensitive; only activity monitoring with alerts on new client tools, unfamiliar networks and large export operations would have caught the session.
Compliance uses
| Requirement | Better served by DAM | Better served by DSPM |
|---|---|---|
| Log access to sensitive data (CIS Control 3.14; NIST SP 800-53 AU-2, AU-12) | Yes: statement level evidence | Partial, if it ingests audit logs |
| Review audit records (AU-6) | Yes: reports and alerts | No |
| Protect audit records from administrators (AU-9) | Yes: off-host, locked policies | No |
| Maintain a data inventory (CIS Control 3.2; CSF 2.0 ID.AM-07) | Limited to registered databases | Yes |
| Classify information (ISO/IEC 27001:2022 A.5.12) | Consumes classification | Yes: produces it |
| Least privilege review (AC-6) | Usage evidence for grants | Entitlement and exposure findings |
| Continuous monitoring (CSF 2.0 DE.CM-03, DE.CM-09; ISO A.8.16) | Yes | Posture drift only |
| Logging (ISO A.8.15; CSF 2.0 PR.PS-04) | Yes | No |
Payment card environments are the classic DAM driver because PCI DSS Requirement 10 expects access to cardholder data to be logged and reviewed. Privacy programmes lean on DSPM because records of processing and data minimisation start with knowing where personal data is.
When to choose which
- Lead with DSPM when: the estate is mostly cloud and SaaS, nobody can produce a current list of stores holding regulated data, a merger or migration has created copies, or the board question is "where is our customer data?"
- Lead with DAM when: a small number of known databases hold the crown jewels, an auditor has asked for privileged user monitoring, regulated data lives in self-managed Oracle, SQL Server or PostgreSQL, or a recent incident involved misuse of valid database credentials.
- Buy both when: you have more than a handful of sensitive databases spread across clouds. Budget DSPM for breadth and DAM for the top tier it identifies.
- Small organisations: start with native features: enable engine auditing (pgAudit, unified auditing, Azure SQL auditing or activity streams) to a protected log store with a few high value alerts, and use the cloud provider's discovery service on the main storage account. Add commercial tools when the alert and inventory work exceeds what one person can manage.
- Large organisations: expect a DSPM platform plus DAM on tier 1 databases, integrated through shared classification and a single case queue in the SOC.
Worked scenarios
Scenario 1, retail analytics sprawl. A retailer runs production PostgreSQL on a managed service and copies nightly extracts into a warehouse and object storage for analysts. DSPM finds three forgotten extract buckets with full customer names, addresses and card data, one shared with a former agency account. Remediation removes the share and deletes two copies. DAM is then placed on the production database and the warehouse, with object-level pgAudit on the customer tables and alerts on bulk COPY operations. Neither tool alone would have closed both the copy problem and the export path.
Scenario 2, regulated on-premises core. A bank's core ledger sits in a self-managed Oracle cluster. The auditor's finding is that DBA activity is not independently recorded. DAM is the answer: pure unified auditing with policies on sensitive tables, records forwarded to a SIEM the DBA team cannot administer, AUDIT_ADMIN held outside the DBA group. DSPM adds little here at first, because the location of the data is already known; it becomes useful later when ledger extracts start appearing in cloud analytics.
How to run them together
- Discover: run DSPM across all accounts and subscriptions in read-only mode; tag each store with owner and sensitivity.
- Rank: pick tier 1 stores by sensitivity, volume and exposure.
- Instrument: enable native audit or activity streams on tier 1 databases in log-only mode; confirm events arrive and measure performance impact on a pilot instance before widening.
- Tune: baseline service accounts and DBA activity for two to four weeks, then turn on alerts; reserve blocking for proven patterns.
- Connect: import DSPM classification into DAM policies so alerts carry the sensitivity of the table touched; send DAM evidence of unused grants back to access reviews.
- Roll back safely: if audit volume threatens availability, narrow to object-level auditing on sensitive tables rather than disabling capture, and record the change.
Detection and measurement
- Tier 1 audit coverage: percentage of DSPM-identified tier 1 databases with active, protected audit capture.
- Unknown store rate: new sensitive stores found by DSPM per month that were not in the CMDB.
- Exposure time to fix: median days from DSPM exposure finding to remediation, by sensitivity.
- Service account baseline coverage: share of privileged and service database accounts with a behavioural baseline and alerting.
- Audit stream health: number of capture gaps or lost-record windows per month, and time to restore.
- Alert precision: share of DAM alerts confirmed as true positives or policy violations.
Common failure patterns
- Treating DSPM as runtime monitoring: the dashboard shows the data is sensitive and private, and nobody notices a valid account exporting it.
- Logging everything, then nothing: full statement logging floods storage and slows the database, so auditing is switched off instead of scoped.
- Audit trail inside the blast radius: logs kept on the database host or in an account the DBAs control, so a privileged attacker edits the evidence.
- Static DAM scope: the monitored list was set at go-live and never refreshed from discovery, so replicas, restores and new clusters run unwatched.
- Sensitive data in the audit log: literal values captured in statements turn the log store into an unclassified copy of regulated data.
- Unmonitored scanner identity: the DSPM connector role reads every store and is not itself watched.
Framework mapping
| Framework | DAM | DSPM |
|---|---|---|
| NIST CSF 2.0 | PR.PS-04, DE.CM-03, DE.CM-09, DE.AE-02 | ID.AM-07, PR.DS-01 |
| NIST SP 800-53 Rev 5 | AU-2, AU-6, AU-9, AU-12, SI-4 | CM-8, PM-5, AC-6, RA-5 |
| CIS Controls v8.1 | Control 8 Audit Log Management; 3.14 Log Sensitive Data Access | 3.2 Establish and Maintain a Data Inventory |
| ISO/IEC 27001:2022 Annex A | A.8.15 Logging, A.8.16 Monitoring activities | A.5.12 Classification of information |
| MITRE ATT&CK and D3FEND | T1213 Data from Information Repositories; D3-DQSA | T1530 Data from Cloud Storage; T1078.004 Cloud Accounts (excess access) |
Practitioner checklist
- Write down which question each tool answers and which team owns its output.
- Run DSPM discovery across every account, subscription and project before choosing DAM scope.
- Enable native auditing on tier 1 databases and ship records off-host to a store the DBAs cannot administer.
- Use object-level auditing on sensitive tables and mask literals where supported.
- Baseline every service account and alert on interactive use, new clients and bulk reads.
- Alert on audit policy changes and on gaps in the audit stream.
- Feed DSPM classification into DAM policies and DAM grant usage back into access reviews.
- Refresh DAM scope from DSPM findings at least monthly.
- Monitor the DSPM connector identity like any other privileged account.
Standards and references
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
- MITRE D3FEND: Database Query String Analysis (D3-DQSA)
- AWS: Monitoring Amazon RDS with Database Activity Streams
- AWS: What is Amazon Macie
- Google Cloud: Sensitive Data Protection data profiles
- Microsoft: Auditing for Azure SQL Database
- Microsoft: Learn about Data Security Posture Management
- Oracle: Introduction to Auditing
Related NHI Mgmt Group resources: Database Activity Monitoring · Data Security Posture Management (DSPM) · DSPM vs DLP · Database Audit Log Detection Guide · Data Security Guide