[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cockroachdb-configuring-audit-logging":3,"mdc-74l6hb-key":39,"related-repo-cockroachdb-configuring-audit-logging":1176,"related-org-cockroachdb-configuring-audit-logging":1266},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":34,"sourceUrl":37,"mdContent":38},"configuring-audit-logging","configure SQL audit logging","Configures SQL audit logging on CockroachDB clusters to capture security-relevant events including authentication, privilege changes, and sensitive data access. Use when enabling audit logging for compliance, setting up role-based audit policies, or verifying audit configuration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"cockroachdb","CockroachDB","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcockroachdb.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Security","security","tag",{"name":17,"slug":18,"type":15},"Monitoring","monitoring",{"name":20,"slug":21,"type":15},"Audit","audit",{"name":23,"slug":24,"type":15},"Database","database",3,"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fclaude-plugin","2026-07-12T07:56:57.550979",null,2,[31,32,8,33],"claude","cockroach-cloud","developer-tools",{"repoUrl":26,"stars":25,"forks":29,"topics":35,"description":36},[31,32,8,33],"CockroachDB development plugin for Claude","https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fclaude-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Fcockroachdb-security-and-governance\u002Fconfiguring-audit-logging","---\nname: configuring-audit-logging\ndescription: Configures SQL audit logging on CockroachDB clusters to capture security-relevant events including authentication, privilege changes, and sensitive data access. Use when enabling audit logging for compliance, setting up role-based audit policies, or verifying audit configuration.\ncompatibility: Requires admin role for cluster setting changes. Role-based audit logging available on CockroachDB 22.2+.\nmetadata:\n  author: cockroachdb\n  version: \"1.0\"\n---\n\n# Configuring Audit Logging\n\nConfigures SQL audit logging on CockroachDB clusters to capture security-relevant events such as authentication attempts, privilege changes, DDL operations, and sensitive data access. Supports both cluster-wide audit settings and role-based audit policies for targeted logging.\n\n## When to Use This Skill\n\n- Enabling audit logging to meet SOC 2, HIPAA, or PCI DSS compliance requirements\n- Setting up role-based audit policies for specific users or roles\n- Verifying that audit logging is properly configured and capturing events\n- Responding to a security audit finding about missing audit trails\n- Investigating security incidents by reviewing audit log configuration\n\n## Prerequisites\n\n- **SQL access** with admin role (required to modify cluster settings)\n- **CockroachDB version:** 22.2+ for role-based audit logging\n- **Log export** configured for persistent audit trail (CockroachDB Cloud exports logs to your cloud provider)\n- **Storage planning:** Audit logging increases log volume; plan for additional storage\n\n**Check your access:**\n```sql\n-- Verify admin role\nSELECT member FROM [SHOW GRANTS ON ROLE admin] WHERE member = current_user();\n\n-- Check CockroachDB version\nSELECT version();\n```\n\n## Steps\n\n### 1. Check Current Audit Configuration\n\n```sql\n-- User audit logging configuration\nSHOW CLUSTER SETTING sql.log.user_audit;\n\n-- Admin audit logging\nSHOW CLUSTER SETTING sql.log.admin_audit.enabled;\n\n-- All audit-related settings\nSELECT variable, value\nFROM [SHOW ALL CLUSTER SETTINGS]\nWHERE variable LIKE '%audit%'\nORDER BY variable;\n```\n\nSee [SQL queries reference](references\u002Fsql-queries.md) for additional audit-related queries.\n\n### 2. Enable Admin Audit Logging\n\nAdmin audit logging captures all SQL statements executed by users with the admin role.\n\n```sql\n-- Enable admin audit logging\nSET CLUSTER SETTING sql.log.admin_audit.enabled = true;\n```\n\n**What is captured:**\n- All SQL statements executed by admin users\n- DDL operations (CREATE, ALTER, DROP)\n- Grant and revoke operations\n- Cluster setting changes\n\n### 3. Configure Role-Based Audit Logging\n\nRole-based audit logging allows targeted logging for specific roles. This is more efficient than cluster-wide logging.\n\n```sql\n-- Enable audit logging for a specific role\n-- Format: \u003Crole_name> \u003Caudit_mode>\n-- Audit modes: ALL (all statements), READ (reads only), WRITE (writes only), NONE (disable)\nSET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL';\n```\n\n**Multiple roles:**\n```sql\n-- Audit multiple roles (newline-separated)\nSET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL\nsecurity_admin ALL\napp_service_account READ';\n```\n\n**Create purpose-specific audit roles:**\n```sql\n-- Create a role for users accessing sensitive data\nCREATE ROLE sensitive_data_reader;\nGRANT SELECT ON TABLE customers, payments, pii_table TO sensitive_data_reader;\n\n-- Assign users to the audited role\nGRANT sensitive_data_reader TO app_user;\n\n-- Enable audit logging for this role\nSET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL';\n```\n\n### 4. Configure Slow Query Logging (Supplemental)\n\nSlow query logging captures queries exceeding a latency threshold, which can indicate unauthorized scans or data exfiltration attempts.\n\n```sql\n-- Log queries taking longer than 1 second\nSET CLUSTER SETTING sql.log.slow_query.latency_threshold = '1s';\n\n-- Log all queries (high overhead — use only for investigation)\n-- SET CLUSTER SETTING sql.log.slow_query.latency_threshold = '0';\n```\n\n### 5. Verify Audit Logging\n\n```sql\n-- Confirm settings are active\nSHOW CLUSTER SETTING sql.log.user_audit;\nSHOW CLUSTER SETTING sql.log.admin_audit.enabled;\n\n-- Execute a test statement to generate an audit event\nSELECT 1;\n```\n\n**Verify log delivery:**\nOn CockroachDB Cloud, audit logs are exported to your configured log sink (cloud provider logging service). Check your log export destination to verify events are being captured.\n\n```bash\n# On CockroachDB Cloud, check log export configuration\nccloud cluster info \u003Ccluster-name> -o json\n# Look for log_export_config section\n```\n\n## Safety Considerations\n\n**Performance impact:** Audit logging increases CPU and I\u002FO overhead. The impact depends on the audit scope:\n\n| Audit Scope | Performance Impact | Recommendation |\n|-------------|-------------------|----------------|\n| Admin audit only | Minimal | Safe for all environments |\n| Role-based audit (targeted roles) | Low to moderate | Recommended for production |\n| Cluster-wide all-statement logging | High | Use only during investigations |\n| Slow query logging (threshold > 0) | Minimal | Safe for all environments |\n| Slow query logging (threshold = 0) | Very high | Never use in production |\n\n**Storage impact:** Audit logs increase log volume. Plan for:\n- Admin audit: ~1-5% increase in log volume\n- Role-based audit: Proportional to query volume of audited roles\n- All-statement logging: 10x+ increase in log volume\n\n**Recommendations:**\n- Start with admin audit logging (minimal overhead, high value)\n- Add role-based auditing for sensitive data access roles\n- Avoid cluster-wide all-statement logging in production\n- Configure log rotation and retention policies\n\n## Rollback\n\n```sql\n-- Disable user audit logging\nSET CLUSTER SETTING sql.log.user_audit = '';\n\n-- Disable admin audit logging\nSET CLUSTER SETTING sql.log.admin_audit.enabled = false;\n\n-- Reset slow query threshold to default\nRESET CLUSTER SETTING sql.log.slow_query.latency_threshold;\n```\n\n## References\n\n**Skill references:**\n- [SQL queries for audit logging](references\u002Fsql-queries.md)\n\n**Related skills:**\n- [auditing-cloud-cluster-security](..\u002Fauditing-cloud-cluster-security\u002FSKILL.md) — Run a full security posture audit\n- [hardening-user-privileges](..\u002Fhardening-user-privileges\u002FSKILL.md) — Create purpose-specific roles for targeted auditing\n\n**Official CockroachDB Documentation:**\n- [SQL Audit Logging](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fsql-audit-logging.html)\n- [Role-Based Audit Logging](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Frole-based-audit-logging.html)\n- [Cluster Settings](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fcluster-settings.html)\n- [Log Export (CockroachDB Cloud)](https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fcockroachcloud\u002Fexport-logs.html)\n",{"data":40,"body":44},{"name":4,"description":6,"compatibility":41,"metadata":42},"Requires admin role for cluster setting changes. Role-based audit logging available on CockroachDB 22.2+.",{"author":8,"version":43},"1.0",{"type":45,"children":46},"root",[47,55,61,68,98,104,148,156,214,220,227,326,340,346,351,374,382,405,411,416,455,463,502,510,586,592,597,643,649,701,711,789,795,805,926,936,954,962,985,991,1060,1066,1074,1085,1093,1118,1126,1170],{"type":48,"tag":49,"props":50,"children":51},"element","h1",{"id":4},[52],{"type":53,"value":54},"text","Configuring Audit Logging",{"type":48,"tag":56,"props":57,"children":58},"p",{},[59],{"type":53,"value":60},"Configures SQL audit logging on CockroachDB clusters to capture security-relevant events such as authentication attempts, privilege changes, DDL operations, and sensitive data access. Supports both cluster-wide audit settings and role-based audit policies for targeted logging.",{"type":48,"tag":62,"props":63,"children":65},"h2",{"id":64},"when-to-use-this-skill",[66],{"type":53,"value":67},"When to Use This Skill",{"type":48,"tag":69,"props":70,"children":71},"ul",{},[72,78,83,88,93],{"type":48,"tag":73,"props":74,"children":75},"li",{},[76],{"type":53,"value":77},"Enabling audit logging to meet SOC 2, HIPAA, or PCI DSS compliance requirements",{"type":48,"tag":73,"props":79,"children":80},{},[81],{"type":53,"value":82},"Setting up role-based audit policies for specific users or roles",{"type":48,"tag":73,"props":84,"children":85},{},[86],{"type":53,"value":87},"Verifying that audit logging is properly configured and capturing events",{"type":48,"tag":73,"props":89,"children":90},{},[91],{"type":53,"value":92},"Responding to a security audit finding about missing audit trails",{"type":48,"tag":73,"props":94,"children":95},{},[96],{"type":53,"value":97},"Investigating security incidents by reviewing audit log configuration",{"type":48,"tag":62,"props":99,"children":101},{"id":100},"prerequisites",[102],{"type":53,"value":103},"Prerequisites",{"type":48,"tag":69,"props":105,"children":106},{},[107,118,128,138],{"type":48,"tag":73,"props":108,"children":109},{},[110,116],{"type":48,"tag":111,"props":112,"children":113},"strong",{},[114],{"type":53,"value":115},"SQL access",{"type":53,"value":117}," with admin role (required to modify cluster settings)",{"type":48,"tag":73,"props":119,"children":120},{},[121,126],{"type":48,"tag":111,"props":122,"children":123},{},[124],{"type":53,"value":125},"CockroachDB version:",{"type":53,"value":127}," 22.2+ for role-based audit logging",{"type":48,"tag":73,"props":129,"children":130},{},[131,136],{"type":48,"tag":111,"props":132,"children":133},{},[134],{"type":53,"value":135},"Log export",{"type":53,"value":137}," configured for persistent audit trail (CockroachDB Cloud exports logs to your cloud provider)",{"type":48,"tag":73,"props":139,"children":140},{},[141,146],{"type":48,"tag":111,"props":142,"children":143},{},[144],{"type":53,"value":145},"Storage planning:",{"type":53,"value":147}," Audit logging increases log volume; plan for additional storage",{"type":48,"tag":56,"props":149,"children":150},{},[151],{"type":48,"tag":111,"props":152,"children":153},{},[154],{"type":53,"value":155},"Check your access:",{"type":48,"tag":157,"props":158,"children":163},"pre",{"className":159,"code":160,"language":161,"meta":162,"style":162},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","-- Verify admin role\nSELECT member FROM [SHOW GRANTS ON ROLE admin] WHERE member = current_user();\n\n-- Check CockroachDB version\nSELECT version();\n","sql","",[164],{"type":48,"tag":165,"props":166,"children":167},"code",{"__ignoreMap":162},[168,179,187,196,205],{"type":48,"tag":169,"props":170,"children":173},"span",{"class":171,"line":172},"line",1,[174],{"type":48,"tag":169,"props":175,"children":176},{},[177],{"type":53,"value":178},"-- Verify admin role\n",{"type":48,"tag":169,"props":180,"children":181},{"class":171,"line":29},[182],{"type":48,"tag":169,"props":183,"children":184},{},[185],{"type":53,"value":186},"SELECT member FROM [SHOW GRANTS ON ROLE admin] WHERE member = current_user();\n",{"type":48,"tag":169,"props":188,"children":189},{"class":171,"line":25},[190],{"type":48,"tag":169,"props":191,"children":193},{"emptyLinePlaceholder":192},true,[194],{"type":53,"value":195},"\n",{"type":48,"tag":169,"props":197,"children":199},{"class":171,"line":198},4,[200],{"type":48,"tag":169,"props":201,"children":202},{},[203],{"type":53,"value":204},"-- Check CockroachDB version\n",{"type":48,"tag":169,"props":206,"children":208},{"class":171,"line":207},5,[209],{"type":48,"tag":169,"props":210,"children":211},{},[212],{"type":53,"value":213},"SELECT version();\n",{"type":48,"tag":62,"props":215,"children":217},{"id":216},"steps",[218],{"type":53,"value":219},"Steps",{"type":48,"tag":221,"props":222,"children":224},"h3",{"id":223},"_1-check-current-audit-configuration",[225],{"type":53,"value":226},"1. Check Current Audit Configuration",{"type":48,"tag":157,"props":228,"children":230},{"className":159,"code":229,"language":161,"meta":162,"style":162},"-- User audit logging configuration\nSHOW CLUSTER SETTING sql.log.user_audit;\n\n-- Admin audit logging\nSHOW CLUSTER SETTING sql.log.admin_audit.enabled;\n\n-- All audit-related settings\nSELECT variable, value\nFROM [SHOW ALL CLUSTER SETTINGS]\nWHERE variable LIKE '%audit%'\nORDER BY variable;\n",[231],{"type":48,"tag":165,"props":232,"children":233},{"__ignoreMap":162},[234,242,250,257,265,273,281,290,299,308,317],{"type":48,"tag":169,"props":235,"children":236},{"class":171,"line":172},[237],{"type":48,"tag":169,"props":238,"children":239},{},[240],{"type":53,"value":241},"-- User audit logging configuration\n",{"type":48,"tag":169,"props":243,"children":244},{"class":171,"line":29},[245],{"type":48,"tag":169,"props":246,"children":247},{},[248],{"type":53,"value":249},"SHOW CLUSTER SETTING sql.log.user_audit;\n",{"type":48,"tag":169,"props":251,"children":252},{"class":171,"line":25},[253],{"type":48,"tag":169,"props":254,"children":255},{"emptyLinePlaceholder":192},[256],{"type":53,"value":195},{"type":48,"tag":169,"props":258,"children":259},{"class":171,"line":198},[260],{"type":48,"tag":169,"props":261,"children":262},{},[263],{"type":53,"value":264},"-- Admin audit logging\n",{"type":48,"tag":169,"props":266,"children":267},{"class":171,"line":207},[268],{"type":48,"tag":169,"props":269,"children":270},{},[271],{"type":53,"value":272},"SHOW CLUSTER SETTING sql.log.admin_audit.enabled;\n",{"type":48,"tag":169,"props":274,"children":276},{"class":171,"line":275},6,[277],{"type":48,"tag":169,"props":278,"children":279},{"emptyLinePlaceholder":192},[280],{"type":53,"value":195},{"type":48,"tag":169,"props":282,"children":284},{"class":171,"line":283},7,[285],{"type":48,"tag":169,"props":286,"children":287},{},[288],{"type":53,"value":289},"-- All audit-related settings\n",{"type":48,"tag":169,"props":291,"children":293},{"class":171,"line":292},8,[294],{"type":48,"tag":169,"props":295,"children":296},{},[297],{"type":53,"value":298},"SELECT variable, value\n",{"type":48,"tag":169,"props":300,"children":302},{"class":171,"line":301},9,[303],{"type":48,"tag":169,"props":304,"children":305},{},[306],{"type":53,"value":307},"FROM [SHOW ALL CLUSTER SETTINGS]\n",{"type":48,"tag":169,"props":309,"children":311},{"class":171,"line":310},10,[312],{"type":48,"tag":169,"props":313,"children":314},{},[315],{"type":53,"value":316},"WHERE variable LIKE '%audit%'\n",{"type":48,"tag":169,"props":318,"children":320},{"class":171,"line":319},11,[321],{"type":48,"tag":169,"props":322,"children":323},{},[324],{"type":53,"value":325},"ORDER BY variable;\n",{"type":48,"tag":56,"props":327,"children":328},{},[329,331,338],{"type":53,"value":330},"See ",{"type":48,"tag":332,"props":333,"children":335},"a",{"href":334},"references\u002Fsql-queries.md",[336],{"type":53,"value":337},"SQL queries reference",{"type":53,"value":339}," for additional audit-related queries.",{"type":48,"tag":221,"props":341,"children":343},{"id":342},"_2-enable-admin-audit-logging",[344],{"type":53,"value":345},"2. Enable Admin Audit Logging",{"type":48,"tag":56,"props":347,"children":348},{},[349],{"type":53,"value":350},"Admin audit logging captures all SQL statements executed by users with the admin role.",{"type":48,"tag":157,"props":352,"children":354},{"className":159,"code":353,"language":161,"meta":162,"style":162},"-- Enable admin audit logging\nSET CLUSTER SETTING sql.log.admin_audit.enabled = true;\n",[355],{"type":48,"tag":165,"props":356,"children":357},{"__ignoreMap":162},[358,366],{"type":48,"tag":169,"props":359,"children":360},{"class":171,"line":172},[361],{"type":48,"tag":169,"props":362,"children":363},{},[364],{"type":53,"value":365},"-- Enable admin audit logging\n",{"type":48,"tag":169,"props":367,"children":368},{"class":171,"line":29},[369],{"type":48,"tag":169,"props":370,"children":371},{},[372],{"type":53,"value":373},"SET CLUSTER SETTING sql.log.admin_audit.enabled = true;\n",{"type":48,"tag":56,"props":375,"children":376},{},[377],{"type":48,"tag":111,"props":378,"children":379},{},[380],{"type":53,"value":381},"What is captured:",{"type":48,"tag":69,"props":383,"children":384},{},[385,390,395,400],{"type":48,"tag":73,"props":386,"children":387},{},[388],{"type":53,"value":389},"All SQL statements executed by admin users",{"type":48,"tag":73,"props":391,"children":392},{},[393],{"type":53,"value":394},"DDL operations (CREATE, ALTER, DROP)",{"type":48,"tag":73,"props":396,"children":397},{},[398],{"type":53,"value":399},"Grant and revoke operations",{"type":48,"tag":73,"props":401,"children":402},{},[403],{"type":53,"value":404},"Cluster setting changes",{"type":48,"tag":221,"props":406,"children":408},{"id":407},"_3-configure-role-based-audit-logging",[409],{"type":53,"value":410},"3. Configure Role-Based Audit Logging",{"type":48,"tag":56,"props":412,"children":413},{},[414],{"type":53,"value":415},"Role-based audit logging allows targeted logging for specific roles. This is more efficient than cluster-wide logging.",{"type":48,"tag":157,"props":417,"children":419},{"className":159,"code":418,"language":161,"meta":162,"style":162},"-- Enable audit logging for a specific role\n-- Format: \u003Crole_name> \u003Caudit_mode>\n-- Audit modes: ALL (all statements), READ (reads only), WRITE (writes only), NONE (disable)\nSET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL';\n",[420],{"type":48,"tag":165,"props":421,"children":422},{"__ignoreMap":162},[423,431,439,447],{"type":48,"tag":169,"props":424,"children":425},{"class":171,"line":172},[426],{"type":48,"tag":169,"props":427,"children":428},{},[429],{"type":53,"value":430},"-- Enable audit logging for a specific role\n",{"type":48,"tag":169,"props":432,"children":433},{"class":171,"line":29},[434],{"type":48,"tag":169,"props":435,"children":436},{},[437],{"type":53,"value":438},"-- Format: \u003Crole_name> \u003Caudit_mode>\n",{"type":48,"tag":169,"props":440,"children":441},{"class":171,"line":25},[442],{"type":48,"tag":169,"props":443,"children":444},{},[445],{"type":53,"value":446},"-- Audit modes: ALL (all statements), READ (reads only), WRITE (writes only), NONE (disable)\n",{"type":48,"tag":169,"props":448,"children":449},{"class":171,"line":198},[450],{"type":48,"tag":169,"props":451,"children":452},{},[453],{"type":53,"value":454},"SET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL';\n",{"type":48,"tag":56,"props":456,"children":457},{},[458],{"type":48,"tag":111,"props":459,"children":460},{},[461],{"type":53,"value":462},"Multiple roles:",{"type":48,"tag":157,"props":464,"children":466},{"className":159,"code":465,"language":161,"meta":162,"style":162},"-- Audit multiple roles (newline-separated)\nSET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL\nsecurity_admin ALL\napp_service_account READ';\n",[467],{"type":48,"tag":165,"props":468,"children":469},{"__ignoreMap":162},[470,478,486,494],{"type":48,"tag":169,"props":471,"children":472},{"class":171,"line":172},[473],{"type":48,"tag":169,"props":474,"children":475},{},[476],{"type":53,"value":477},"-- Audit multiple roles (newline-separated)\n",{"type":48,"tag":169,"props":479,"children":480},{"class":171,"line":29},[481],{"type":48,"tag":169,"props":482,"children":483},{},[484],{"type":53,"value":485},"SET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL\n",{"type":48,"tag":169,"props":487,"children":488},{"class":171,"line":25},[489],{"type":48,"tag":169,"props":490,"children":491},{},[492],{"type":53,"value":493},"security_admin ALL\n",{"type":48,"tag":169,"props":495,"children":496},{"class":171,"line":198},[497],{"type":48,"tag":169,"props":498,"children":499},{},[500],{"type":53,"value":501},"app_service_account READ';\n",{"type":48,"tag":56,"props":503,"children":504},{},[505],{"type":48,"tag":111,"props":506,"children":507},{},[508],{"type":53,"value":509},"Create purpose-specific audit roles:",{"type":48,"tag":157,"props":511,"children":513},{"className":159,"code":512,"language":161,"meta":162,"style":162},"-- Create a role for users accessing sensitive data\nCREATE ROLE sensitive_data_reader;\nGRANT SELECT ON TABLE customers, payments, pii_table TO sensitive_data_reader;\n\n-- Assign users to the audited role\nGRANT sensitive_data_reader TO app_user;\n\n-- Enable audit logging for this role\nSET CLUSTER SETTING sql.log.user_audit = 'sensitive_data_reader ALL';\n",[514],{"type":48,"tag":165,"props":515,"children":516},{"__ignoreMap":162},[517,525,533,541,548,556,564,571,579],{"type":48,"tag":169,"props":518,"children":519},{"class":171,"line":172},[520],{"type":48,"tag":169,"props":521,"children":522},{},[523],{"type":53,"value":524},"-- Create a role for users accessing sensitive data\n",{"type":48,"tag":169,"props":526,"children":527},{"class":171,"line":29},[528],{"type":48,"tag":169,"props":529,"children":530},{},[531],{"type":53,"value":532},"CREATE ROLE sensitive_data_reader;\n",{"type":48,"tag":169,"props":534,"children":535},{"class":171,"line":25},[536],{"type":48,"tag":169,"props":537,"children":538},{},[539],{"type":53,"value":540},"GRANT SELECT ON TABLE customers, payments, pii_table TO sensitive_data_reader;\n",{"type":48,"tag":169,"props":542,"children":543},{"class":171,"line":198},[544],{"type":48,"tag":169,"props":545,"children":546},{"emptyLinePlaceholder":192},[547],{"type":53,"value":195},{"type":48,"tag":169,"props":549,"children":550},{"class":171,"line":207},[551],{"type":48,"tag":169,"props":552,"children":553},{},[554],{"type":53,"value":555},"-- Assign users to the audited role\n",{"type":48,"tag":169,"props":557,"children":558},{"class":171,"line":275},[559],{"type":48,"tag":169,"props":560,"children":561},{},[562],{"type":53,"value":563},"GRANT sensitive_data_reader TO app_user;\n",{"type":48,"tag":169,"props":565,"children":566},{"class":171,"line":283},[567],{"type":48,"tag":169,"props":568,"children":569},{"emptyLinePlaceholder":192},[570],{"type":53,"value":195},{"type":48,"tag":169,"props":572,"children":573},{"class":171,"line":292},[574],{"type":48,"tag":169,"props":575,"children":576},{},[577],{"type":53,"value":578},"-- Enable audit logging for this role\n",{"type":48,"tag":169,"props":580,"children":581},{"class":171,"line":301},[582],{"type":48,"tag":169,"props":583,"children":584},{},[585],{"type":53,"value":454},{"type":48,"tag":221,"props":587,"children":589},{"id":588},"_4-configure-slow-query-logging-supplemental",[590],{"type":53,"value":591},"4. Configure Slow Query Logging (Supplemental)",{"type":48,"tag":56,"props":593,"children":594},{},[595],{"type":53,"value":596},"Slow query logging captures queries exceeding a latency threshold, which can indicate unauthorized scans or data exfiltration attempts.",{"type":48,"tag":157,"props":598,"children":600},{"className":159,"code":599,"language":161,"meta":162,"style":162},"-- Log queries taking longer than 1 second\nSET CLUSTER SETTING sql.log.slow_query.latency_threshold = '1s';\n\n-- Log all queries (high overhead — use only for investigation)\n-- SET CLUSTER SETTING sql.log.slow_query.latency_threshold = '0';\n",[601],{"type":48,"tag":165,"props":602,"children":603},{"__ignoreMap":162},[604,612,620,627,635],{"type":48,"tag":169,"props":605,"children":606},{"class":171,"line":172},[607],{"type":48,"tag":169,"props":608,"children":609},{},[610],{"type":53,"value":611},"-- Log queries taking longer than 1 second\n",{"type":48,"tag":169,"props":613,"children":614},{"class":171,"line":29},[615],{"type":48,"tag":169,"props":616,"children":617},{},[618],{"type":53,"value":619},"SET CLUSTER SETTING sql.log.slow_query.latency_threshold = '1s';\n",{"type":48,"tag":169,"props":621,"children":622},{"class":171,"line":25},[623],{"type":48,"tag":169,"props":624,"children":625},{"emptyLinePlaceholder":192},[626],{"type":53,"value":195},{"type":48,"tag":169,"props":628,"children":629},{"class":171,"line":198},[630],{"type":48,"tag":169,"props":631,"children":632},{},[633],{"type":53,"value":634},"-- Log all queries (high overhead — use only for investigation)\n",{"type":48,"tag":169,"props":636,"children":637},{"class":171,"line":207},[638],{"type":48,"tag":169,"props":639,"children":640},{},[641],{"type":53,"value":642},"-- SET CLUSTER SETTING sql.log.slow_query.latency_threshold = '0';\n",{"type":48,"tag":221,"props":644,"children":646},{"id":645},"_5-verify-audit-logging",[647],{"type":53,"value":648},"5. Verify Audit Logging",{"type":48,"tag":157,"props":650,"children":652},{"className":159,"code":651,"language":161,"meta":162,"style":162},"-- Confirm settings are active\nSHOW CLUSTER SETTING sql.log.user_audit;\nSHOW CLUSTER SETTING sql.log.admin_audit.enabled;\n\n-- Execute a test statement to generate an audit event\nSELECT 1;\n",[653],{"type":48,"tag":165,"props":654,"children":655},{"__ignoreMap":162},[656,664,671,678,685,693],{"type":48,"tag":169,"props":657,"children":658},{"class":171,"line":172},[659],{"type":48,"tag":169,"props":660,"children":661},{},[662],{"type":53,"value":663},"-- Confirm settings are active\n",{"type":48,"tag":169,"props":665,"children":666},{"class":171,"line":29},[667],{"type":48,"tag":169,"props":668,"children":669},{},[670],{"type":53,"value":249},{"type":48,"tag":169,"props":672,"children":673},{"class":171,"line":25},[674],{"type":48,"tag":169,"props":675,"children":676},{},[677],{"type":53,"value":272},{"type":48,"tag":169,"props":679,"children":680},{"class":171,"line":198},[681],{"type":48,"tag":169,"props":682,"children":683},{"emptyLinePlaceholder":192},[684],{"type":53,"value":195},{"type":48,"tag":169,"props":686,"children":687},{"class":171,"line":207},[688],{"type":48,"tag":169,"props":689,"children":690},{},[691],{"type":53,"value":692},"-- Execute a test statement to generate an audit event\n",{"type":48,"tag":169,"props":694,"children":695},{"class":171,"line":275},[696],{"type":48,"tag":169,"props":697,"children":698},{},[699],{"type":53,"value":700},"SELECT 1;\n",{"type":48,"tag":56,"props":702,"children":703},{},[704,709],{"type":48,"tag":111,"props":705,"children":706},{},[707],{"type":53,"value":708},"Verify log delivery:",{"type":53,"value":710},"\nOn CockroachDB Cloud, audit logs are exported to your configured log sink (cloud provider logging service). Check your log export destination to verify events are being captured.",{"type":48,"tag":157,"props":712,"children":716},{"className":713,"code":714,"language":715,"meta":162,"style":162},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# On CockroachDB Cloud, check log export configuration\nccloud cluster info \u003Ccluster-name> -o json\n# Look for log_export_config section\n","bash",[717],{"type":48,"tag":165,"props":718,"children":719},{"__ignoreMap":162},[720,729,781],{"type":48,"tag":169,"props":721,"children":722},{"class":171,"line":172},[723],{"type":48,"tag":169,"props":724,"children":726},{"style":725},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[727],{"type":53,"value":728},"# On CockroachDB Cloud, check log export configuration\n",{"type":48,"tag":169,"props":730,"children":731},{"class":171,"line":29},[732,738,744,749,755,760,766,771,776],{"type":48,"tag":169,"props":733,"children":735},{"style":734},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[736],{"type":53,"value":737},"ccloud",{"type":48,"tag":169,"props":739,"children":741},{"style":740},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[742],{"type":53,"value":743}," cluster",{"type":48,"tag":169,"props":745,"children":746},{"style":740},[747],{"type":53,"value":748}," info",{"type":48,"tag":169,"props":750,"children":752},{"style":751},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[753],{"type":53,"value":754}," \u003C",{"type":48,"tag":169,"props":756,"children":757},{"style":740},[758],{"type":53,"value":759},"cluster-nam",{"type":48,"tag":169,"props":761,"children":763},{"style":762},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[764],{"type":53,"value":765},"e",{"type":48,"tag":169,"props":767,"children":768},{"style":751},[769],{"type":53,"value":770},">",{"type":48,"tag":169,"props":772,"children":773},{"style":740},[774],{"type":53,"value":775}," -o",{"type":48,"tag":169,"props":777,"children":778},{"style":740},[779],{"type":53,"value":780}," json\n",{"type":48,"tag":169,"props":782,"children":783},{"class":171,"line":25},[784],{"type":48,"tag":169,"props":785,"children":786},{"style":725},[787],{"type":53,"value":788},"# Look for log_export_config section\n",{"type":48,"tag":62,"props":790,"children":792},{"id":791},"safety-considerations",[793],{"type":53,"value":794},"Safety Considerations",{"type":48,"tag":56,"props":796,"children":797},{},[798,803],{"type":48,"tag":111,"props":799,"children":800},{},[801],{"type":53,"value":802},"Performance impact:",{"type":53,"value":804}," Audit logging increases CPU and I\u002FO overhead. The impact depends on the audit scope:",{"type":48,"tag":806,"props":807,"children":808},"table",{},[809,833],{"type":48,"tag":810,"props":811,"children":812},"thead",{},[813],{"type":48,"tag":814,"props":815,"children":816},"tr",{},[817,823,828],{"type":48,"tag":818,"props":819,"children":820},"th",{},[821],{"type":53,"value":822},"Audit Scope",{"type":48,"tag":818,"props":824,"children":825},{},[826],{"type":53,"value":827},"Performance Impact",{"type":48,"tag":818,"props":829,"children":830},{},[831],{"type":53,"value":832},"Recommendation",{"type":48,"tag":834,"props":835,"children":836},"tbody",{},[837,856,874,892,908],{"type":48,"tag":814,"props":838,"children":839},{},[840,846,851],{"type":48,"tag":841,"props":842,"children":843},"td",{},[844],{"type":53,"value":845},"Admin audit only",{"type":48,"tag":841,"props":847,"children":848},{},[849],{"type":53,"value":850},"Minimal",{"type":48,"tag":841,"props":852,"children":853},{},[854],{"type":53,"value":855},"Safe for all environments",{"type":48,"tag":814,"props":857,"children":858},{},[859,864,869],{"type":48,"tag":841,"props":860,"children":861},{},[862],{"type":53,"value":863},"Role-based audit (targeted roles)",{"type":48,"tag":841,"props":865,"children":866},{},[867],{"type":53,"value":868},"Low to moderate",{"type":48,"tag":841,"props":870,"children":871},{},[872],{"type":53,"value":873},"Recommended for production",{"type":48,"tag":814,"props":875,"children":876},{},[877,882,887],{"type":48,"tag":841,"props":878,"children":879},{},[880],{"type":53,"value":881},"Cluster-wide all-statement logging",{"type":48,"tag":841,"props":883,"children":884},{},[885],{"type":53,"value":886},"High",{"type":48,"tag":841,"props":888,"children":889},{},[890],{"type":53,"value":891},"Use only during investigations",{"type":48,"tag":814,"props":893,"children":894},{},[895,900,904],{"type":48,"tag":841,"props":896,"children":897},{},[898],{"type":53,"value":899},"Slow query logging (threshold > 0)",{"type":48,"tag":841,"props":901,"children":902},{},[903],{"type":53,"value":850},{"type":48,"tag":841,"props":905,"children":906},{},[907],{"type":53,"value":855},{"type":48,"tag":814,"props":909,"children":910},{},[911,916,921],{"type":48,"tag":841,"props":912,"children":913},{},[914],{"type":53,"value":915},"Slow query logging (threshold = 0)",{"type":48,"tag":841,"props":917,"children":918},{},[919],{"type":53,"value":920},"Very high",{"type":48,"tag":841,"props":922,"children":923},{},[924],{"type":53,"value":925},"Never use in production",{"type":48,"tag":56,"props":927,"children":928},{},[929,934],{"type":48,"tag":111,"props":930,"children":931},{},[932],{"type":53,"value":933},"Storage impact:",{"type":53,"value":935}," Audit logs increase log volume. Plan for:",{"type":48,"tag":69,"props":937,"children":938},{},[939,944,949],{"type":48,"tag":73,"props":940,"children":941},{},[942],{"type":53,"value":943},"Admin audit: ~1-5% increase in log volume",{"type":48,"tag":73,"props":945,"children":946},{},[947],{"type":53,"value":948},"Role-based audit: Proportional to query volume of audited roles",{"type":48,"tag":73,"props":950,"children":951},{},[952],{"type":53,"value":953},"All-statement logging: 10x+ increase in log volume",{"type":48,"tag":56,"props":955,"children":956},{},[957],{"type":48,"tag":111,"props":958,"children":959},{},[960],{"type":53,"value":961},"Recommendations:",{"type":48,"tag":69,"props":963,"children":964},{},[965,970,975,980],{"type":48,"tag":73,"props":966,"children":967},{},[968],{"type":53,"value":969},"Start with admin audit logging (minimal overhead, high value)",{"type":48,"tag":73,"props":971,"children":972},{},[973],{"type":53,"value":974},"Add role-based auditing for sensitive data access roles",{"type":48,"tag":73,"props":976,"children":977},{},[978],{"type":53,"value":979},"Avoid cluster-wide all-statement logging in production",{"type":48,"tag":73,"props":981,"children":982},{},[983],{"type":53,"value":984},"Configure log rotation and retention policies",{"type":48,"tag":62,"props":986,"children":988},{"id":987},"rollback",[989],{"type":53,"value":990},"Rollback",{"type":48,"tag":157,"props":992,"children":994},{"className":159,"code":993,"language":161,"meta":162,"style":162},"-- Disable user audit logging\nSET CLUSTER SETTING sql.log.user_audit = '';\n\n-- Disable admin audit logging\nSET CLUSTER SETTING sql.log.admin_audit.enabled = false;\n\n-- Reset slow query threshold to default\nRESET CLUSTER SETTING sql.log.slow_query.latency_threshold;\n",[995],{"type":48,"tag":165,"props":996,"children":997},{"__ignoreMap":162},[998,1006,1014,1021,1029,1037,1044,1052],{"type":48,"tag":169,"props":999,"children":1000},{"class":171,"line":172},[1001],{"type":48,"tag":169,"props":1002,"children":1003},{},[1004],{"type":53,"value":1005},"-- Disable user audit logging\n",{"type":48,"tag":169,"props":1007,"children":1008},{"class":171,"line":29},[1009],{"type":48,"tag":169,"props":1010,"children":1011},{},[1012],{"type":53,"value":1013},"SET CLUSTER SETTING sql.log.user_audit = '';\n",{"type":48,"tag":169,"props":1015,"children":1016},{"class":171,"line":25},[1017],{"type":48,"tag":169,"props":1018,"children":1019},{"emptyLinePlaceholder":192},[1020],{"type":53,"value":195},{"type":48,"tag":169,"props":1022,"children":1023},{"class":171,"line":198},[1024],{"type":48,"tag":169,"props":1025,"children":1026},{},[1027],{"type":53,"value":1028},"-- Disable admin audit logging\n",{"type":48,"tag":169,"props":1030,"children":1031},{"class":171,"line":207},[1032],{"type":48,"tag":169,"props":1033,"children":1034},{},[1035],{"type":53,"value":1036},"SET CLUSTER SETTING sql.log.admin_audit.enabled = false;\n",{"type":48,"tag":169,"props":1038,"children":1039},{"class":171,"line":275},[1040],{"type":48,"tag":169,"props":1041,"children":1042},{"emptyLinePlaceholder":192},[1043],{"type":53,"value":195},{"type":48,"tag":169,"props":1045,"children":1046},{"class":171,"line":283},[1047],{"type":48,"tag":169,"props":1048,"children":1049},{},[1050],{"type":53,"value":1051},"-- Reset slow query threshold to default\n",{"type":48,"tag":169,"props":1053,"children":1054},{"class":171,"line":292},[1055],{"type":48,"tag":169,"props":1056,"children":1057},{},[1058],{"type":53,"value":1059},"RESET CLUSTER SETTING sql.log.slow_query.latency_threshold;\n",{"type":48,"tag":62,"props":1061,"children":1063},{"id":1062},"references",[1064],{"type":53,"value":1065},"References",{"type":48,"tag":56,"props":1067,"children":1068},{},[1069],{"type":48,"tag":111,"props":1070,"children":1071},{},[1072],{"type":53,"value":1073},"Skill references:",{"type":48,"tag":69,"props":1075,"children":1076},{},[1077],{"type":48,"tag":73,"props":1078,"children":1079},{},[1080],{"type":48,"tag":332,"props":1081,"children":1082},{"href":334},[1083],{"type":53,"value":1084},"SQL queries for audit logging",{"type":48,"tag":56,"props":1086,"children":1087},{},[1088],{"type":48,"tag":111,"props":1089,"children":1090},{},[1091],{"type":53,"value":1092},"Related skills:",{"type":48,"tag":69,"props":1094,"children":1095},{},[1096,1107],{"type":48,"tag":73,"props":1097,"children":1098},{},[1099,1105],{"type":48,"tag":332,"props":1100,"children":1102},{"href":1101},"..\u002Fauditing-cloud-cluster-security\u002FSKILL.md",[1103],{"type":53,"value":1104},"auditing-cloud-cluster-security",{"type":53,"value":1106}," — Run a full security posture audit",{"type":48,"tag":73,"props":1108,"children":1109},{},[1110,1116],{"type":48,"tag":332,"props":1111,"children":1113},{"href":1112},"..\u002Fhardening-user-privileges\u002FSKILL.md",[1114],{"type":53,"value":1115},"hardening-user-privileges",{"type":53,"value":1117}," — Create purpose-specific roles for targeted auditing",{"type":48,"tag":56,"props":1119,"children":1120},{},[1121],{"type":48,"tag":111,"props":1122,"children":1123},{},[1124],{"type":53,"value":1125},"Official CockroachDB Documentation:",{"type":48,"tag":69,"props":1127,"children":1128},{},[1129,1140,1150,1160],{"type":48,"tag":73,"props":1130,"children":1131},{},[1132],{"type":48,"tag":332,"props":1133,"children":1137},{"href":1134,"rel":1135},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fsql-audit-logging.html",[1136],"nofollow",[1138],{"type":53,"value":1139},"SQL Audit Logging",{"type":48,"tag":73,"props":1141,"children":1142},{},[1143],{"type":48,"tag":332,"props":1144,"children":1147},{"href":1145,"rel":1146},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Frole-based-audit-logging.html",[1136],[1148],{"type":53,"value":1149},"Role-Based Audit Logging",{"type":48,"tag":73,"props":1151,"children":1152},{},[1153],{"type":48,"tag":332,"props":1154,"children":1157},{"href":1155,"rel":1156},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fstable\u002Fcluster-settings.html",[1136],[1158],{"type":53,"value":1159},"Cluster Settings",{"type":48,"tag":73,"props":1161,"children":1162},{},[1163],{"type":48,"tag":332,"props":1164,"children":1167},{"href":1165,"rel":1166},"https:\u002F\u002Fwww.cockroachlabs.com\u002Fdocs\u002Fcockroachcloud\u002Fexport-logs.html",[1136],[1168],{"type":53,"value":1169},"Log Export (CockroachDB Cloud)",{"type":48,"tag":1171,"props":1172,"children":1173},"style",{},[1174],{"type":53,"value":1175},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1177,"total":1265},[1178,1190,1204,1217,1229,1242,1255],{"slug":1179,"name":1179,"fn":1180,"description":1181,"org":1182,"tags":1183,"stars":25,"repoUrl":26,"updatedAt":1189},"analyzing-range-distribution","analyze CockroachDB range distribution and health","Analyzes CockroachDB range distribution across tables and indexes using SHOW RANGES to identify range count, size patterns, leaseholder placement, and replication health. Use when investigating hotspots, uneven data distribution, range fragmentation, or validating zone configuration effects without DB Console access.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1184,1185,1186],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":1187,"slug":1188,"type":15},"Performance","performance","2026-07-12T07:57:18.753533",{"slug":1191,"name":1191,"fn":1192,"description":1193,"org":1194,"tags":1195,"stars":25,"repoUrl":26,"updatedAt":1203},"analyzing-schema-change-storage-risk","analyze schema change storage requirements","Estimates storage requirements for CockroachDB online schema change backfills using SHOW RANGES WITH DETAILS, KEYS, INDEXES. Use before CREATE INDEX, ADD COLUMN with INDEX\u002FUNIQUE, ALTER PRIMARY KEY, CREATE MATERIALIZED VIEW, CREATE TABLE AS, REFRESH, or SET LOCALITY on tables with large per-index footprints, to avoid mid-backfill disk exhaustion.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1196,1199,1200,1201],{"name":1197,"slug":1198,"type":15},"Data Modeling","data-modeling",{"name":23,"slug":24,"type":15},{"name":1187,"slug":1188,"type":15},{"name":1202,"slug":161,"type":15},"SQL","2026-07-12T07:57:22.763788",{"slug":1205,"name":1205,"fn":1206,"description":1207,"org":1208,"tags":1209,"stars":25,"repoUrl":26,"updatedAt":1216},"auditing-cis-benchmark","audit CockroachDB clusters against CIS benchmarks","Audits a self-hosted CockroachDB cluster against the CIS CockroachDB Benchmark v1.0.0 Level 1 controls. Supports two audit depths — quick automated scans and full CIS audit procedures. Produces a structured PASS\u002FFAIL\u002FMANUAL report covering installation, system hardening, logging, user access, data protection, and CockroachDB settings. Use when preparing for CIS compliance assessments, hardening self-hosted deployments, or validating security posture against industry benchmarks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1210,1211,1214,1215],{"name":20,"slug":21,"type":15},{"name":1212,"slug":1213,"type":15},"Compliance","compliance",{"name":23,"slug":24,"type":15},{"name":13,"slug":14,"type":15},"2026-07-18T05:48:00.862384",{"slug":1104,"name":1104,"fn":1218,"description":1219,"org":1220,"tags":1221,"stars":25,"repoUrl":26,"updatedAt":1228},"audit CockroachDB cluster security posture","Audits the security posture of a CockroachDB cluster (Cloud or self-hosted) across network, authentication, authorization, encryption, audit logging, and backup dimensions. Use when assessing cluster security readiness, preparing for compliance reviews, or investigating security configuration gaps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1222,1223,1224,1227],{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":1225,"slug":1226,"type":15},"Operations","operations",{"name":13,"slug":14,"type":15},"2026-07-12T07:57:01.506735",{"slug":1230,"name":1230,"fn":1231,"description":1232,"org":1233,"tags":1234,"stars":25,"repoUrl":26,"updatedAt":1241},"auditing-table-statistics","audit optimizer table statistics","Audits optimizer table statistics for staleness, missing coverage, and data quality issues using SHOW STATISTICS. Use when diagnosing poor query performance, unexpected plan changes, or after bulk data changes to identify stale statistics requiring refresh via CREATE STATISTICS.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1235,1236,1239,1240],{"name":20,"slug":21,"type":15},{"name":1237,"slug":1238,"type":15},"Data Analysis","data-analysis",{"name":23,"slug":24,"type":15},{"name":1187,"slug":1188,"type":15},"2026-07-12T07:57:16.190081",{"slug":1243,"name":1243,"fn":1244,"description":1245,"org":1246,"tags":1247,"stars":25,"repoUrl":26,"updatedAt":1254},"benchmarking-transaction-patterns","benchmark CockroachDB transaction patterns","Guides benchmarking and comparing explicit multi-statement transactions versus single-statement CTE transactions in CockroachDB, with fair test methodology, contention analysis, and performance interpretation. Use when comparing transaction formulations, benchmarking CockroachDB workloads under contention, investigating retry pressure, or deciding whether to rewrite multi-step application flows into single SQL statements.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1248,1249,1252,1253],{"name":23,"slug":24,"type":15},{"name":1250,"slug":1251,"type":15},"Engineering","engineering",{"name":1187,"slug":1188,"type":15},{"name":1202,"slug":161,"type":15},"2026-07-12T07:57:26.543278",{"slug":1256,"name":1256,"fn":1257,"description":1258,"org":1259,"tags":1260,"stars":25,"repoUrl":26,"updatedAt":1264},"cockroachdb-sql","write and optimize CockroachDB SQL","Use when writing, generating, or optimizing SQL for CockroachDB, designing CockroachDB schemas, or when the user asks about CockroachDB-specific SQL patterns, type mappings, and distributed database best practices. Also use when encountering CockroachDB anti-patterns like missing primary keys, sequential ID hotspots, or incorrect type usage.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1261,1262,1263],{"name":23,"slug":24,"type":15},{"name":1187,"slug":1188,"type":15},{"name":1202,"slug":161,"type":15},"2026-07-25T05:31:22.562808",34,{"items":1267,"total":1387},[1268,1285,1299,1314,1325,1335,1346,1352,1359,1366,1373,1380],{"slug":1269,"name":1269,"fn":1270,"description":1271,"org":1272,"tags":1273,"stars":1282,"repoUrl":1283,"updatedAt":1284},"collecting-cockroachdb-operator-escalation-packet","collect CockroachDB operator escalation packets","Collects a complete CockroachDB Operator escalation packet for TSC\u002FTSE or operator-team handoff, including Helm state, Kubernetes resources, logs, operation-specific evidence, pprof goroutine dumps, metrics, and a customer action timeline. Use when general diagnosis cannot resolve an operator-managed CockroachDB Helm issue or before restarting a stuck operator.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1274,1275,1278,1281],{"name":23,"slug":24,"type":15},{"name":1276,"slug":1277,"type":15},"Incident Response","incident-response",{"name":1279,"slug":1280,"type":15},"Kubernetes","kubernetes",{"name":17,"slug":18,"type":15},105,"https:\u002F\u002Fgithub.com\u002Fcockroachdb\u002Fhelm-charts","2026-07-12T07:57:25.288146",{"slug":1286,"name":1286,"fn":1287,"description":1288,"org":1289,"tags":1290,"stars":1282,"repoUrl":1283,"updatedAt":1298},"configuring-cockroachdb-helm-tls","configure TLS for CockroachDB Helm charts","Selects and validates TLS settings for CockroachDB Helm chart deployments, including self-signer, cert-manager, and external certificate modes. Use when a customer needs secure CockroachDB Helm values, certificate secret mapping, cert-manager integration, or TLS install troubleshooting before deploying the chart.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1291,1294,1297],{"name":1292,"slug":1293,"type":15},"Deployment","deployment",{"name":1295,"slug":1296,"type":15},"Encryption","encryption",{"name":13,"slug":14,"type":15},"2026-07-12T07:56:37.675396",{"slug":1300,"name":1300,"fn":1301,"description":1302,"org":1303,"tags":1304,"stars":1282,"repoUrl":1283,"updatedAt":1313},"debugging-cockroachdb-operator-migrations","debug CockroachDB Operator migration scenarios","Debugs CockroachDB Operator migration scenarios, including Helm StatefulSet to v1beta1 CrdbNode migration and public operator v1alpha1 to v1beta1 migration. Use when migration labels, migration phases, source StatefulSet ownership, converted CRDs, PVC ownership, or post-migration reconciliation are unclear or stuck.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1305,1306,1309,1310],{"name":23,"slug":24,"type":15},{"name":1307,"slug":1308,"type":15},"Debugging","debugging",{"name":1279,"slug":1280,"type":15},{"name":1311,"slug":1312,"type":15},"Migration","migration","2026-07-12T07:56:48.360871",{"slug":1315,"name":1315,"fn":1316,"description":1317,"org":1318,"tags":1319,"stars":1282,"repoUrl":1283,"updatedAt":1324},"diagnosing-cockroachdb-helm-deployments","diagnose CockroachDB Helm chart deployments","Diagnoses failed or unhealthy CockroachDB Helm chart deployments by checking Helm release state, operator health, CrdbCluster and CrdbNode status, pod readiness, RBAC, webhooks, TLS, upgrades, scaling, PVCs, DNS, and multi-region assumptions. Use when Helm install or upgrade fails, pods are not Ready, or the operator is not reconciling.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1320,1321,1322,1323],{"name":23,"slug":24,"type":15},{"name":1307,"slug":1308,"type":15},{"name":1292,"slug":1293,"type":15},{"name":1279,"slug":1280,"type":15},"2026-07-12T07:57:24.018818",{"slug":1326,"name":1326,"fn":1327,"description":1328,"org":1329,"tags":1330,"stars":1282,"repoUrl":1283,"updatedAt":1334},"installing-cockroachdb-with-helm","install CockroachDB using Helm","Guides customer-facing installation of CockroachDB on Kubernetes using the CockroachDB split Helm charts and operator-managed v1beta1 resources. Use when installing CockroachDB with Helm, choosing between published and local split charts, verifying a new install, or helping an agent complete first-time Kubernetes onboarding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1331,1332,1333],{"name":23,"slug":24,"type":15},{"name":1292,"slug":1293,"type":15},{"name":1279,"slug":1280,"type":15},"2026-07-12T07:56:45.777567",{"slug":1336,"name":1336,"fn":1337,"description":1338,"org":1339,"tags":1340,"stars":1282,"repoUrl":1283,"updatedAt":1345},"validating-cockroachdb-helm-multiregion","validate CockroachDB multi-region Helm deployments","Validates CockroachDB Helm chart values and Kubernetes prerequisites for operator-managed multi-region deployments. Use before adding a region, deploying CockroachDB across multiple Kubernetes clusters, checking region DNS domains, or confirming that all regions share certificate and networking assumptions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1341,1342,1343,1344],{"name":23,"slug":24,"type":15},{"name":1292,"slug":1293,"type":15},{"name":1279,"slug":1280,"type":15},{"name":1225,"slug":1226,"type":15},"2026-07-12T07:56:47.082609",{"slug":1179,"name":1179,"fn":1180,"description":1181,"org":1347,"tags":1348,"stars":25,"repoUrl":26,"updatedAt":1189},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1349,1350,1351],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":1187,"slug":1188,"type":15},{"slug":1191,"name":1191,"fn":1192,"description":1193,"org":1353,"tags":1354,"stars":25,"repoUrl":26,"updatedAt":1203},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1355,1356,1357,1358],{"name":1197,"slug":1198,"type":15},{"name":23,"slug":24,"type":15},{"name":1187,"slug":1188,"type":15},{"name":1202,"slug":161,"type":15},{"slug":1205,"name":1205,"fn":1206,"description":1207,"org":1360,"tags":1361,"stars":25,"repoUrl":26,"updatedAt":1216},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1362,1363,1364,1365],{"name":20,"slug":21,"type":15},{"name":1212,"slug":1213,"type":15},{"name":23,"slug":24,"type":15},{"name":13,"slug":14,"type":15},{"slug":1104,"name":1104,"fn":1218,"description":1219,"org":1367,"tags":1368,"stars":25,"repoUrl":26,"updatedAt":1228},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1369,1370,1371,1372],{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":1225,"slug":1226,"type":15},{"name":13,"slug":14,"type":15},{"slug":1230,"name":1230,"fn":1231,"description":1232,"org":1374,"tags":1375,"stars":25,"repoUrl":26,"updatedAt":1241},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1376,1377,1378,1379],{"name":20,"slug":21,"type":15},{"name":1237,"slug":1238,"type":15},{"name":23,"slug":24,"type":15},{"name":1187,"slug":1188,"type":15},{"slug":1243,"name":1243,"fn":1244,"description":1245,"org":1381,"tags":1382,"stars":25,"repoUrl":26,"updatedAt":1254},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1383,1384,1385,1386],{"name":23,"slug":24,"type":15},{"name":1250,"slug":1251,"type":15},{"name":1187,"slug":1188,"type":15},{"name":1202,"slug":161,"type":15},40]