# SQL Audit Logging

SQL audit logging gives you detailed information about queries being executed against a table in your cluster. This feature is especially useful when you want to log all queries that are run against a table that contains cardholder data, private health information (PHI), or other personally-identifiable information (PII).

After you enable SQL audit logging for a table, audit logs are sent to the `SENSITIVE_ACCESS` logging channel. You can export these logs if your deployment uses CockroachDB Standard or Advanced. For details, refer to Export Logs From a CockroachDB Standard Cluster or Export Logs From a CockroachDB Advanced Cluster.

## Enable auditing

Use the `ALTER TABLE ... EXPERIMENTAL_AUDIT` statement:

    > ALTER TABLE {table_name} EXPERIMENTAL_AUDIT SET READ WRITE;

Replace `{table_name}` with the name of a table.