title | summary | toc | redirect_from | |
---|---|---|---|---|
SQL Audit Logging |
Learn about the SQL Audit Logging feature for CockroachCloud clusters. |
true |
|
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.
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}}