DBeaver AI Patterns for DBeaver, by Infozense

AI for Your DBAs and Analysts. Ready for the Whole Team.

DBeaver's AI is useful the moment it's turned on: it writes, explains and fixes SQL. These are Infozense's recommended patterns, built on DBeaver's documented features, for taking it from one person's laptop to your whole team, with settings your security team can review.

The Patterns Day-One Settings Where to Start

Three questions every pattern answers

Diagram: three questions. The AI sees table names, column names and data types but not rows by default; the model runs in a cloud service or locally; AI-written SELECT runs while data and structure changes ask first, and the database account sets the hard limit. แผนภาพ: สามคำถาม ข้อแรก โดยค่าเริ่มต้น AI เห็นชื่อตาราง ชื่อคอลัมน์ และชนิดข้อมูล แต่ไม่เห็นข้อมูลในแถว ข้อสอง โมเดลทำงานบนบริการ Cloud หรือแบบ Local ข้อสาม SELECT ที่ AI เขียนรันได้ทันที ส่วนคำสั่งที่เปลี่ยนข้อมูลหรือโครงสร้างจะถามก่อน และบัญชีฐานข้อมูลเป็นตัวกำหนดขอบเขตสูงสุด

How it connects

Diagram: analysts, DBAs, AI agents and pipelines reach databases through DBeaver tools and a set of guardrails; AI-enabled tools send prompts and metadata to a cloud AI service or a private model in your network, while dbvr runs reviewed SQL with no AI at run time. AI coding agents also send what they read to their own AI provider. แผนภาพ: นักวิเคราะห์ DBA AI Agent และ Pipeline เข้าถึงฐานข้อมูลผ่านเครื่องมือของ DBeaver และชุด Guardrails เครื่องมือที่มี AI ส่ง Prompt และ Metadata ไปยังบริการ AI แบบ Cloud หรือโมเดลภายในองค์กรบนเครือข่ายของคุณ ส่วน dbvr รัน SQL ที่ตรวจแล้วโดยไม่มี AI ทำงานตอนรันจริง นอกจากนี้ AI Coding Agent ยังส่งข้อมูลที่อ่านได้ไปยังผู้ให้บริการ AI ของตัวเองด้วย

The Patterns

These are Infozense's recommendations, built on documented DBeaver features. Each pattern can stand on its own, and patterns can be combined; expect to run two or three side by side.

Which DBeaver edition does each pattern need? It depends on your team, your databases and the licences you already have. Ask us, and we'll match the patterns to your setup.

Pattern 1

Self-service analytics

For: analysts and business users who need answers without writing SQL

Pattern flow: an analyst asks in CloudBeaver AI Chat, AI writes the query, a person checks the numbers, and the query reaches masked read-only views. ลำดับขั้นของ Pattern: นักวิเคราะห์ถามใน AI Chat ของ CloudBeaver จากนั้น AI เขียน Query คนตรวจตัวเลข และ Query เข้าถึงเฉพาะ View ที่ Mask แล้วแบบ Read-only

Analysts ask questions in AI Chat from a browser, with nothing to install. Behind it:

  • An administrator sets up one company AI profile: the provider, the model and the API key. Users can't switch to a model that hasn't been approved.
  • Connections point at a read-only database account that sees only curated views, with personal data masked.
  • AI data sharing is switched on per connection, so sensitive databases stay out of AI entirely.

What stays human: before a number goes into a decision, someone who reads SQL checks the query behind it.

Pattern 2

Query tuning and troubleshooting

For: developers, junior DBAs and teams working across several database engines

Pattern flow: a DBA uses DBeaver to have AI explain the plan and propose a fix, the DBA approves the change, and production confirms data changes. ลำดับขั้นของ Pattern: DBA ใช้ DBeaver ให้ AI อธิบาย Execution Plan และเสนอวิธีแก้ DBA เป็นผู้อนุมัติการเปลี่ยนแปลง และ Production ถามยืนยันก่อนเปลี่ยนข้อมูล

DBeaver shows you the plan; AI reads it with you. The AI explains execution plans, finds why a query fails and proposes a fix, and describes unfamiliar tables. For this work it mainly needs metadata. Query text and error messages can still contain data values, so the scope stays narrow.

  • The AI scope is limited to the schemas being worked on.
  • Production connections use DBeaver's Production connection type: auto-commit off, and confirmation before INSERT, UPDATE and DELETE statements run and before data edits are saved.
  • Statements that change data or structure stay on "Show confirmation". They are never set to run immediately.

