Detecting Product Level

Hi. It’s my first post! I am very excited about CockroachDB! I have spent most of my career as a DBA for another large database vendor. The approach you guys are taking to the database is a breath of fresh air.

Anyway, getting to the point… I am writing a CockroachDB profile for DbVisualizer. I noticed in the SQL Statements section of the Documentation area that some statements are specific to the Enterprise edition. For example, backups and interacting with jobs.

Is there a query I can issue upon connection that will tell me if the node I am connected to has Enterprise features enabled. I would use the result of this query to show/now show functionality in DbVis.


1 Like

Hi bitmechanic,

Unfortunately, we don’t have a crystal-clear way to determine if enterprise features are enabled.

Your best workaround now is to use SHOW BACKUP ''. If enterprise features are enabled, it should return an error message similar to ("pq: unsupported storage scheme: “”’’). However, if enterprise features are disabled, it gives a detailed error message about enterprise licensing (“pq: use of SHOW BACKUP requires an enterprise license. see for details on how to enable enterprise features”.) It will involve string parsing, but this should suffice to get you what you need for now.

I’ve logged an issue ( to track the addition of a clear statement for this purpose.

Hi Matt,

Thank you for the quick response. I read the github issue. Would it be possible to implement a show product (for example) or a value that would be returned in show all?

Just a thought. For the time being I will try to work with parsing the error.

@bitmechanic, @matt, I think there’s an easier way to check whether a cluster has enterprise features enabled, using the SHOW CLUSTER SETTING cluster.organization sql command. See this doc for more details.

@jesse That field indicates if the cluster has an organization set; however, it doesn’t let you know if there is a valid license installed. SHOW CLUSTER SETTING enterprise.license will show you the license key itself, but this will not indicate if the license is valid.

Ah, thanks for the clarification, @matt.

Thanks for all the input. I think I will start with SHOW CLUSTER SETTING enterprise.license. I understand the ramifications.

I do want to mention that SHOW ALL CLUSTER SETTINGS; does not include the enterprise.license name/value pair.