Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1011 Bytes

sql-audit-logging.md

File metadata and controls

24 lines (18 loc) · 1011 Bytes
title summary toc redirect_from
SQL Audit Logging
Learn about the SQL Audit Logging feature for CockroachCloud clusters.
true
../stable/cockroachcloud-sql-audit-logging.html

SQL audit logging gives you detailed information about queries being executed against your system. This feature is especially useful when you want to log all queries that are run against a table containing personally identifiable information (PII).

To enable the feature, enable auditing for a table and then contact us to request the audit logs.

Enable auditing

Use the EXPERIMENTAL_AUDIT subcommand of ALTER TABLE:

{% include copy-clipboard.html %}

> ALTER TABLE customers EXPERIMENTAL_AUDIT SET READ WRITE;

{{site.data.alerts.callout_info}} To turn on auditing for more than one table, issue a separate ALTER statement for each table. {{site.data.alerts.end}}