What stays human: the DBA decides whether an index or rewrite goes to production.

For deeper investigations, an AI coding agent can work through DBeaver's connections: see Pattern 6 →
Pattern 3

AI-assisted data migration

For: data engineers moving data between engines

Pattern flow: a data engineer uses DBeaver data transfer, AI suggests column types from schema and sample rows on a dev copy, the engineer reviews the mapping, and the Task Scheduler runs it. ลำดับขั้นของ Pattern: Data Engineer ใช้ Data Transfer ของ DBeaver โดย AI เสนอชนิดคอลัมน์จาก Schema และแถวตัวอย่างบนสำเนา Dev จากนั้น Engineer ตรวจ Mapping และ Task Scheduler เป็นผู้รัน

During a data transfer, AI suggests target data types for each column from the schema and sample data. Because sample rows go to the AI provider:

  • Mapping is designed against a development or masked copy, never live personal data.
  • The reviewed mapping is saved as a DBeaver task, and the production run happens through the Task Scheduler, with no AI involved at run time.

What stays human: an engineer reviews every suggested mapping before the task is saved.

Pattern 4

Private AI for sensitive data

For: banks, insurers, hospitals, government and anyone holding sensitive personal data

Pattern flow: a regulated team uses DBeaver with a private model in its own network (Ollama or an OpenAI-compatible server), AI help stays inside the network, the same review rules apply, and scope is limited on sensitive databases. ลำดับขั้นของ Pattern: ทีมที่อยู่ภายใต้การกำกับดูแลใช้ DBeaver กับโมเดลภายในองค์กรบนเครือข่ายของตัวเอง (Ollama หรือเซิร์ฟเวอร์ที่รองรับ API แบบ OpenAI) ความช่วยเหลือจาก AI อยู่ภายในเครือข่าย ใช้กติกาการตรวจทานเดิม และจำกัดขอบเขตบนฐานข้อมูลที่มีข้อมูลอ่อนไหว

DBeaver connects to a private model running on your own servers, through Ollama or through a service with an OpenAI-compatible API (DBeaver 26.3 and later), so prompts, schema and any sample data stay inside your network.

  • Infozense can size, install and hand over an AI platform on your own hardware, with Thai-capable models, and train your team to run it: On-premise AI
  • Combined with scope limits, AI can be used on databases you would never connect to a cloud AI service.
  • Be clear about the trade-off: smaller self-hosted models can write less reliable SQL than the leading cloud models. We size the model to the work and tell you where it falls short.

What stays human: the same review rules as Patterns 1 and 2. A private model is private, not infallible.

Pattern 5

AI drafts, dbvr runs

For: DBAs and data engineers who automate checks, reports and extracts

AI helps write the SQL in DBeaver. Execution happens somewhere predictable:

Diagram: AI drafts the SQL in DBeaver, a person reviews it in Git, dbvr runs it on a schedule or in CI with no AI, and the exit code decides pass or fail. แผนภาพ: AI ร่าง SQL ใน DBeaver คนตรวจทานใน Git จากนั้น dbvr รันตามตารางเวลาหรือใน CI โดยไม่มี AI และ exit code เป็นตัวตัดสินว่าผ่านหรือไม่ผ่าน

dbvr reads the same connections and projects as DBeaver desktop, so when they share a workspace, nothing is configured twice. dbvr Community is free. Exporting to S3, Google Cloud Storage or Azure, and pulling credentials from a secret manager (a vault such as HashiCorp Vault, AWS Secrets Manager or Azure Key Vault), need commercial dbvr.

What stays human: every script is reviewed before it is committed. No AI runs at execution time.

More on pipeline access: dbvr at Infozense →
Pattern 6

AI agents through DBeaver

For: teams using AI coding agents such as Codex or GitHub Copilot in VS Code

Pattern flow: an AI coding agent uses the DBeaver MCP server, its tools are set to ask for approval, and the connection uses a read-only database account. ลำดับขั้นของ Pattern: AI Coding Agent ใช้ DBeaver MCP server โดยตั้ง Tool ให้ขออนุมัติก่อน และ Connection ใช้บัญชีฐานข้อมูลแบบ Read-only

