{"id":17202,"library":"dbgate-serve-premium","title":"DbGate Serve Premium","description":"DbGate Serve Premium is the commercial, web-based server component of the DbGate database administration tool, currently at version 7.1.9. It provides a cross-platform solution for managing a wide array of databases, including MySQL, PostgreSQL, SQL Server, Oracle, MongoDB, Redis, SQLite, CockroachDB, MariaDB, and ClickHouse, with premium support for Amazon Redshift and CosmosDB. This package is distinguished from the community `dbgate-serve` by offering additional commercial features, such as enhanced storage options via `STORAGE_SERVER` environment variables, enabling persistent server-side metadata and connection management. It maintains an active release cadence, frequently publishing updates and bug fixes. Key functionalities include schema comparison, a visual query designer, advanced chart visualizations, and robust batch export/import capabilities. Unlike its desktop application counterpart, `dbgate-serve-premium` runs as a standalone web server, accessible through a browser, facilitating remote database management and collaboration.","status":"active","version":"7.1.9","language":"javascript","source_language":"en","source_url":"https://github.com/dbgate/dbgate","tags":["javascript","sql","dbgate","web"],"install":[{"cmd":"npm install dbgate-serve-premium","lang":"bash","label":"npm"},{"cmd":"yarn add dbgate-serve-premium","lang":"bash","label":"yarn"},{"cmd":"pnpm add dbgate-serve-premium","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for MySQL database connectivity, as indicated by the STORAGE_ENGINE environment variable example. DbGate dynamically loads various database plugins; others would be specific to connected databases.","package":"dbgate-plugin-mysql","optional":true}],"imports":[{"note":"DbGate Serve Premium is a command-line interface (CLI) application designed for server deployment. It does not expose standard JavaScript symbols for direct `import` or `require()` in user code. For programmatic interaction with DbGate functionality, developers should refer to the `dbgate-api` package.","symbol":"DbGateServePremiumCLI","correct":"/* This package is primarily a CLI tool. Its functionality is accessed via the 'dbgate-serve-premium' command, not through direct programmatic imports. */"},{"note":"For executing database queries programmatically within the DbGate ecosystem, use the `dbgate-api` package. This provides a dedicated interface for integrating DbGate's data access capabilities into your JavaScript/TypeScript applications, separate from the `dbgate-serve-premium` CLI.","wrong":"const query = require('dbgate-api').query;","symbol":"query","correct":"import { query } from 'dbgate-api';"},{"note":"To establish and manage database connections programmatically in the DbGate ecosystem, the `dbgate-api` package offers functions like `connect`. This is distinct from the `dbgate-serve-premium` CLI, which manages connections via its web interface.","wrong":"const connect = require('dbgate-api').connect;","symbol":"connect","correct":"import { connect } from 'dbgate-api';"}],"quickstart":{"code":"npm install -g dbgate-serve-premium\n\n# Create a .env file in your working directory for configuration\n# Example .env file for a MySQL connection (premium feature)\n# STORAGE_SERVER=localhost\n# STORAGE_USER=root\n# STORAGE_PASSWORD=mypassword\n# STORAGE_DATABASE=dbname\n# STORAGE_ENGINE=mysql@dbgate-plugin-mysql\n# (Note: STORAGE_xxx variables are specific to the Premium edition and store DbGate's metadata)\n\n# Start the DbGate Premium server\ndbgate-serve-premium\n\n# Then open http://localhost:3000 in your browser to access the web interface.","lang":"bash","description":"Demonstrates global installation and startup of the DbGate Serve Premium web server, including an example for .env file configuration."},"warnings":[{"fix":"Do not attempt to `import` or `require()` 'dbgate-serve-premium' directly. Install and run it globally via `npm install -g dbgate-serve-premium` and `dbgate-serve-premium`. For code integration, use `dbgate-api`.","message":"DbGate Serve Premium is primarily a CLI application and is not designed for direct programmatic import into JavaScript/TypeScript projects. Its functionality is accessed by running the `dbgate-serve-premium` command from the terminal. For programmatic interaction with DbGate's core features (e.g., querying databases, managing connections), use the `dbgate-api` package instead.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Verify any custom integrations or direct API calls that might rely on older DbGate cloud endpoints. For most users, this change should be transparent, but manual configurations might require updates.","message":"As of v7.1.9, the public DbGate cloud infrastructure and endpoints were migrated. This change could potentially affect existing integrations or direct cloud connectivity if hardcoded endpoints were used, though it aims to improve availability and resilience.","severity":"breaking","affected_versions":">=7.1.9"},{"fix":"Download and unpack Oracle Instant Client to a known location. Set the `ORACLE_INSTANT_CLIENT` environment variable to its directory path. Consult DbGate documentation and `node-oracledb` for details on thick vs. thin mode capabilities and required environment variables like `NLS_LANG`.","message":"Oracle database connections using 'thick mode' (Oracle Instant Client) require manual installation and specific environment variable configuration (e.g., `ORACLE_INSTANT_CLIENT`). Without it, certain Oracle features or older Oracle server versions may not be supported (thin mode limitations apply).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Utilize a `.env` file for local development but add it to your `.gitignore`. For production environments, manage environment variables securely through your deployment platform's mechanisms, rather than relying on `.env` files.","message":"Configuration of DbGate Serve Premium is primarily managed through environment variables, typically loaded from `.env` files in the working directory. It is crucial to handle sensitive information (e.g., `STORAGE_PASSWORD`) securely and ensure `.env` files are not committed to version control.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Review any custom function or file names used within DbGate configurations and ensure they comply with standard naming conventions. Upgrade to the latest version to benefit from these crucial security patches and validation improvements.","message":"Version 7.1.9 introduced stricter validation for function and file names, along with fixes for security issues. This means previously accepted, potentially unsafe names or patterns in configurations might now be rejected, leading to unexpected behavior or errors.","severity":"breaking","affected_versions":">=7.1.9"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"This issue was fixed in DbGate Serve Premium v7.1.9. Upgrade to version 7.1.9 or later to resolve UUID parsing problems (#1434, #1431).","cause":"Specific formats of UUIDs were not correctly parsed when interacting with databases, leading to errors in operations involving UUID columns.","error":"Error: SQL error: UUID parsing issues"},{"fix":"This specific bug was resolved in DbGate Serve Premium v7.1.9. Upgrade to this version or newer to fix the `writeQueryHistory` function error (#1432).","cause":"An internal error prevented the `writeQueryHistory` function from executing correctly, often due to an undefined context or missing dependency within the server.","error":"TypeError: Cannot read properties of undefined (reading 'writeQueryHistory')"},{"fix":"This problem was fixed in DbGate Serve Premium v7.1.7. Upgrade to version 7.1.7 or later to resolve export failures when password mode is enabled (#1409).","cause":"Export operations failed to complete successfully when the connected database required a password, indicating an issue with credential handling during the export process.","error":"Error: Export failure when password mode is enabled"},{"fix":"Before running DbGate, ensure the `NLS_LANG` environment variable is set in your system environment (e.g., `export NLS_LANG=AMERICAN_AMERICA.AL32UTF8` on Linux/macOS, or via System Properties on Windows). Consult Oracle Instant Client documentation for the appropriate value for your locale.","cause":"When using Oracle Instant Client (thick mode), the `NLS_LANG` environment variable is required by Oracle to correctly handle character sets, and its absence causes connection errors.","error":"ORA-24960: the Oracle environment variable NLS_LANG is not set"}],"ecosystem":"npm","meta_description":null}