Skip to content

Databases

CockroachDB Database Management in VS Code

DBCode is a CockroachDB extension for VS Code: connect to a local cluster or CockroachDB Cloud, browse schemas and data, write SQL with schema-aware autocomplete, and edit rows visually without leaving your editor. Install DBCode to get started, or see how it compares to standalone database tools.

CockroachDB is a cloud-native, open-source, distributed SQL database that provides a scalable and fault-tolerant solution for managing and querying large volumes of structured data. With CockroachDB, you can build and run applications that require high availability, high performance, and scalability.

To connect to CockroachDB, follow these general steps:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Complete new connection form: Choose CockroachDB as the type, and enter the required information.
  4. Connect: Click save to connect to your CockroachDB database.
  5. Start Managing Your Databases: Once connected, you can start managing your databases directly from Visual Studio Code.

For detailed instructions on connecting to CockroachDB, refer to the Connect article.

DBCode exposes Integrated (Kerberos) for CockroachDB Enterprise connections. CockroachDB Enterprise is required, and the cluster must be configured to accept GSSAPI authentication.

  • Select Integrated (Kerberos) and enter the CockroachDB username that the Kerberos identity maps to.
  • On Windows, DBCode uses the current signed-in identity. On macOS and Linux, it uses an existing Kerberos ticket cache.
  • Integrated authentication requires a host/TCP connection. DBCode does not accept or manage keytabs.
  • The default Kerberos Service Name is postgres. Change it only when the cluster administrator registered another service name.

By using CockroachDB with DBCode, you can connect to your CockroachDB databases, query and manage your data, and visualize your results, all directly from Visual Studio Code.

For more information about CockroachDB, check out CockroachDB.