Already using DBeaver? Adding an AI coding agent on top of it can save time on investigation and exploration, without new connections to manage. DBeaver can run as a local MCP server, so the agent works with your databases through connections you already govern.

Intended uses:

  • Performance investigations: the agent examines slow queries and proposes rewrites or indexes for the DBA to review.
  • Exploring an unfamiliar database: the agent maps tables and relationships while the developer works.
  • Writing and testing SQL alongside application code, in the developer's own editor.
  • MCP is switched on one connection at a time and gives each connection its own endpoint. It accepts connections only from the same machine, and no login is documented, so treat any program on that machine as able to reach an enabled endpoint.
  • We set each DBeaver tool's Allow mode to "Ask" and keep approval switched on in the agent itself.
  • The connection uses a read-only database account. DBeaver doesn't document whether its MCP server respects the connection's read-only setting, so read-only is enforced where it can't be bypassed: in the database.
  • Where the agent's data goes: whatever the agent reads, schema and query results included, is sent to the agent's own AI provider. DBeaver's AI profile and scope settings don't apply to it. Use masked views, and an agent whose AI provider your policy approves.
  • Audit: DBeaver doesn't document a central history for the desktop MCP server (Lite, Enterprise, Ultimate), so rely on the database's own audit log for what the agent ran.

What stays human: approving the agent's tool calls, and reviewing anything it proposes before it reaches production.

Agents running on servers instead of laptops need a different design: see Agent access provisioning →

Direct connection or through DBeaver?

An AI agent can connect to a database directly, through ODBC, a driver or a database MCP server. For one developer with a read-only account on non-sensitive data, that can be enough.

Once credentials, teams or sensitive data are involved, going through DBeaver adds:

Direct connectionThrough DBeaver
PasswordSits in the agent's config or scriptStays in DBeaver's connection store
What runsWhatever the agent's script doesTools set to ask for approval, one connection per endpoint
Many databasesSet up per database, per developerThe connections already set up in DBeaver (shared across a team with CloudBeaver or Team Edition)
Who did whatDatabase logs onlyQuery history per user with CloudBeaver Enterprise or Team Edition; with the desktop MCP server, the database log

Either way, the database account sets the hard limit.

Day-One Settings

The settings we change before anyone starts using AI on a real database.

Out of the box, DBeaver's AI is turned on and runs the read queries it writes without asking. That's a good default for one person, and the first thing to set for a team.

