Dbeaver

From G1Joshi/Agent-Skills · View interactive version

Dbeaver is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert DBeaver open-source multi-platform database tool assistance covering SQL editing, ER diagrams, data transfer, and driver management. Use when administering SQL, NoSQL, and embedded databases.

How to use this skill

Skill file

DBeaver

DBeaver is a universal, open-source database tool supporting relational, document, key-value, and analytical databases with an intuitive SQL editor and data browser.

When to Use

Quick Start

-- DBeaver supports executing SQL queries and parameterized templates:
SELECT
    table_schema,
    table_name,
    pg_size_pretty(pg_total_relation_size(quote_ident(table_name))) as total_size
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY pg_total_relation_size(quote_ident(table_name)) DESC;

Core Concepts

Configuring JDBC Connection with SSL & SSH Tunnel

Setting up encrypted database connectivity:

Driver: PostgreSQL
Host: db-internal.cluster.local
Port: 5432
Database: production_analytics
Authentication: Database Native (Username / Password)
Network -> SSH Tunnel:
  Host: bastion.cloud.internal:22
  User: ec2-user
  Private Key: ~/.ssh/bastion_key.pem
SSL Settings:
  Mode: verify-full
  Root Certificate: /etc/ssl/certs/rds-combined-ca-bundle.pem

Generating Visual Entity-Relationship Diagrams (ERD)

Visualizing database schema topology:

  1. Expand Database Navigator -> Right-click Schema (e.g. public).
  2. Select View Diagram.
  3. DBeaver renders entity boxes with columns, data types, and foreign key connector arrows.
  4. Export diagram to SVG or PNG for architecture documentation.

Exporting Datasets with Custom Formatters

Exporting query results to SQL Inserts or JSON:

SELECT
    user_id,
    email,
    created_at
FROM users
WHERE is_active = true;

Common Patterns

Mock Data Generation

Problem: Populate development database with realistic test datasets.

Solution: Configure DBeaver Mock Data Generator.

-- DBeaver mock data generation script
INSERT INTO customers (id, first_name, last_name, email, created_at)
SELECT
  gen_random_uuid(),
  'User_' || substr(md5(random()::text), 1, 6),
  'Test',
  'user_' || generate_series(1, 100) || '@example.com',
  NOW() - (random() * interval '30 days');

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| :----------------------------------------------------- | :------------------------------------------------------------------ | :---------------------------------------------------------------------------- |

| Java heap space / OutOfMemoryError in DBeaver | Query fetching millions of rows into GUI memory buffer. | Enable "Use fetch size" (default 200) in SQL Editor settings. |

| Cannot connect to database: Access Denied | Driver credentials or network security group restricting client IP. | Check IP allowlist in cloud database and test connection. |

| Driver download failed: maven repository unreachable | Network proxy blocking access to Maven Central. | Configure HTTP proxy in DBeaver Window > Preferences > Connections > Network. |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.