Comparison of the same DBeaver for one person as installed, and for the whole team after a one-time day-one setup. SQL help is the same. After setup there is one approved model (this needs CloudBeaver Enterprise or Team Edition in the web client), a scope agreed per team and enforced by database grants, read-only accounts for AI-written queries, and agent tools set to ask for approval. ตารางเปรียบเทียบ DBeaver ตัวเดียวกัน ระหว่างการใช้งานของผู้ใช้คนเดียวตอนเพิ่งติดตั้ง กับการใช้งานของทั้งทีมหลังการตั้งค่าวันแรกซึ่งทำเพียงครั้งเดียว ความช่วยเหลือด้าน SQL เหมือนกันทั้งสองแบบ หลังตั้งค่าแล้วจะมีโมเดลที่อนุมัติไว้เพียงโมเดลเดียว (ส่วนนี้ต้องใช้ CloudBeaver Enterprise หรือ Team Edition บนเว็บ) ขอบเขตที่ตกลงกันรายทีมและบังคับใช้ด้วยสิทธิ์ในฐานข้อมูล บัญชี Read-only สำหรับ Query ที่ AI เขียน และ Tool ของ AI Agent ที่ตั้งให้ขออนุมัติก่อน
Setting Default What we set
AI-generated SELECTExecute immediately"Show confirmation" for anyone working on shared or production databases (a global preference; DBeaver's docs recommend it)
AI-generated INSERT, UPDATE, DELETEShow confirmationKeep it. Never "Execute immediately"
AI-generated CREATE, ALTER, DROPShow confirmationKeep it
Other AI-generated statementsShow confirmationKeep it
Metadata sent to AIAsked per connectionScope limited to the schemas each team needs (agreed per team; the database grant enforces it)
Sample rows read by AI tools10 rows (max 200)Kept low, or the "Read table sample rows" tool disabled
Production connectionsDevelopment typeProduction type: auto-commit off, confirmation for data changes
Reporting connectionsRead/writeRead-only connection and a read-only database account
MCP accessOffOn only for named connections, with tools set to ask
AI provider and modelDesktop: each user configures their ownCloudBeaver / Team Edition (web): one admin-managed Global profile; users can't change the model
AI on machines where it isn't approvedOnSwitched off by the administrator, so it can't be re-enabled from Preferences (dbeaver.ini locked down)
Log of AI requests (desktop)OffSwitched on for teams that handle regulated data. It's a per-user debug log, not an audit trail
Statement timeout on AI accountsDatabase default (often none)Set on the database account, e.g. 60 seconds, so a heavy AI query can't tie up the database

The rule behind the table: DBeaver's settings reduce mistakes. The database account sets the limit. Every pattern relies on both.

Levers for Your AI Governance Team

These patterns don't replace your AI governance. They give the people responsible for it real controls to hold.

Your governance decision The lever Who holds it
Is AI allowed here at all?AI switched on or off for a whole CloudBeaver server, or switched off on a desktop install so it can't be re-enabled from PreferencesIT / platform administrator
Which AI provider and model are approved?A company AI profile in CloudBeaver: approved provider, model and API key, which users can't changeAI governance owner, through the CloudBeaver administrator
Who may use AI?Team Edition's built-in roles: by default, AI features for administrators, developers and managers, not for editors and viewersTeam Edition administrator
Which data may AI see?AI data sharing switched on per connection, metadata scope limited, and database accounts that only see approved viewsData owner + DBA
What may AI-written SQL do?Confirmation rules for data and structure changes, read-only connections, and database grants as the hard limitDBA
Which connections may agents use?MCP switched on only for named connections, with tools set to ask for approvalPlatform owner
Can we show what happened?CloudBeaver Query Manager: administrators see queries from all users, filterable by user, including queries run through CloudBeaver's own MCP server. DBeaver doesn't document a central history for the desktop MCP server, so rely on the database's audit log thereAudit / risk team

On the desktop, provider choice and most AI settings are set by each user. An administrator can switch AI off for an install, but DBeaver's documented admin controls don't lock it to one approved provider. Organizations that need that level of control run AI through CloudBeaver Enterprise or Team Edition's web client, where these settings live on the server.

What stays in your governance process

Some decisions no tool setting can make for you:

  • Contracts with AI providers: data-processing terms, no training on your data, and PDPA cross-border transfer
  • Data classification: which data classes may go to a cloud model, which only to a private model, which to neither
  • Acceptable use and training for everyone who uses AI on company data
  • Regular review of AI connections, scopes and agent access, because they go stale like any other access
  • Incident response for an AI query or agent that does damage

Infozense helps with both sides: setting the levers in DBeaver, and building the governance process around them.

AI consulting →Non-Human Database Access Audit →

Where to Start

You are Start with Then add
An analytics team waiting on SQL writersSelf-service analyticsPrivate AI, if the data is sensitive
A DBA teamQuery tuningAI drafts, dbvr runs
A data engineering teamAI-assisted migrationAI drafts, dbvr runs
A regulated organizationPrivate AISelf-service analytics
A team already experimenting with agentsNon-human access auditAI agents through DBeaver
Where Infozense Fits

The Settings Are There. We Make Them Fit Your Team.

We supply licences for DBeaver editions and dbvr, and we offer these patterns as AI Safe Deployment: assessment, read-only accounts and masked views, provider and private model setup, connection policies, MCP guardrails, and training in Thai.

If you don't yet know what your existing pipelines and service accounts can reach, start there. Adding AI comes after: Non-Human Database Access Audit.

Further Reading

Book an AI Demo Request a Quote

These patterns are Infozense's reference designs and recommendations; DBeaver Corporation has not reviewed or endorsed them. Available features depend on the DBeaver edition and version; this page reflects DBeaver documentation as of November 2026. Infozense is an authorized DBeaver reseller. DBeaver, CloudBeaver and dbvr are trademarks of DBeaver Corporation. Other product names are trademarks of their respective owners.