DBVisor is a VS Code extension for connecting to databases, browsing the contents of tables, running SQL and editing data, all inside VS Code. This guide is for people using DBVisor for the first time. It takes you step by step from setup through everyday tasks to what to do when something goes wrong.
- This guide covers DBVisor 0.13.1 (2026-11-20).
- Detailed settings and differences between databases are described in the feature documents (Managing connections, Running queries, Editing table data). The sections of this guide also link to them.
#Contents
- 1. Introduction
- 2. Installing and updating
- 3. The screen layout
- 4. Getting started
- 5. Connections
- 5.1 Adding, editing, duplicating and deleting connections
- 5.2 Where connections are saved and sharing with your team
- 5.3 Passwords
- 5.4 SSL and SSH tunnels
- 5.5 Environments and read-only connections
- 5.6 Connecting and disconnecting
- 5.7 Filling in the form from a connection string
- 5.8 Opening a SQLite database file
- 6. Working with objects in the connection tree
- 6.1 Reading the tree
- 6.2 Buttons and context menus
- 6.3 Showing DDL, copying names and counting rows
- 6.4 Creating databases, schemas and tables
- 6.5 The table designer
- 6.6 Dropping and renaming
- 6.7 Generating SQL templates
- 6.8 Finding objects by name
- 6.9 Working with several items at once and dragging
- 6.10 Selecting the table of a data tab in the tree and remembering expanded items
- 7. Running SQL
- 8. Viewing and using results
- 9. Editing data
- 10. Handy features
- 11. Safeguards against mistakes
- 12. Settings
- 13. Keyboard shortcuts
- 14. Troubleshooting
- 14.1 Cannot connect
- 14.2 Connections or objects do not appear
- 14.3 Cannot edit results
- 14.4 Cannot sort or filter
- 14.5 Completion suggestions do not appear
- 14.6 Files and text encoding
- 14.7 Transactions
- 14.8 AI agents cannot connect or do not work
- 14.9 "Run SQL" or definitions do not appear for SQL in source code
- 14.10 If the problem persists
- 15. FAQ
- 16. Glossary
- Appendix A. Moving from A5:SQL Mk-2
- Appendix B. Related documents
#1. Introduction
#1.1 What you can do with DBVisor
| Task | Main operations | Details |
|---|---|---|
| Manage connections | Add and edit connections, fill in the form from a connection string, SQLite files, SSL, SSH tunnels, share connections with your team | 5. Connections |
| Browse the contents of a database | View schemas, tables, columns, indexes and more in the connection tree, find tables by name, show DDL, generate SQL templates, insert names into the editor | 6. Working with objects in the connection tree |
| Create, change and drop tables | The table designer, dropping and renaming from the connection tree | 6. Working with objects in the connection tree |
| Run SQL | Data tabs, .sql files, parameters, transactions, execution plans, running and exporting to Excel (test evidence) |
7. Running SQL |
| View and use results | Sort, filter, copy, export to files (CSV, Excel, INSERT statements and more), compare results, copy rows as SQL statements | 8. Viewing and using results |
| Edit data | Add, change and delete rows in the result table, paste rows, check the SQL before applying, virtual keys for tables without a primary key | 9. Editing data |
| Use handy features | Query history, saved queries, ER diagrams, table definition documents, CSV import, test data, dumps | 10. Handy features |
| Work with AI agents | Let the chat in VS Code, Claude Code and Codex look up tables and run read-only SQL with your connections | 10.9 Connect AI Agents |
| Work with SQL in application source code | Run SQL in Java, C#, TypeScript, Python and other code, copy and paste SQL as code, hover over table and column names to see their definitions | 10.10 Working with SQL in source code |
| Prevent mistakes | Color coding and confirmations for production connections, read-only connections | 11. Safeguards against mistakes |
#1.2 Requirements
| Item | Details |
|---|---|
| VS Code | 1.134 or later (Windows, macOS, Linux) |
| Databases | PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.11 or later, SQL Server 2019 or later, Oracle 19c or later, SQLite (DBVisor uses the SQLite built into VS Code) |
| Authentication | User name and password (SQL Server authentication for SQL Server). Windows authentication, Microsoft Entra ID, Kerberos and similar methods are not supported |
| Other | No database client software (such as Oracle Client) is needed. Only creating dumps requires commands such as pg_dump (10.7 Dumps) |
#1.3 How to read this guide
- Names of screen items and buttons are written in quotation marks, such as "Apply". Keys, commands and SQL are written like
Ctrl+Enter. - Keys are shown as on Windows and Linux. On macOS, read
CtrlasCmdandAltasOption. - The screenshots show VS Code with its display language set to English (2.4 Display language).
- If you are new to DBVisor, read 3. The screen layout and 4. Getting started to learn the basics. If you run into trouble, see 14. Troubleshooting.
#2. Installing and updating
#2.1 Installing
DBVisor is distributed as a VSIX file (dbvisor-<version>.vsix).
- Open the Extensions view in VS Code (
Ctrl+Shift+X). - From the "..." menu at the top of the view, choose "Install from VSIX..." and select the VSIX file you received.
You can also install it from the command line by running code --install-extension dbvisor-<version>.vsix. Once it is installed, the DBVisor icon appears in the Activity Bar (the row of icons on the left edge of VS Code).
#2.2 Updating to a new version
Install the VSIX file of the new version the same way. Your saved connections, passwords, query history and settings are kept. If VS Code asks you to reload, reload it. The changes in each version are listed in CHANGELOG.md.
#2.3 Uninstalling
In the Extensions view, choose "Uninstall" from the gear menu of DBVisor. Connections and queries saved in the workspace (.vscode/dbvisor.json) remain as files.
#2.4 Display language
The text on DBVisor's screens follows the display language of VS Code (Japanese or English). To switch languages, run "Configure Display Language" from the Command Palette (Ctrl+Shift+P), choose a language and restart VS Code. Table definition documents are also written with headings in the display language.
#3. The screen layout
#3.1 Overview

| Letter | Name | Description |
|---|---|---|
| A | DBVisor icon | In the Activity Bar. Select it to show the "Connections" and "Query History" views in the Side Bar |
| B | Connections view | Shows your saved connections and the contents of their databases (the connection tree) (3.2 Connections view) |
| C | Query History view | A record of the statements you ran (3.3 Query History view) |
| D | Data tab | A tab where you write SQL at the top (the SQL pane) and see the results below (3.4 Data tabs) |
| E | Result table | Shows the results of a query. If the conditions are met, you can edit them right there (3.5 Result table) |
| F | Status Bar | Shows the connection of a .sql file and the state of the transaction (3.6 Status Bar) |
#3.2 Connections view

- Lists your saved connections. Expand a connection to connect to it, and browse its databases, schemas, tables, columns and more.
- A connection's icon shows the type of database (the PostgreSQL elephant, the MySQL dolphin, the MariaDB sea lion, SQL Server, Oracle, and a generic icon for SQLite) in the color of its environment (the database's own color for development, yellow for staging, red for production). While the connection is connected, a green dot appears at the lower right of the icon.
- Items that group objects, such as "Databases", "Schemas", "Tables" and "Columns", have a folder icon.
- Hover over an item to show buttons for its main operations on the right. Right-click it to choose from all the operations for that item (6.2 Buttons and context menus).
Ctrl/Shift+ click selects several items (6.9 Working with several items at once and dragging).- At the top of the view are the "Add Connection" (+), "Find Object" (magnifying glass; 6.8 Finding objects by name) and "Refresh" buttons. "Refresh" reloads the whole tree. The "..." menu has "Add Connection from Connection String...", "Open SQLite Database File...", "Try the Sample Database" and "Getting Started".
- When there are no connections yet, the view shows the "Add Connection" and "Try the Sample Database" buttons, and links to "add a connection from a connection string", "open a SQLite database file" and the "four-step tour".
#3.3 Query History view
Shows the statements you ran from data tabs and .sql files, grouped by date with the newest first. Successful statements have a green icon, and errors a red one. Select an item to open a data tab with its SQL (the SQL is not run). At the top of the view are the "Search Query History" and "Clear Query History" buttons (10.1 Query history). When you have not run anything yet, the view shows a "New Query" button (it opens a query with the connection of the item selected in the connection tree; if nothing is selected, you choose a connection).
#3.4 Data tabs
A data tab opens when you choose "Open Data" or "New Query" in the connection tree. Write SQL in the SQL pane at the top, and the results appear below it. Drag the border between them to change their sizes.
When the SQL pane is empty, it shows in faint text how to write and run SQL. Before you run anything, the results area shows the main keys (run, run all, show suggestions, format) and a "Find Object..." link. If you do not know the name of a table, you can find it from this link (6.8 Finding objects by name).

| Toolbar button or display | What it does |
|---|---|
| Run (green ▷) | Runs the statement at the cursor (or the selection, if there is one) (Ctrl+Enter) |
| Run All (green ▷▷) | Runs all the statements in the SQL pane (Ctrl+Shift+Enter) |
| Run and Export to Excel | Runs all the statements (or the statements in the selection, if there is one) and writes the results to an Excel file (7.9 Running and exporting to Excel) |
| Cancel | Shown only while a statement is running |
| Auto-commit / Manual commit | Select to switch between them (7.7 Transactions) |
| Commit, Roll Back | Shown only in manual commit while a transaction is in progress |
| Execution Plan | Shows the execution plan of the statement at the cursor (7.8 Execution plans) |
| Save Query | Saves the SQL with a name (10.2 Saved queries) |
| Format SQL | Formats the SQL so that it is easier to read (Shift+Alt+F) |
| Connection at the right end | Shows a dot in the environment color, the type of database, and the connection name and database (red for production, yellow for staging) |
The tab icon is the shape of the database type (the PostgreSQL, MySQL or MariaDB logo, or a cylinder for the others) drawn in the environment color (the database's own color for development, yellow for staging, red for production). The tabs of the results panel, the table designer, ER diagrams, CSV import and test data generation use the same icons.
#3.5 Result table
| Location | Contents |
|---|---|
| Toolbar at the top (left) | Editing: add row, delete row, set NULL, discard changes (only for results you can edit) |
| Toolbar at the top (middle) | Display and output: record view, find in results, switch what the column headers show, compare, export |
| Toolbar at the top (right of center) | The WHERE box, chips for sorting and filtering (small labels that show the current conditions; remove one with ×), and "Apply to SQL" |
| Toolbar at the top (right end) | The table being edited, the number of changes, and "Apply" |
| Below the table | The number of rows loaded, the loading status, and errors. When you select several cells, their count, the sum of the numbers and more appear on the right (8.8 Summarizing selected cells). Hover over "?" at the lower right to see hints for keyboard operations |
When you run several statements, switch between their results with a tab for each statement. Each tab shows the number of rows and the time taken. The buttons are shown as icons; hover over one to see its name.
#3.6 Status Bar
While a .sql file is open, the following items appear (see the bottom edge of the picture in 7.2 Running SQL in a .sql file).
| Item | When it appears | When you select it |
|---|---|---|
| Connection name ("Select Connection") | While a .sql file is open. The background is red for production connections and yellow for staging connections |
Choose the connection to run statements with |
| Auto-commit / Manual Commit | While a .sql file with a connection is open |
Switches between them |
| In Transaction | When a transaction has started in manual commit | Choose to commit or roll back |
| Running (seconds) | While statements are running from a .sql file |
Cancels the run |
| Compare: N rows | When you have set the base of a result comparison | Clears the base |
| A robot icon and "DBVisor" | While AI agents are connected (it appears even when no .sql file is open). Hover over it to see the names of the connected agents |
Opens the Connect AI Agents page (10.9 Connect AI Agents) |
#3.7 Other screens
| Screen | How to open it | Details |
|---|---|---|
| Connection form | "Add Connection", "Edit Connection" | 5.1 Adding, editing, duplicating and deleting connections |
| Table designer | "Create Table", "Edit Table Structure..." | 6.5 The table designer |
| Results panel | Run statements from a .sql file |
7.2 Running SQL in a .sql file |
| Execution plan | "Execution Plan" | 7.8 Execution plans |
| Result comparison | "Compare" in the result table, twice | 8.6 Comparing results |
| ER diagram | "Show ER Diagram" | 10.3 ER diagrams |
| CSV import | "Import CSV..." | 10.5 CSV import |
| Test data generation | "Generate Test Data..." | 10.6 Generating test data |
| Session manager | "Show Sessions" in the context menu of a connection | 10.8 Session manager |
| Connect AI Agents page | The command "DBVisor: Connect AI Agents...", or the "..." menu of the Connections view | 10.9 Connect AI Agents |
#4. Getting started
This chapter walks you through the basics in order: add a connection, look at data, run SQL, and edit and save data.
You can also go through four steps in "Get Started with DBVisor" on the VS Code Welcome page (the command "DBVisor: Getting Started"): connect to a database, look at the data of a table, write and run SQL, and let AI agents use your database. Steps you have completed get a check mark (steps you completed before opening the walkthrough are checked when you open it with "DBVisor: Getting Started"; when you open it from the VS Code Welcome page, they may not be checked).
#4.0 Trying the sample database
Even without a database at hand, you can try DBVisor right away with the sample database.
Choose "Try the Sample Database" in the Connections view (if you already have connections, choose it from the "..." menu at the top of the view).

DBVisor creates a SQLite sample database on this computer, adds the connection "Sample (SQLite)" and opens the data of the customers (
customers).
| Table | Contents |
|---|---|
categories |
Product categories (5 rows) |
customers |
Customers (200 rows). When a row is changed, updated_at is set to the current date and time (a trigger) |
products |
Products (40 rows) |
orders |
Orders (1,000 rows) |
order_items |
Order details (about 2,000 rows; the primary key is the order and the line number) |
order_totals (view) |
The customer name and the total of each order |
- The data follows the display language (Japanese names and yen for Japanese; English names and dollars for other languages).
- You can try editing cells, SQL, Find Object, ER diagrams, table definition documents and more without a server or a network. The data stays on this computer only (in the storage that VS Code provides for extensions).
- If you choose it again, the existing sample database opens without being re-created. To get the original data back, delete the connection "Sample (SQLite)" and then choose it again.
#4.1 Adding a connection
Select the DBVisor icon in the Activity Bar.
Select "+" (Add Connection) at the top of the "Connections" view. The screen for adding a connection opens.
Choose the database: Select the card for the type of database (PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite) and choose "Next" (double-clicking the card also goes to the next step). If you have a connection string or URL, select the "Paste a connection string" card (5.7 Filling in the form from a connection string).
Connection and name: Enter the following items. You can change the other items later.
Item Example Host / Port localhost/ empty (the default port)Database app(the service name for Oracle)User / Password The user and password to connect with Connection name If you leave it empty, a name such as "app (localhost)" is used Environment The Development / Staging / Production cards (production is shown in red, and DBVisor asks you before statements that change data) Save to "Only me" or "Share with the team" (5.2 Where connections are saved and sharing with your team) Choose "Test Connection". If "Connected successfully. Server version: …" appears, the connection works. If DBVisor cannot connect, it shows what happened and what to check.
Choose "Save and Open". The connection appears in the Connections view, DBVisor connects to it, and the default schema (such as
public) opens. You can start your next task from "New Query" or "Find Object" in the notification at the lower right.
To set up SSL, an SSH tunnel, a folder, the connection timeout and more, open "More Settings" at the bottom of the screen. For SQLite, you choose a database file instead of entering a host and so on (5.8 Opening a SQLite database file).


#4.2 Viewing the contents of a table
- In the Connections view, expand "Dev DB" (this connects to it).
- Expand "Databases" → the database name → "Schemas" → the schema name → "Tables" (for MySQL and MariaDB, "Databases" → the database name → "Tables"; for Oracle, "Schemas" → the schema name → "Tables").
- Hover over a table and choose "Open Data" (the table icon) that appears on the right.
A data tab opens and shows the rows of the table in primary key order. When you scroll down, more rows are loaded.
#4.3 Writing and running SQL
Choose "New Query" among the buttons to the right of the connection. An empty data tab opens (when the query history is empty, you can also open one with the "New Query" button in the Query History view).
Write SQL in the SQL pane. Table and column names are suggested as you type (
Ctrl+Spacealso shows the suggestions).SELECT id, name, email FROM public.users WHERE id < 100;Press
Ctrl+Enter. The statement at the cursor runs, and the result appears below.
If you misspell a name and get an error, similar names appear under "Did you mean" in the error area. Select one to replace the name in the SQL, then press Ctrl+Enter again (8.1 Reading results).
If you write several statements and press Ctrl+Shift+Enter, all the statements run in order, and the result of each statement appears in its own tab.
#4.4 Sorting and filtering results
- Click a column header in the result to sort by that column (ascending → descending → off).
- Hover over a column header and select the funnel icon that appears. Choose a condition (such as "contains"), enter a value and press
Enterto filter the rows. - You can also filter by writing a condition such as
email LIKE '%@example.com'in the "WHERE" box on the toolbar and pressingEnter.

Sorting and filtering are done by the database, so they also apply to rows that have not been loaded yet. To write the current sort and filter into the SQL, choose "Apply to SQL" (8.3 Sorting and filtering).
#4.5 Editing data
- Open the data of a table as described in 4.2 Viewing the contents of a table.
- Double-click the cell you want to change, enter a value and press
Enter. Changed cells get a green background. - Choose "Apply" on the toolbar. A confirmation dialog shows the SQL to run (
UPDATE ...). Check it and choose "Apply".

Changed cells and added rows look like the picture in 9.3 Adding, inserting and deleting rows. The changes are applied in one transaction, and the result is reloaded when they succeed. Until you choose "Apply", you can undo your changes with "Discard Changes" on the toolbar.
#4.6 Saving SQL you use often
- Choose "Save Query" on the toolbar of the data tab.
- Enter a name and where to save it (User / Workspace).
Saved SQL appears under "Queries" below that connection in the Connections view. Select it to open a data tab with that SQL.
#5. Connections
#5.1 Adding, editing, duplicating and deleting connections
| Operation | How |
|---|---|
| Add | "+" (Add Connection) at the top of the Connections view, or the command "DBVisor: Add Connection". "+" (Add Connection to This Folder) to the right of a folder opens the form with that folder filled in |
| Add from a connection string | "Add Connection from Connection String..." in the "..." menu at the top of the Connections view, or the command "DBVisor: Add Connection from Connection String..." (5.7 Filling in the form from a connection string) |
| Open a SQLite file | "Open SQLite Database File..." in the "..." menu at the top of the Connections view, or the command "DBVisor: Open SQLite Database File...". When you choose a file, DBVisor adds a connection and opens it (5.8 Opening a SQLite database file) |
| Open the sample database | "Try the Sample Database" in the "..." menu at the top of the Connections view, or the command "DBVisor: Try the Sample Database" (4.0 Trying the sample database) |
| Edit | The "Edit Connection" button to the right of the connection, or "Edit Connection" in its context menu |
| Duplicate | "Duplicate Connection" in the context menu of the connection (to create a connection with similar settings) |
| Rename | "Rename..." in the context menu of the connection (F2). You can rename it while it is connected |
| Rename a folder | "Rename..." in the context menu of the folder (F2). The "Folder" of every connection in the folder changes |
| Move to a folder | Drag the connection onto a folder (or onto a connection in a folder). Drag it to the empty space at the bottom of the tree to take it out of its folder. You can move it while it is connected |
| Delete | "Delete Connection" in the context menu of the connection (Delete) |
The screen for adding a connection has two steps. In step 1, you choose the type of database on a card. In step 2, you enter where to connect and a name. Editing starts at step 2 (you can choose the type again with "Change"). The items in step 2 are as follows. For all the items, see "Form fields" in Managing connections.
| Section | Main items |
|---|---|
| Where to Connect | Host, port (empty for the default port), database (the service name for Oracle), user, password, "Save passwords and passphrases", "Test Connection". For SQLite, the database file and "Create the database file if it does not exist" (5.8 Opening a SQLite database file) |
| Name and Usage | Connection name (if empty, "database (host)"), environment (the Development / Staging / Production cards), read-only, save location (the "Only me" / "Share with the team" cards; when you share, the content to be written to .vscode/dbvisor.json is shown) |
| More Settings (collapsed) | Folder (a name for grouping connections in the tree), SSL mode (Not specified / Disable / Prefer / Require / Verify CA / Verify full) and certificate files, SSH tunnel (the SSH server used as a bastion, the user and the authentication method), connection timeout (in seconds; 15 seconds by default), and other items specific to each database |
To enter a connection string or URL, use the "Paste a connection string" card in step 1, or "Paste a connection string" at the upper right of step 2 (5.7 Filling in the form from a connection string).
Before you save, check with "Test Connection" that you can connect. Named instances of SQL Server (host\instance-name) are not supported, so specify the port number instead.
#5.2 Where connections are saved and sharing with your team
| Save location | Where it is stored | Best for |
|---|---|---|
| User settings | Inside VS Code (on this computer only) | Connections that only you use |
| Workspace | .vscode/dbvisor.json in the open folder |
Connections that you share with your team (you can manage them with Git) |
- Wherever you save a connection, its password is not written to a file.
- To save to the workspace, you need to open a folder and trust that workspace.
- You can also edit
.vscode/dbvisor.jsondirectly. For the format, see "How to write .vscode/dbvisor.json" in Managing connections. Connections in an invalid format are not loaded, and the reason is shown under "DBVisor" in the Output panel.
#5.3 Passwords
- When "Save passwords and passphrases" is on, the password is stored in VS Code SecretStorage (such as the OS keychain).
- When it is off, DBVisor asks for the password each time you connect. The password you enter is remembered until you disconnect or quit VS Code.
- If you leave the password field empty when you edit a connection, the saved password is used.
- SSH passwords and private key passphrases are saved in the same way.
#5.4 SSL and SSH tunnels
- SSL: Encrypts the communication. "Verify full" verifies the server's certificate and host name, and is the most secure mode. For SQL Server and Oracle, the modes mean slightly different things ("SSL" in Managing connections).
- SSH tunnel: Connects through an SSH server when the database cannot be reached directly (for example, when it is behind a bastion server). For the host in "Server", enter the address of the database as seen from the SSH server (
localhostif the database is on the bastion server itself). - The first time you connect to an SSH server, DBVisor shows its host key fingerprint (
SHA256:...) and asks you to confirm it. Check that it matches the fingerprint you got from the server's administrator, and then choose "Trust and Connect". DBVisor does not connect to a server whose key does not match the key in~/.ssh/known_hosts.
#5.5 Environments and read-only connections
If you set the "Environment" and "Read-only" for each connection, you can avoid changing production data by mistake (11. Safeguards against mistakes).
| Setting | Effect |
|---|---|
| Environment: Development | The icon in the tree is shown in the database's own color |
| Environment: Staging | The icon in the tree, the connection in data tabs and the Status Bar are shown in yellow |
| Environment: Production | Shown in red. DBVisor always asks you before running a statement that changes data or schema |
| Read-only | Statements that change data or schema are not run. The result table cannot be edited either |
#5.6 Connecting and disconnecting
- Expanding a connection connects to it. Running statements from a data tab or a
.sqlfile also connects when needed. - If DBVisor cannot connect, the tree and a notification at the lower right show what happened (such as "The database server refused the connection."). In the notification, "Show Details" shows what to check and the message from the database, and "Edit Connection" opens the form. If the password is wrong, choose "Re-enter Password" to enter it again and reconnect (the saved password is replaced too).
- The databases, schemas, folders and other items that were expanded the last time you were connected are shown expanded when you connect (6.10).
- To disconnect, choose the "Disconnect" button to the right of the connection, or "Disconnect" in its context menu. If there is an uncommitted transaction, DBVisor asks whether to commit or roll back.
- To get the latest state without disconnecting, choose "Refresh" to the right of the connection.
#5.7 Filling in the form from a connection string
Paste a connection string or URL from the settings of another tool or application, and DBVisor fills in the fields of the screen for adding a connection.
- In step 1 of the screen for adding a connection, select the "Paste a connection string" card and choose "Next" ("Paste a connection string" at the upper right of step 2 shows the same field).
- Paste the connection string into "Connection string or URL" and choose "Fill In" (pressing
Enteralso works). The type of database, host, port, database, user, password, SSL mode and more are filled in. - Check the message shown below "Test Connection" (such as the items that were not used) and the fields, and then choose "Test Connection" and "Save and Open".

| Format | Examples |
|---|---|
| URL | postgresql://user:password@host:5432/db, mysql://..., mariadb://..., sqlserver://..., oracle://user@host:1521/service |
| JDBC URL | jdbc:postgresql://..., jdbc:mysql://..., jdbc:sqlserver://host:1433;databaseName=db, jdbc:oracle:thin:@//host:1521/service |
| Key-value pairs | host=localhost dbname=app user=me (PostgreSQL), Server=host,1433;Database=db;User ID=sa;Password=... (SQL Server) |
| Oracle | user/password@host:1521/service, (DESCRIPTION=...) |
| SQLite | sqlite:///data/app.db, file:./app.db, a file path |
- If the connection string contains a password, it goes into the "Password" field. Whether it is saved depends on "Save passwords and passphrases".
- The connection name, folder, save location, environment and SSH tunnel fields are not changed (if the connection name is empty, the database name or the like is entered).
- With "Add Connection from Connection String..." in the "..." menu at the top of the Connections view, paste the string into the input box to open the form filled in with its contents. If DBVisor cannot read the string, the reason is shown below the input box.
- For the full list of formats DBVisor can read, see "Filling in the form from a connection string" in Managing connections.
#5.8 Opening a SQLite database file
With SQLite, you open a database file. No server or password is used.
The quickest way is "Open SQLite Database File..." (in the "..." menu of the Connections view, in the guide shown when there are no connections, or in the Command Palette). When you choose a file, DBVisor adds a connection named after the file (Only me, Development) and opens it in the tree. If there is already a connection for the same file, DBVisor selects it. You can change the environment and the save location later with "Edit Connection".
You can also open a file from the screen for adding a connection.
- In step 1 of the screen for adding a connection, select the "SQLite" card and choose "Next". The "Database File" section appears instead of the host and the other server fields.
- Enter the path of the file in "Database file", or choose the file with "Browse..." on the right.
- Choose "Test Connection". If "Connected successfully. Server version: 3.…" (the SQLite version) appears, the connection works.

- Write the path as an absolute path, or as a path relative to the (first) folder of the workspace. If you save the connection to the workspace ("Share with the team") and choose the file with "Browse...", files inside the workspace get relative paths (so each computer can open the file even when your team shares
.vscode/dbvisor.json). - To create a new database, turn on "Create the database file if it does not exist" below the file field ("Browse..." then opens a save dialog). When it is off, a missing file is an error.
- If you turn off "Enforce foreign key constraints" in "More Settings" (on by default), you can also make changes that violate foreign keys.
- If you turn on "Read-only", the file is opened read-only.
- No other software is needed (DBVisor uses the SQLite built into VS Code).
The main differences between SQLite and the other databases are as follows.
| Feature | How it works with SQLite |
|---|---|
| Connection tree | Shows tables, views and triggers (there are no schemas, functions, procedures or comments) |
| Table designer | For existing tables, you can change only the name, add, drop and rename columns, and change indexes (6.5 The table designer) |
| Cancel | Long statements can be canceled too. A statement that runs one long operation is stopped by reopening the connection (7.6 Canceling and timeouts) |
| Writes from other connections | Only one connection can write to a file at a time. While one connection is writing, writes from other tabs and other programs wait (7.7 Transactions) |
| Dumps | Not supported (copy the file instead) |
#6. Working with objects in the connection tree
#6.1 Reading the tree
For a connection with saved queries, "Queries" appears first under the connection.
Right under the connection, the default schema (for MySQL / MariaDB, the database specified in the connection) is shown already expanded (its description says "Default schema"). This is usually public for PostgreSQL, dbo for SQL Server, and the schema of the connected user for Oracle. Other databases, schemas, roles and so on are grouped under "All Databases and Schemas" below it ("All Databases" for MySQL / MariaDB, "All Schemas" for Oracle). Inside it, the structure is as shown in the table below, and the default schema is also there. If you turn off the setting dbvisor.explorer.defaultSchemaShortcut, the structure in the table below is shown right under the connection.
The structure below that depends on the database.
| Database | Structure |
|---|---|
| PostgreSQL | Databases → schemas → tables, views, materialized views, functions / procedures, sequences. Also roles |
| MySQL, MariaDB | Databases → tables, views, functions / procedures, triggers, events (also sequences for MariaDB). Also users |
| SQL Server | Databases → schemas → tables, views, functions / procedures, sequences. Also logins |
| Oracle | Schemas → tables, views, materialized views, packages, functions / procedures, sequences |
| SQLite | Tables, views, triggers |
- Under a table are its columns, indexes, constraints and triggers.
- If an object has a comment, the first line of the comment appears to the right of the item (hover over it to see the whole comment).
- "(12,345)" to the right of a table is the estimated row count from the statistics. To count the exact number of rows, use "Count Rows".
- Hover over a table or view to see its columns (column name, type and NOT NULL, primary key mark, logical name). If there are many columns, the first 40 are shown.

- Column icons are colored by data type (blue for numbers, green for strings, orange for dates and times, purple for booleans, cyan for JSON, arrays and the like).
- System schemas and databases (such as
pg_catalogandmaster) are shown when you turn on the settingdbvisor.explorer.showSystemObjects.
#6.2 Buttons and context menus
The buttons that appear on the right when you hover over an item give you quick access to common operations. All the operations are in the context menu. For operations that have a key, the key (such as F2) is shown to the right of the context menu item (13.3 Connection tree and query history).

| Item | Buttons on the right | Other main operations in the context menu |
|---|---|---|
| Connection | New Query, Edit Connection, Disconnect and Refresh (while connected) | Find Object, Show Sessions (except SQLite), Duplicate Connection, Rename, Delete Connection |
| Connection folder | Add Connection to This Folder | Rename |
| Database, schema | New Query, Create Schema / Create Table, Show ER Diagram, Refresh | Find Object, Export Table Definitions, Create Dump, Drop, Rename (depending on the type of database) |
| "Tables" folder | Create Table, Refresh | Show ER Diagram, Export Table Definitions |
| Table | Open Data, Generate SQL, Show DDL, Copy Name | Insert into Editor, Edit Table Structure, Set Virtual Key, Count Rows, Show ER Diagram, Export Table Definitions, Import CSV, Generate Test Data, Create Dump, Rename, Drop |
| View | Open Data, Show DDL, Copy Name | Count Rows, Rename (except Oracle), Drop |
| Function, procedure | Generate Call SQL (where possible), Show DDL, Copy Name | Rename, Drop (where possible) |
| Column, index, constraint, trigger and others | Show DDL (where available), Copy Name | Rename, Drop (where possible) |
| Saved query | Open in New Query, Copy SQL | Insert into Editor, Rename, Change Connection..., Delete |
Which operations are available differs slightly by the type of database ("Operations in the connection tree" in Managing connections). The context menu of columns and other objects also has "Insert into Editor".
#6.3 Showing DDL, copying names and counting rows
| Operation | How | Notes |
|---|---|---|
| Show the DDL | "Show DDL" | Opens the statement (such as CREATE TABLE) in a read-only editor |
| Copy the name | "Copy Name" | Useful when you write SQL |
| Count the exact number of rows | "Count Rows" in the context menu | Runs count(*). This takes time on large tables (you can cancel it) |
#6.4 Creating databases, schemas and tables
| What to create | How |
|---|---|
| Database | Choose "Create Database" on the "Databases" folder and enter a name |
| Schema | Choose "Create Schema" on a database or on the "Schemas" folder and enter a name |
| Table | Choose "Create Table" on a schema (on a database for MySQL and MariaDB) or on the "Tables" folder. The table designer opens (6.5 The table designer) |
#6.5 The table designer
Create a table on a form, or change the structure of an existing table.
- To create a table: "Create Table"
- To change a table: "Edit Table Structure..." in the context menu of the table
When you create a table, you can choose how to start under "Start from" at the top of the screen. "ID only" is selected at first.
| Template | Columns |
|---|---|
| Empty | None (you add your own columns) |
| ID only | An auto-numbered primary key id |
| ID and timestamps | id, created_at, updated_at (the current date and time is set when a row is added; set the update time yourself when you change a row) |
| Code and name | The primary key code, and name (for lists such as departments or categories) |
The types and default values are set to suit the database (timestamptz and CURRENT_TIMESTAMP for PostgreSQL, datetime2 and SYSDATETIME() for SQL Server, and so on). If you change the columns and then choose a template again, DBVisor tells you that it replaced the columns and shows "Undo". The table name and comment are kept.

| Section | What you enter |
|---|---|
| Table | Table name, comment |
| Columns | Name, type (pick one from the suggestions or type it), NOT NULL, default, primary key, auto number, comment |
| Keys and Indexes | Primary key name, unique constraints (name and columns), indexes (name, columns, unique) |
| Foreign Keys | Name, columns, referenced table and columns, actions on delete and on update |
| Check Constraints | Name, condition (for example, price >= 0) |
Here are some tips:
- Each time you enter something, the SQL to run is shown at the bottom of the screen. If there is a mistake in your input, DBVisor shows what to fix, and you cannot run the SQL.
- Run the SQL with "Execute" in the bar at the bottom of the screen. Choose "Open in Editor" to put the SQL in a data tab, where you can edit it before running it. The bar shows the number of statements to run and the number of problems to fix.
- Write default values as SQL expressions. Enclose strings in quotation marks, like
'abc'. - Write lists of columns, such as the columns of a key, separated by commas (
order_id, line_no). When you rename a column, the column names in the primary key and the indexes change with it. - If you leave the name of a constraint or index empty, the database names it.
- When you change a table, DBVisor builds
ALTER TABLEand other statements from the differences from the original definition. You cannot change the order of columns, auto numbering of existing columns, or generated columns. - PostgreSQL and SQL Server run the statements in one transaction, so if one fails, nothing is applied. MySQL, MariaDB and Oracle commit each statement as it runs, so if one fails partway, the statements before it stay applied (DBVisor shows how far it got).
- For Oracle, names you enter in lowercase only (such as
parent_id) are converted to uppercase. - For SQLite, the comment fields are not shown. For existing tables, you can change only the names of the table and its columns, add and drop columns, and change indexes (adding a unique constraint creates a unique index). If you try to change a column's type, NOT NULL or default, the primary key, foreign keys or check constraints, DBVisor shows the reason as a problem to fix (create a new table and copy the data to it instead).

For details, see "Table designer" in Managing connections.
#6.6 Dropping and renaming
- Right-click the object you want to drop (a table, view, column, index, constraint and so on) and choose "Drop..." (you can also press the
Deletekey). To rename it, choose "Rename..." (F2) and enter the new name. - A dialog shows the SQL to run (such as
DROP TABLE ...orALTER TABLE ... RENAME ...). - Choose "Drop" ("Rename") to run it. Choose "Open in Editor" to put the SQL in a data tab instead (it is not run).

CASCADEis not added. If other objects depend on the object, the database returns an error. If needed, edit the SQL with "Open in Editor" and then run it.- You can cancel while the statement is running (for example, when another connection holds a lock).
- Not available on read-only connections.
#6.7 Generating SQL templates
Right-click a table, choose "Generate SQL...", and pick the statement you want from SELECT, INSERT, UPDATE and DELETE. A data tab opens with a template of that statement (it is not run).

| Statement | What the template contains |
|---|---|
SELECT |
All the columns, a WHERE that selects one row by the primary key, and an ORDER BY on the primary key |
INSERT |
The columns you can write values to (excluding auto-numbered columns and the like) |
UPDATE |
A SET for the columns other than the key, and a WHERE that selects one row by the primary key |
DELETE |
A WHERE that selects one row by the primary key |
- The values are
:column_nameparameters. If you run the template as it is, DBVisor asks for the values (7.3 SQL with parameters). Delete the columns and conditions you do not need. - If a column has a logical name (comment),
-- logical nameis added at the end of its line. - For tables without a primary key, the first unique constraint is used. If there is neither, a comment asks you to write a condition in the
WHERE.
Right-click a function or procedure and choose "Generate Call SQL" to open a data tab with SQL that calls it (such as SELECT function(:argument), CALL or EXEC). The arguments are :argument_name parameters. Output (OUT) arguments of procedures are written so that you get them in the result rows or messages. For the form used for each database, see "Generating SQL" in Managing connections.
#6.8 Finding objects by name
In a database with many tables, you can find and open tables, views, columns, functions and procedures, packages (Oracle) and sequences without browsing the tree. You can also use this to find out "which table has this column".
- Choose the magnifying glass ("Find Object") at the top of the Connections view. You can also open it with "Find Object..." in the context menu of a connection, database or schema, or with the command "DBVisor: Find Object...".
- Type part of a name, schema, table name or logical name (the first line of the comment) to narrow down the list (for example,
cust,sales.,Customerorcustomer_id). When you have not typed anything, the objects are listed under a heading for each kind. - What happens when you choose an item depends on its kind.
| Kind | Shown in the list | When you choose it |
|---|---|---|
| Tables, views, materialized views | The name with its schema, and the logical name | Opens the data in a data tab |
| Columns | The column name, and its table (with the schema), type and logical name | Opens the data of the column's table |
| Functions, procedures | The name with its schema, the arguments, and the return type | Shows the DDL |
| Packages, sequences | The name with its schema | Shows the DDL |

- With the buttons on the right of a row, you can copy the name (the column name for columns, the name with its schema for the others) or show the DDL.
- With "Filter by Kind" (the funnel button) to the right of the title, you can choose which kinds to show (for example, only columns). The title shows the kinds you have chosen.
- The connection searched is the connection of the item that has focus in the tree (when you use the button at the top of the view). When you open it from a schema, the search starts limited to that schema. If the connection cannot be determined, you choose one.
- For PostgreSQL and SQL Server, DBVisor searches the objects in the connection's default database (or in the database you opened it from). For MySQL / MariaDB, it searches all databases, and for Oracle, all schemas (except those Oracle maintains). System schemas are included only when the setting
dbvisor.explorer.showSystemObjectsis on. - If you are not connected, DBVisor connects first (it may ask for your password). In databases with many columns, loading the list takes a little time.
#6.9 Working with several items at once and dragging
In the connection tree and the query history, you can select several items with Ctrl + click (to add or remove an item), Shift + click, and Shift + ↑ / ↓. When you right-click the selected items, only the operations available for all of them are shown.

| Operation | When several items are selected |
|---|---|
Copy Name (Ctrl+C) |
Copies the names separated by commas (selecting columns gives id, name, email, which is handy for writing the column list of a SELECT) |
| Copy SQL (saved queries, history) | Adds ";" to the end of each statement and copies them separated by blank lines |
Delete, Drop (Delete) |
Asks for confirmation only once for all of them. For objects, shows all the DROP statements and runs them in order (only for objects in the same connection and database; stops if one fails) |
Open Data, New Query, Open in New Query (Ctrl+Enter) |
Opens each selected item (asks first if there are more than 10) |
Show DDL (F12) |
Puts all the DDL together in one editor |
| Insert into Editor | Inserts the names (separated by commas) or the SQL together |
You can do the following by dragging.
| What you drag | Where you drop it | Result |
|---|---|---|
| Tables, columns and other objects | An editor, such as a .sql file |
Inserts the names (separated by commas if there are several) |
| Saved queries, query history | An editor, such as a .sql file |
Inserts the SQL |
| Connection | A connection folder, or a connection in a folder | Moves the connection into that folder |
| Connection | The empty space at the bottom of the tree, or a connection that is not in a folder | Takes the connection out of its folder |
| Saved query | Another connection (or an item under it) | Moves the query to that connection (the same as "Change Connection...") |
You cannot drag items into the SQL pane of a data tab (while you drag, VS Code does not pass mouse operations to screens such as data tabs). Instead, with the data tab open, choose "Insert into Editor" in the context menu of the tree item to insert the name or SQL at the cursor in the SQL pane (if a text editor is active, it is inserted into that editor).
#6.10 Selecting the table of a data tab in the tree and remembering expanded items
When you switch data tabs, the connection tree selects the table of that tab (just as the Explorer selects the file you open). The position in the tree shows you which table you are looking at.
| Data tab | Item selected in the tree |
|---|---|
| A tab opened with "Open Data" or "Find Object" | That table or view (the databases, schemas and folders on the way to it are expanded) |
| Any other tab, such as a new query | Its database. For a tab with no database specified, its connection |
- Only the item in the tree is selected; the focus stays in the data tab.
- Nothing is selected when the Connections view is not visible (for example, when the Side Bar shows the Explorer) or when the connection of the tab is disconnected. The item is selected when you open the Connections view, or when running a statement in the tab connects it.
- For a tab of a table that is not shown in the tree (such as a table in a system schema), its database or connection is selected.
- If you turn off the setting
dbvisor.explorer.autoReveal, switching data tabs does not change the selection in the tree.
DBVisor also remembers the items you expanded under a connection (databases, schemas, folders such as "Tables", tables, and the "Queries" of saved queries). When you disconnect and connect again, or reopen VS Code and connect, the same items are shown expanded.
- The items are remembered for each workspace. When you collapse an item, it is forgotten ("Collapse All" at the top of the view also forgets them).
- Connections themselves are not expanded automatically, because expanding a connection connects to it.
- Schemas and tables that were dropped and created again may not be expanded again.
#7. Running SQL
#7.1 Running SQL in a data tab
| How to open it | What opens |
|---|---|
| "Open Data" on a table or view | A tab with a SELECT for that table, which runs right away. Only one tab opens for the same table |
| "New Query" on a connection, database or schema | An empty data tab. If you open it from under a database, it connects to that database |
| Query history, saved queries | A data tab with that SQL (it is not run) |
Ctrl+Enter runs the statement at the cursor (or the selection, if there is one), and Ctrl+Shift+Enter runs all the statements. When the position of an error is known, a squiggly line appears at that position in the SQL pane. For explanations of errors and "Did you mean" suggestions, see 8.1 Reading results. "Run and Export to Excel" on the toolbar writes the results to an Excel file (7.9 Running and exporting to Excel).
#7.2 Running SQL in a .sql file
- Open a
.sqlfile in the workspace. - Select "Select Connection" (or the connection name) in the Status Bar and choose the connection to run statements with. The connection you choose is used again the next time you open the file.
- Run a statement with
Ctrl+Enter, the run button at the top of the editor, or "Run" (CodeLens) above the statement.
The results appear in the "Results" panel beside the editor. As in data tabs, you can edit them if the conditions are met. From the context menu, you can also show the execution plan, use "Run and Export to Excel..." (7.9 Running and exporting to Excel) and "Save Query".

#7.3 SQL with parameters
If you write :name in SQL, DBVisor asks for its value when you run the SQL. This is handy when you run the same SQL many times with different values in the conditions.
SELECT * FROM sales.orders
WHERE customer_id = :customer_id
AND ordered_at >= :since;

- Enter the values and choose "Run" (or press
Enter). Check "NULL" to pass NULL. - The values you enter are remembered for each editor (data tab) and used as the initial values the next time DBVisor asks.
- The values are not embedded in the SQL; they are passed to the database as parameters.
- For details, see "SQL with parameters" in Running queries.
#7.4 Multiple statements and statement separators
- Separate statements with semicolons (
;). Semicolons inside strings and comments do not separate statements. - When you run several statements and an error occurs, the remaining statements are not run (the setting
dbvisor.query.stopOnError). - DBVisor also understands the following, depending on the database.
| Database | Syntax |
|---|---|
| MySQL, MariaDB | Statements are not split inside the BEGIN ... END of CREATE PROCEDURE and the like. DELIMITER is also supported |
| SQL Server | A line with only GO separates batches. CREATE PROCEDURE and the like run up to the next GO as one statement |
| Oracle | A line with only / separates statements. A PL/SQL block up to the / is one statement. SQL*Plus commands (such as SET SERVEROUTPUT ON) are not supported |
For details, see "Common behavior" in Running queries.
#7.5 Completion and formatting
- Completion: As you write SQL, DBVisor suggests table names, column names, columns of aliases (the columns after
o.) and more.Ctrl+Spacealso shows the suggestions. Schema information is kept for 5 minutes, and is loaded again when you choose "Refresh" in the tree, create a table, and so on. - Formatting: To make SQL easier to read, press
Shift+Alt+For choose "Format SQL" on the toolbar in a data tab, or use VS Code's "Format Document" (Shift+Alt+F) in a.sqlfile. If there is a selection, only that part is formatted. You can change the case of keywords with the settingdbvisor.format.keywordCase.
#7.6 Canceling and timeouts
- In a data tab, choose "Cancel", which appears while a statement is running, to cancel the run.
- In a
.sqlfile, select "Running" in the Status Bar. - To stop statements that take too long automatically, set the number of seconds in the setting
dbvisor.query.timeoutSeconds(the default,0, means no timeout). - With SQLite, the changes made by a canceled statement are undone. If a statement that runs one long operation (such as aggregating a large table) has not stopped 1 second after you cancel it, DBVisor stops it by reopening the connection. If this happens in the middle of a manual commit transaction, the transaction is rolled back (DBVisor tells you the next time you run a statement).
#7.7 Transactions
The default is auto-commit: each statement is committed when it runs. If you switch to manual commit, a transaction starts when you run the first statement, and changes are not committed until you commit or roll back.
| Where | Switching | Committing, rolling back |
|---|---|---|
| Data tab | Select "Auto-commit" or "Manual commit" on the toolbar | "Commit" and "Roll Back" on the toolbar, shown while a transaction is in progress |
.sql file |
Select "Auto-commit" or "Manual Commit" in the Status Bar | Select "In Transaction" in the Status Bar |
- If you edit the result table in manual commit and choose "Apply", the changes run inside that transaction. They are committed when you commit.
- If you try to close a tab or disconnect without committing, DBVisor asks whether to commit or roll back.
- In Oracle, MySQL and MariaDB, running
CREATE,ALTER,DROPand the like commits the transaction at that point (this is how these databases work). - With SQLite, once you write inside a transaction, other connections (other tabs and other programs) cannot write to that file until you commit or roll back. If the write of another connection does not finish after 5 seconds of waiting, you get the error "The database file is locked".
#7.8 Execution plans
Shows how a statement is run (which indexes are used and in which order tables are joined) as a tree-shaped table.
- In a data tab, choose "Execution Plan" on the toolbar. In a
.sqlfile, choose "Show Execution Plan" in the context menu. - Choose "Estimated plan" (does not run the statement) or "Run and measure" (actually runs the statement and measures the rows and time).

- Rows with a large cost of their own (or time, when measured) are marked in orange (10% or more of the total) or red (30% or more).
- Rows whose actual row count differs from the estimate by a factor of 10 or more get a ⚠ (for example, because the statistics are out of date).
- Statements that change data cannot be run with "Run and measure".
- With SQLite, the result of
EXPLAIN QUERY PLANis shown. There are no estimated rows or costs. "Run and measure" measures only the total time and the number of rows. - For details, see "Execution plans" in Running queries.
#7.9 Running and exporting to Excel
Runs several statements in order and puts all the results into one Excel file (.xlsx). This is handy for keeping the results before and after a data change as test evidence.
- In a data tab, choose "Run and Export to Excel" on the toolbar. In a
.sqlfile, choose "Run and Export to Excel..." in the context menu. If you have selected a range, only the statements in that range run. - Choose where to save the file (the initial name is
results-<date-time>.xlsx). If there are parameters, DBVisor asks for their values. - A notification appears when it is done. Choose "Open" to open the file in Excel or another application.
-- Order before the change
SELECT * FROM sales.orders WHERE order_id = 10;
UPDATE sales.orders SET status = 'shipped' WHERE order_id = 10;
-- Order after the change
SELECT * FROM sales.orders WHERE order_id = 10;
| Sheet | Contents |
|---|---|
| Statements (the first sheet) | The connection, the date and time of the run, the parameter values, and for each statement, the result (rows, rows changed, error), the name of its result sheet and the time taken |
| Result sheets | One for each statement that returned rows. The name is "number. the comment before the statement (the -- line)"; in the example above, "1. Order before the change" and "3. Order after the change" |
- All the results of a statement are read before the next statement runs, so you can keep both the results before and after a change.
- If an error occurs, DBVisor stops there. The results up to that point and the error are written to the file.
- Confirmations on production connections, read-only connections and manual commit work the same as when you run statements normally. The results are not shown on the screen.
- Column headers, NULL and number formats are the same as for exporting to Excel (8.5 Exporting to files).
#8. Viewing and using results
#8.1 Reading results
| Result | How it appears |
|---|---|
Result sets (SELECT and similar) |
Shown in a table. Scroll down to load more rows. NULL appears as an italic "NULL", and numbers are right-aligned |
INSERT, UPDATE, DELETE and so on |
Shows the number of affected rows and the time taken |
| Errors | Shown in a red frame with the error code and the "Show in Editor", "Copy" and "Ask AI" buttons. For common errors, DBVisor shows what happened, what to check and buttons for the next step before the database's message (see the table below) |
| Messages | NOTICE, PRINT, DBMS_OUTPUT and so on appear under "Messages" |

For common errors, DBVisor explains them and offers next steps as follows. For errors it cannot identify, it shows only the database's message.
| Error | What DBVisor shows |
|---|---|
| Table or view not found | "Did you mean:" with close names (up to three). Choosing one replaces the name in the SQL (without running it). The "Find Object..." button |
| Column not found | "Did you mean:" with close columns of the table in the statement (if you gave it an alias, as in c.name, the table with that alias). The "Find Object..." button |
| No privilege | That the connection's user lacks the privilege. Ask the administrator to grant it, or connect as another user (the "Edit Connection" button) |
| Lock wait timeout, deadlock | That another session is using the same rows or table. The "Show Sessions" button opens the session manager, where you can find the session that holds the lock (10.8 Session manager) |
| Statement time limit exceeded | That the database's time limit stopped the statement (statement_timeout in PostgreSQL, max_execution_time in MySQL and so on) |
| Database is read-only | That you are connected to something like a read-only replica (the "Edit Connection" button) |
The "Did you mean:" suggestions come from the same list of tables and columns as completion. When completion does not appear (14.5 Completion suggestions do not appear), no suggestions appear either.
When you choose "Ask AI" on an error, you can choose where to ask.
- "Ask in the VS Code Chat": Opens the chat in VS Code with a request that contains the error and the SQL. You can check the content before you send it.
- "Copy the Request for Another Agent": Copies the same request. Paste it into the chat of Claude Code, Codex or another agent.
Agents connected to DBVisor read the SQL and the error in the data tab on their own, and put the fixed SQL into the data tab (10.9 Connect AI Agents).
- DBVisor loads 500 rows at a time (setting
dbvisor.query.fetchSize) and keeps up to 100,000 rows for one result (settingdbvisor.query.maxRowsInMemory). When you need all the rows, export them to a file (8.5 Exporting to files). - When you run several statements, the results of all statements except the last show only their first 500 rows.
#8.2 Selecting and copying
| Action | How |
|---|---|
| Select a cell | Click, or use the arrow keys |
| Select a range | Drag, Shift + click or Shift + arrow keys |
| Select rows | Click a row number (Ctrl + click to add or remove, Shift + click for a range, drag for several rows) |
| Select all | Ctrl+A, or click the top-left corner of the table |
| Copy | Ctrl+C (Ctrl+Shift+C to include the column names) |
| Show the menu | Right-click the table (or press the Menu key or Shift+F10) |

Copied content is tab-separated, so you can paste it straight into Excel or another spreadsheet. When you select rows and copy them, all columns are copied. The context menu has commands such as "Copy", "Paste", "Select All", "Find in Results", "Copy as INSERT Statements" / "Copy as UPDATE Statements" (8.10 Copying rows as SQL statements), "Open Referenced Rows" / "Open Referencing Rows" and commands to add and delete rows (they do the same as the keys).
#8.3 Sorting and filtering
| Action | How |
|---|---|
| Sort | Click a column header (ascending → descending → off) |
| Sort by several columns | Shift + click the headers of the second and later columns |
| Filter by a column condition | Choose the funnel icon in the column header, enter a condition and a value, and press Enter |
| Filter with an SQL condition | Write a condition in the "WHERE" box on the toolbar and press Enter (use the column names of the result) |
| Remove conditions | Click the × on a chip in the toolbar, or choose "Clear All Filters" |
- Sorting and filtering run on the database side, so they also cover rows that have not been loaded yet. You can edit sorted or filtered results as they are.
- They work on results of read statements such as
SELECTandWITH. They are not available while you have edits that you have not applied yet. - "Apply to SQL" writes the current sort and filters into the
WHEREandORDER BYof the original statement, and replaces the SQL in the editor.
For details, see the sections on sorting and filtering in Running queries.
#8.4 Column width, headers and record view
- Column width: Drag the right edge of a column header. Double-click it to fit the width to the content.
- Headers: When columns have comments (logical names), use the header button on the toolbar to switch between "Header: Names", "Header: Comments" and "Header: Names and Comments". The display you choose is also used for the next results (setting
dbvisor.results.columnHeader). - Record view: "Show as Record" on the toolbar shows one row as a vertical list of column names and values. It is handy for results with many columns or long values. Press
Alt+↑/Alt+↓to move to the previous or next row, and choose "Show as Table" to go back to the table.

#8.5 Exporting to files
Choose "Export..." on the toolbar of the result table.
Choose the format (CSV / TSV / JSON / Excel / INSERT statements). For CSV and TSV, also choose the encoding.
Encoding Good for UTF-8 with BOM (default) Opening in Excel UTF-8 Loading into other tools Shift_JIS Handing over to systems that need Shift_JIS (characters it cannot represent become "?") Choose where to save the file.
DBVisor runs the statement again and exports all rows, not just the rows loaded on screen. The sort and filters are applied too. While it exports, DBVisor shows the progress, and you can cancel. Results of statements that change data (such as UPDATE ... RETURNING) cannot be exported.
| Format | How it is written |
|---|---|
| Excel (.xlsx) | Written to one sheet with the header row frozen. If columns have logical names, they go in a row above the column names. NULL is a gray italic "NULL", numeric columns become number cells (up to 15 significant digits) and dates and similar values are strings as displayed. Up to 100,000 rows (setting dbvisor.query.maxRowsInMemory); for more rows, use CSV |
| INSERT statements (.sql) | One INSERT INTO table (column, …) VALUES (value, …); per row. For a result from one table, that table's name is used; otherwise, DBVisor asks for the table name. Useful for loading the data into another environment |
#8.6 Comparing results
DBVisor shows the differences between results, such as before and after you change data, or between production and staging connections.
- On the result you want to compare, choose "Compare" on the toolbar. That result becomes the base, and the Status Bar shows "Compare: n rows".
- Change the data and run the same statement again, or run the statement on another connection. Then choose "Compare" on that result. The comparison opens.

| Display | Meaning |
|---|---|
| Changed (~, yellow) | Rows with the same key where the value of some column differs. Differing cells show the before and after values side by side |
| Added (+, green) | Rows only in the compared result |
| Removed (−, red) | Rows only in the base |
Rows are matched by the values of the key columns (the primary key at first; you can choose other columns on the screen). To stop using the base, choose "Compare: n rows" in the Status Bar.
Choose "Export to Excel" at the top of the comparison to save the comparison to an Excel file. The file keeps the key columns, the swap and "Show only rows with differences" as they are on the screen. Changed cells are filled yellow in the form "before → after", added rows green and removed rows red.
#8.7 Finding text in the results
Select the table and press Ctrl+F (or use the search button on the toolbar, or "Find in Results" in the context menu) to open a search box above the table.

- As you type, the cells whose values contain the text are highlighted, and DBVisor moves to the match nearest the current cell. The search is not case-sensitive.
- Press
Enterto go to the next match andShift+Enterto go to the previous one. PressEscto close the box. Even after you close it, pressF3/Shift+F3in the table to move to the next / previous match for the same text. - It searches only the loaded rows. When some rows have not been loaded yet, the box says so. To search all rows in the database, use filtering (8.3 Sorting and filtering).
#8.8 Summarizing selected cells
When you select several cells, the right side below the table shows the count (the number of cells that are not NULL) and the sum, average, minimum and maximum of the cells in numeric columns. It works like the status bar of a spreadsheet app.

- Values with many digits, such as
numericandbigint, are calculated without rounding errors. The average shows three more decimal places than the values. - When you select rows, all columns of those rows are included. Only loaded rows are counted.
- When more than 200,000 cells are selected, only the count is shown.
#8.9 Following foreign keys
For a result from one table (such as the result of "Open Data"), you can open the rows of tables linked by foreign keys in a new data tab from the context menu.

| Menu | Rows it opens |
|---|---|
| Open Referenced Rows | The rows that this table's foreign keys refer to (for example, from an order to the customer of that order) |
| Open Referencing Rows | The rows of tables whose foreign keys refer to this table (for example, from a customer to that customer's orders) |

- DBVisor looks up the values of the selected rows (or of the current cell's row if no rows are selected). If you select several rows, it looks them up all at once (up to 100 distinct sets of values).
- Referenced rows are found by following the foreign key that contains the current cell's column. If more than one foreign key can be followed, you choose which one. Hover over the header of a foreign key column to see what it refers to.
- The SQL in the opened data tab passes the values as parameters (such as
:customer_id). When you run it again, DBVisor asks for the values (the previous values are filled in; 7.3 SQL with parameters). - You cannot follow foreign keys from join results or view results. It also works on read-only connections.
#8.10 Copying rows as SQL statements
Right-click the table and choose "Copy as INSERT Statements" or "Copy as UPDATE Statements" to put the selected rows (or the current row if no rows are selected) on the clipboard as SQL statements. Use this to move data to another environment or to keep a record.
INSERT INTO sales.customers (customer_id, name, points) VALUES (1, 'James Smith', 444);
UPDATE sales.customers SET name = 'Robert Williams', points = 44489 WHERE customer_id = 3;
- The values are written directly in the statements (strings in
', numbers as they are). DBVisor only copies the statements; it does not run them. - For a result from one table, DBVisor uses that table's name and its writable columns. For INSERT statements from other results, it asks for the table name.
- UPDATE statements select rows by the primary key (or a virtual key; 9.6 Editing tables without a primary key (virtual keys)). You cannot use them when the key columns are not in the result.
- You can copy up to 10,000 rows at a time.
#9. Editing data
#9.1 Results you can edit
| Result | What you can do |
|---|---|
| Made up only of columns from one table, and includes the columns of the primary key (or, if there is none, a NOT NULL unique key) | Add, change and delete rows |
| Made up only of columns from one table without a primary key, and includes the columns of the virtual key you set (9.6 Editing tables without a primary key (virtual keys)) | Add, change and delete rows |
| Made up only of columns from one table, but does not include the key columns (including when the table has no key) | Add rows only |
| Includes columns from several tables (such as a join that selects columns of both tables), results of views and so on | View only |
| Results on a read-only connection | View only |
When a result cannot be edited, or you can only add rows, DBVisor shows the reason and the next step above the table.
| Shown above the table | Next step |
|---|---|
| Read-only connection | With "Edit Connection", you can clear "Read-only" for the connection |
| The table's key columns are not in the result (add rows only) | Add the key columns to the SELECT, or open the whole table with "Open (table)" |
| The table has no key (add rows only) | Set a virtual key with "Specify Key Columns..." |
| The result joins several tables | Open just one table with "Open (table)" |
| The result comes from a view | Open the tables that the view reads |
The easiest way is "Open Data" on a table. If you add a WHERE and run it again, you can edit just the filtered rows. Even statements with joins or aggregation (GROUP BY) can be edited if all the result's columns (except calculated columns) are columns of one table (except on Oracle). Calculated columns and columns whose values are set automatically (such as GENERATED ALWAYS IDs) are shown dimmed as columns you cannot write to. For the detailed conditions for each database, see "Results you can edit" in Editing table data.
#9.2 Editing cells
| Action | How |
|---|---|
| Start editing | Double-click, Enter or F2 |
| Confirm | Enter (moves to the cell below) or Tab (moves to the cell on the right) |
| Cancel | Esc |
| Set to NULL | Select the cell and press Delete, or choose "Set NULL" on the toolbar |
- You enter values as text, and the database converts them to the column type. You can enter numbers, dates,
true/false, JSON and so on as they are. - If you confirm an empty value in a cell that was NULL, it stays NULL. To make it an empty string, type a character and then delete it.
- You can edit values the same way in record view (values with several lines can be edited as they are).
#9.3 Adding, inserting and deleting rows
| Action | How |
|---|---|
| Add a row | "Add Row" on the toolbar (the green +). Adds an empty row at the top of the table |
| Insert a row | "Insert Row" in the context menu. Inserts an empty row before the selected row |
| Delete rows | Select rows by their row numbers and press Delete, or choose "Delete Row" on the toolbar. Do it again to undo |

| Display | Meaning |
|---|---|
| Cells with a green background | Changed cells, or cells you filled in on a new row |
| Rows whose row number is "+" | New rows |
| Struck-through rows | Rows to be deleted |
| Columns with 🔑 | The key columns that identify rows |
| Cells with a yellow frame | Unique key columns on a new row that need a value |
DEFAULT |
Columns with a default value that you have not filled in on a new row (such as auto-numbered columns). The database's default value is used |
NULL (on a new row) |
Columns without a default value that you have not filled in. NULL is stored |
#9.4 Pasting rows
You can paste rows that you selected by their row numbers and copied (all columns) into the table. You can also copy a table from Excel with the columns in the same order and paste it.
| Action | Selection before pasting | What happens |
|---|---|---|
Paste (Ctrl+V) |
Cells are selected | Inserted as new rows before the current row |
Paste (Ctrl+V) |
Rows are selected | Overwrites the selected rows |
Paste as New Rows (Ctrl+Shift+V) |
Either | Inserted as new rows |
- When you paste as new rows, the unique key columns (primary keys and unique constraints) are left empty, because the rows would otherwise duplicate the original rows and could not be added. Columns that need a value are marked with a yellow frame, so fill them in before you apply.
- Content that has only some of the columns (copied from a range of cells), or whose number of columns does not match, is not pasted, and DBVisor tells you why.
#9.5 Applying and discarding changes
- Choose "Apply" on the toolbar (the number of changes is shown on its left).
- A confirmation dialog shows the SQL to run. Check it and choose "Apply".
- All changes run in one transaction, in the order "delete → change → add". When they succeed, DBVisor runs the same statement again to show the latest content (if you ran statements that change data together with it, DBVisor runs only the statement of the edited result again, so that those statements do not run twice).
- If the target rows were changed by someone else, or a constraint is violated, nothing is applied: DBVisor rolls back and shows the error. Your changes stay on the screen, so you can fix them and apply again.
- Before you apply, you can undo all changes with "Discard Changes" on the toolbar.
#9.6 Editing tables without a primary key (virtual keys)
For results from a table without a primary key, you can only add rows at first. If you set columns that identify a row as a "virtual key", you can also change and delete rows.
- Above the result table, choose "Specify Key Columns..." after the notice "This table has no primary key, so…" (you can also set it with "Set Virtual Key..." when you right-click the table in the connection tree).
- Check the columns that identify a row (as many as you need), and choose "OK".

- DBVisor remembers the virtual key for each connection and table, and uses it the next time it shows a result from that table. Above the table, it shows "Rows are identified by the virtual key: (columns)." and adds 🔑 to the column headers. You can choose again with "Change...".
- To stop using it, choose "OK" without selecting anything on the selection screen.
- To change and delete rows, DBVisor finds them by the values of the virtual key columns. If several rows have the same values and no single row is identified, nothing is applied: DBVisor rolls back and shows the number of matching rows. Choose columns whose values do not repeat.
- Rows whose virtual key columns are NULL cannot be changed or deleted. Virtual keys are not used for tables with a primary key.
#10. Handy features
#10.1 Query history
- DBVisor records each statement you run, one by one (the SQL, connection, date and time, run time, number of rows and success or failure). Select an item to open its SQL in a data tab.
- With the buttons on the right of an item, you can open it in a data tab, save it as a query or copy the SQL. Use "Search Query History" at the top of the view to search by SQL or connection name.
- Press
Ctrl+Cto copy the SQL andDeleteto remove it from the history (13.3 Connection tree and query history). You can also select several items to copy or delete them together, or drag them to an editor to insert their SQL (6.9 Working with several items at once and dragging). - The latest 1,000 items are kept (setting
dbvisor.history.maxEntries;0turns off recording). The history is stored only on this computer and is not included in Settings Sync. Statements that contain passwords (such asCREATE ROLE ... PASSWORD) are not recorded. - Statements run by AI agents get a robot icon and an "AI" mark, and their tooltips show the agent's name (10.9 Connect AI Agents).
#10.2 Saved queries
| Action | How |
|---|---|
| Save | "Save Query" in a data tab, "Save Query" in the context menu of a .sql file, or "Save Query" in the query history |
| Open | Select the item under "Queries" below the connection, or search with the command "DBVisor: Open in New Query" |
| Organize | "Rename..." (F2), "Change Connection..." and "Delete" (Delete) in the context menu. You can also change the connection by dragging a query to another connection |
You can save queries either for the user (this computer only) or in the workspace (.vscode/dbvisor.json, which you can share with your team).
#10.3 ER diagrams
DBVisor draws tables and the relationships between them through foreign keys. Open a diagram with "Show ER Diagram" on a schema (a database for MySQL and MariaDB), the "Tables" folder or a table.

- Use the toolbar to switch the notation (IE / IDEF1X), the names (physical names / logical names / both) and the columns shown (all / keys only / table names only).
- Drag to move the diagram, and use
Ctrl+ mouse wheel to zoom in and out. - You can save it as an image with "Save as SVG" or "Save as PNG".
#10.4 Table definition documents
DBVisor writes the columns, keys, indexes and constraints of tables to an Excel (.xlsx) or Markdown (.md) document.
- Right-click a schema, the "Tables" folder or a table, and choose "Export Table Definitions...".
- Choose the tables and the format to export, and specify where to save the file.
The logical name is the first line of the column or table comment, and the remarks are the second and later lines. In Excel, DBVisor creates a sheet with the list of tables and one sheet for each table.
#10.5 CSV import
DBVisor adds the rows of a CSV file to a table.
- Right-click a table and choose "Import CSV...".
- Choose the CSV file with "Choose File...". Check the encoding (Auto, UTF-8, Shift_JIS and so on), the delimiter, the header row and how the columns are mapped.
- Choose "Import".
All rows are added in one transaction. If an error occurs partway through, no rows are added.
#10.6 Generating test data
DBVisor adds many rows to a table at once, generated by rules.
- Right-click a table and choose "Generate Test Data...".
- Set the number of rows and a rule for each column (sequence, random numbers, date range, picking from values, Japanese dummy values, values from the referenced table and so on). At first, the rules are guessed from each column's name, type and constraints.
- Check the rows with "Preview", and choose "Generate and Insert". If you choose "Output as SQL", DBVisor opens INSERT statements instead of adding the rows.

#10.7 Dumps
DBVisor writes the structure and data of a database, schema or table to a file (PostgreSQL, MySQL and MariaDB only).
- Right-click a database, a schema (PostgreSQL) or a table, and choose "Create Dump...".
- Choose what to include (structure and data / structure only / data only) and where to save the file.
DBVisor calls the pg_dump, mysqldump or mariadb-dump command, so the command must be installed on your computer. If it is not on the PATH, specify its path with a setting such as dbvisor.dump.pgDumpPath.
#10.8 Session manager
The session manager lists the sessions (connections) on the database server, so you can look into stuck processes and lock waits and, if needed, cancel running statements or terminate sessions. It is not available for SQLite.
- Right-click a connection and choose "Show Sessions" (you can also use the command "DBVisor: Show Sessions"). A tab opens for each connection.
- The list shows the ID, state, user, database, host, application, connection time, elapsed time, what the session is waiting for, the blocking session and the SQL. Select a row to see the full SQL below the list.

| Display | Meaning |
|---|---|
| Green bar on the left | Running a statement |
| Orange bar on the left and "Blocked by" | Waiting for a lock held by another session ("Blocked by" is the ID of that session) |
| Red bar on the left | Holding a lock that keeps other sessions waiting |
| "This list" | The session that reads the list itself (cannot be canceled or terminated) |
- "Refresh" at the top reads the list again. With "Auto refresh", it can read the list every 5, 10 or 30 seconds (only while the tab is visible). "Running only" shows only running sessions and sessions that keep other sessions waiting. Use the input box to filter by user, database, host, application or SQL.
- With the buttons on the left of a row, you can cancel the running statement (the session stays connected), terminate the session (its open transaction is rolled back) or copy the SQL. DBVisor always asks you before it does so. On production connections, the confirmation also says that it is a production connection.
- On read-only connections, you can only view the list (the cancel and terminate buttons do not appear).
- SQL Server has no way to stop only another session's statement, so you can only terminate the session.
| Database | List | Cancel | Terminate | Privileges needed (for other users' sessions) |
|---|---|---|---|---|
| PostgreSQL | pg_stat_activity |
pg_cancel_backend |
pg_terminate_backend |
The same role, or membership in pg_signal_backend (superuser) |
| MySQL / MariaDB | information_schema.PROCESSLIST |
KILL QUERY |
KILL |
PROCESS, CONNECTION_ADMIN (or SUPER) |
| SQL Server | sys.dm_exec_sessions and others |
None | KILL |
VIEW SERVER STATE, ALTER ANY CONNECTION |
| Oracle | V$SESSION |
ALTER SYSTEM CANCEL SQL |
ALTER SYSTEM KILL SESSION |
Privilege to read V$SESSION (such as SELECT_CATALOG_ROLE), ALTER SYSTEM |
- Without the privileges, only your own sessions may be shown, or canceling and terminating may fail with an error. On Oracle, if
V$SESSIONcannot be read, DBVisor shows the privileges you need. - Lock waits (Blocked by) are shown for all locks on PostgreSQL, SQL Server and Oracle, and for row locks (InnoDB) on MySQL / MariaDB. On MySQL / MariaDB, waits for table locks show up as "Waiting for table metadata lock" under "Waiting for".
#10.9 Connect AI Agents
You can let AI agents such as the chat in VS Code (GitHub Copilot agent mode), Claude Code and Codex use your DBVisor connections. Agents find tables and columns, read table definitions and run read queries to answer you. For SQL that changes data, the agent puts it into a data tab, and you run it after you check it. DBVisor itself has no AI and does not call any AI service.
Examples of requests:
- "Using DBVisor, count last month's orders by prefecture in the development database."
- "Fix the error of the SQL in my data tab."
- "Write SQL that adds a cancellation date column to the customers table." (The agent puts the SQL into a data tab. You run it yourself.)
#Getting started
Run the command "DBVisor: Connect AI Agents...". You can also open it from the "..." menu of the Connections view and from the fourth step of the "Get Started with DBVisor" walkthrough.
Choose the card of the agent you use, and follow the steps shown.

Agent What to do Chat in VS Code No setup is needed. Open the chat and ask. If the harness in the picker below the chat input is "Copilot", DBVisor is available automatically. If it is "Local", choose "Agent" and check in "Configure Tools..." that DBVisor is on (the "Configure Tools..." button exists only for Local). If VS Code asks whether to trust the DBVisor server, allow it Claude Code Choose "Register with Claude Code". DBVisor becomes available both in Claude Code in VS Code (the extension) and in Claude Code in the terminal. Then start a new conversation in Claude Code (conversations that were already open do not get the tools) Codex Choose "Register with Codex" (DBVisor is added to the Codex configuration file ~/.codex/config.toml). Then start a new session in CodexOther agents Register the command shown ( node "…/dbvisor-mcp.cjs") as a standard input/output (stdio) MCP serverAsk the agent about your database. Once it is connected, the agent's name appears under "Connected Agents" on the page, and the Status Bar shows a robot icon and "DBVisor".
- Registering takes just one button press; you do not need to type commands in a terminal. If you prefer the terminal, you can also register with the command under "Register with a command instead". If DBVisor is already registered, the page says so (you can register again with "Register Again").
- If Claude Code is not found (neither the Claude Code extension for VS Code nor Claude Code itself is installed), the page says so. Install it, then open the page again.
- Agents that run outside VS Code, such as Claude Code and Codex, need Node.js. If it is not found, the page says so and shows "Get Node.js".
- An agent running in a terminal connects to DBVisor in the VS Code window where the folder you started the agent in is open. Open that folder in VS Code first.
- In remote windows (WSL, SSH, Dev Containers), also start the agent in a terminal on that remote (such as the terminal of that window).
- The location of the file in the command (
dbvisor-mcp.cjs) does not change when you update DBVisor. You only need to register once.
#What each connection allows
For each connection, choose what agents may do.
| Choice | What agents can do |
|---|---|
| Not allowed | Nothing. The connection does not even appear in the list of connections |
| Structure only | Find tables and columns, read table definitions and put SQL into a data tab. Agents cannot read data |
| Read data | In addition to "Structure only", run read queries and execution plans |
| Write data | In addition to "Read data", run statements that change data or schema. DBVisor asks you before each statement runs (see "Confirming statements that change data" below; on development connections, you can skip the confirmations for adding, updating and deleting data for 30 minutes). Not available on read-only connections |
- If you do not choose, the environment decides: "Read data" for development, "Structure only" for staging and "Not allowed" for production. A connection gets "Write data" only when you choose it.
- Change it with "AI agents" under "Name and Usage" in the connection form, or under "Connections That Agents Can Use" on the Connect AI Agents page.

- For connections shared with your team, write it in
.vscode/dbvisor.json(such as"agent": "read"; see Managing connections).
#Confirmation before sharing data
- DBVisor asks you the first time an agent reads data from a connection (query results and SQL in the editor). If you choose "Allow", it does not ask again for that connection. "Allow Only This Time" lasts only while the agent is connected.
- You can withdraw the permission with "Withdraw" under "Connections That Agents Can Use" on the page.
- What an agent reads is sent through the agent to its AI service. Allow only connections whose data you may send there.
#Confirming statements that change data
On a "Write data" connection, when an agent tries to run a statement that changes data or schema, DBVisor asks you about each statement.
- The confirmation shows the agent's name, the connection, whether it is a staging or production connection, why the statement is risky (such as
UPDATEwithoutWHERE) and the SQL. - "Run": Runs the statement and commits it (each statement is committed on its own).
- "Run and Stop Asking for 30 Minutes": Runs the statement, and for the next 30 minutes runs statements from the same agent that add, update or delete data on this connection without asking (see "Skipping confirmations" below). It appears only for statements that add, update or delete data on development connections.
- "Open in Data Tab": Puts the SQL into a data tab without running it. Check or fix it, and run it yourself.
- "Cancel": Does not run it. The agent is told that you declined.
- Transaction commands such as
BEGINandCOMMIT, and several statements passed together, are not accepted.

#Skipping confirmations (Run and Stop Asking for 30 Minutes)
When an agent changes data many times in a row, for example when you ask it to create dummy data, you do not have to press "Run" every time.
- Only statements that add, update or delete data (
INSERT,UPDATE,DELETE,MERGEand so on) that the agent runs on that connection run without asking. - The following statements are still confirmed even while this is allowed: statements that create, change or drop tables and other objects (
CREATE,ALTER,DROPand so on), risky statements (UPDATEandDELETEwithoutWHERE,TRUNCATE) and other statements such as procedure calls. The confirmation then says why DBVisor is asking. - On staging and production connections, this button does not appear (DBVisor asks every time).
- While this is allowed, the Status Bar shows "(agent name): writes allowed" in a prominent color. Hover over it to see the agent, the connection and until when it lasts. Select it to withdraw the permission, and DBVisor goes back to asking for each statement (you can also withdraw it with the command "DBVisor: Stop Letting AI Agents Write Without Asking").
- The permission ends after 30 minutes, or when the connection with the agent ends (when you quit the agent, or close or reload the VS Code window). It does not apply to other agents.
- Statements run without asking are also kept in the query history.
- DBVisor tells agents to add rows together (with a multi-row
VALUESorINSERT ... SELECT), so there are fewer confirmations in the first place.

#Built-in protections
- Only one statement runs at a time. On connections that are not "Write data", statements that change data or schema are refused, and the agent is told to put them into a data tab.
- Agent statements run in a session for agents, separate from the editor and the connection tree. The session for read statements is opened read-only regardless of the connection's settings, and each statement runs inside a read-only transaction that is always rolled back at the end (SQL Server has no read-only transactions, so the rollback undoes any changes). Statements that change data run in a separate write session after you confirm them (or, if you chose "Run and Stop Asking for 30 Minutes", while that permission lasts).
- Host names, user names, passwords and connection strings are never passed to agents.
- Results are limited to 100 rows, 200 characters per value and 100 KB in total, and queries to 30 seconds. Values of columns with names like password or token, and of columns whose logical name contains "パスワード" (Japanese for "password"), are replaced with
***. You can change the limits and the hidden columns with thedbvisor.agent.*settings (12. Settings). - For connections that need a password, agents never bring up the password prompt. VS Code shows the notification "The AI agent (…) wants to use "…"", so connect with "Connect", and then ask the agent again.
- SQL run by agents is kept in the query history with a robot icon and an "AI" mark (10.1 Query history). You can also see it under "Recent Queries by Agents" on the page.
- SQL that an agent puts into a data tab is never run automatically. Above the SQL pane, DBVisor shows "This SQL was written by the AI agent (…). Review it before you run it."
Functions that act outside the transaction (functions that end other sessions, autonomous transaction functions on Oracle and so on) cannot be stopped. The surest way is to give agents connections whose user has read privileges only.
#Prompts and table definitions
DBVisor also gives agents ready-made prompts (MCP prompts) and table definitions (MCP resources).
| Prompt | What it does | How to call it (examples) |
|---|---|---|
| fix_sql_error | Reads the SQL and the error in the open data tab or .sql file, and puts the fixed SQL into a data tab |
Chat in VS Code: /mcp.dbvisor.fix_sql_error, Claude Code: /mcp__dbvisor__fix_sql_error |
| review_query_performance | Examines the execution plan and indexes of the SQL, and suggests how to make it faster (fixed SQL goes into a data tab) | Chat in VS Code: /mcp.dbvisor.review_query_performance |
- How you call them differs by agent. Type
/in the chat to see the prompts you can use. - Table definitions can be read at
dbvisor://(connection name or ID)/tables/(table name). In VS Code, you can view them with the command "MCP: Browse Resources...".
#Turning off the integration
Choose "Turn Off the Integration" on the page, or set dbvisor.agent.enabled to false. While it is off, the DBVisor tools do not appear in the chat in VS Code, and agents in the terminal cannot connect.
#10.10 Working with SQL in source code
While you write application source code (Java, Kotlin, C#, JavaScript, TypeScript, Python, Go, PHP), you can try the SQL in the code as it is, bring SQL that you tried in DBVisor back into the code and check the definitions of tables and columns. DBVisor only reads your code and does not rewrite it (except when you choose to paste).
#Running SQL in code
The following buttons appear above SQL strings (strings that start with SELECT ... FROM, INSERT INTO, UPDATE ... SET, DELETE FROM, WITH ... AS ( and so on).
| Button | What it does |
|---|---|
| ▷ Run SQL | Opens the SQL in a new data tab and runs it. The tab title is "file name:line" |
| Open in Data Tab | Opens the SQL in a data tab without running it. Use it when you want to edit the SQL before you run it |
| (Connection name) | The connection that runs the SQL in this file. Select it to change it. If you have not chosen one yet, it shows "Select Connection" |

String sql = "SELECT id, name FROM customers " +
"WHERE prefecture = ? AND status = " + status;
In this example, the two strings are joined and treated as one SQL statement. The data tab gets the following SQL, and the parameter form asks for the values of p1 and status.
SELECT id, name FROM customers
WHERE prefecture = :p1 AND status = :status

DBVisor reads string concatenation (
+,.in PHP, adjacent strings in Python), Java text blocks, C# verbatim and raw strings, Kotlin and Python triple-quoted strings, JavaScript template literals, Go raw strings and PHP heredocs.appendcalls on aStringBuilder(AppendLineadds a line break) andsql += "..."are also joined into one when they are written one after another.Placeholders in the code become DBVisor parameters (
:name) (7.3 SQL with parameters).In code In the data tab ?(JDBC and others):p1,:p2, … (in order of appearance)$1(node-postgres, pgx),?1(JPA),:1(Oracle):p1#{name},${name}(MyBatis):name@name(SQL Server, .NET):name(variables declared withDECLARE, and names such as@@ROWCOUNT, stay as they are)%s,%(name)s(Python):p1,:nameEmbedded values ( ${user.id},{user_id}in an f-string,+ status +)The name of the value ( :id,:user_id,:status;getName()becomes:name)If a value is embedded with quotes around it, as in
'${name}', the quotes become part of the parameter too. A value embedded in part of a string, as inLIKE '%${word}%', cannot become a parameter, so it stays as{word}, and a notice above the data tab tells you to rewrite it.Above the data tab, DBVisor shows which file and line the SQL comes from and how the placeholders were changed. Edits in the data tab are not written back to the code.
DBVisor remembers the connection for each file. For a file where you have not chosen one yet, it uses the connection you chose last in this workspace (the button shows the connection name). For a production connection, "PROD" appears after the name. The confirmations before running (risky statements, production connections) work the same as when you run SQL in a data tab.
The "DBVisor" item in the context menu also has "Run SQL in String", "Open SQL in String in Data Tab", "Copy SQL in String" and "Select Connection for SQL in Code". Place the cursor in an SQL string and choose one. For strings without buttons (those that do not start with
SELECTand the like), select the code that builds the SQL before you choose the command, and DBVisor uses the strings in the selection.If you do not want the buttons, set
dbvisor.code.codeLenstofalse.
#Copying and pasting SQL as code
Turn SQL that you tried in a data tab into a string for your code.
Right-click in the SQL pane of a data tab and choose "Copy SQL as Code..." (it uses the selected part if there is one, otherwise all of the SQL). You can also choose it from the context menu of a
.sqlfile (the statement at the cursor) and with "Copy as Code..." in the context menu of the query history and saved queries.Choose the language and the string style. The one you chose last time comes first.
Style Example Java: text block (Java 15 or later) Several lines in """Java: concatenated strings "SELECT ... " +on each lineKotlin: raw string """…""".trimIndent()C#: raw string literal (C# 11 or later), verbatim string Several lines in """,@"..."JavaScript / TypeScript: template literal `...`Python: triple-quoted string Several lines in """Go: raw string `...`PHP: nowdoc (PHP 7.3 or later) <<<'SQL'…SQLIf the SQL has parameters (
:name), choose how to write them in the code: keep:name(JPA, Spring, PDO and others),?(JDBC, MySQL, SQLite),$1(node-postgres, pgx),@name(SQL Server, .NET),#{name}(MyBatis) or%(name)s(Python). The styles common in the language come first.Paste the copied string into your code.
To paste directly in a code editor, copy the SQL, right-click where the SQL should go in the code and choose "DBVisor" > "Paste SQL as Code". DBVisor pastes it in the style of the file's language, indented to match the cursor line (for languages with only one style, it does not ask).
#Pasting SQL from code
Copy a string from code (such as "SELECT ..." + "..."), right-click in the SQL pane of a data tab and choose "Paste SQL from Code". DBVisor pastes the SQL made by joining the strings. Placeholders become parameters as in the table above. You can also choose it from the context menu of a .sql file and from the Command Palette. If what you copied is already SQL, it is pasted as it is.
#Viewing table and column definitions
In .sql files and in SQL strings in code, hover over a table or column name to see its definition.
- Tables and views: the list of columns (type,
NOT NULL, primary key mark, logical name) and the table comment - Columns: the type,
NOT NULL, whether it is in the primary key, what its foreign key refers to, the logical name and which table it belongs to - Links: "Open Data" (opens it in a data tab), "Show DDL" and "Show in Tree" (selects it in the connection tree). For tables, they appear above the list of columns; for columns, at the end

Aliases (o.amount with FROM orders o) and qualified names (sales.orders) are also recognized. For .sql files, the definitions come from the connection selected in the Status Bar; for code, from the connection for SQL in code (the connection on the buttons above). As with completion, definitions appear only for connections that are connected or that have a saved password (and do not use an SSH tunnel). Hovering never asks for a password. If you do not want the definitions, set dbvisor.editor.hover to false.
#11. Safeguards against mistakes
DBVisor has several safeguards against unintended changes.
| Safeguard | What it does |
|---|---|
| Confirmation before running | Asks for confirmation before running UPDATE and DELETE without WHERE, DROP, TRUNCATE and ALTER (setting dbvisor.safety.confirmDangerousStatements) |
| Confirmation on production connections | On connections whose environment is "Production", asks for confirmation before every statement that changes data or schema (setting dbvisor.safety.confirmAllWritesOnProduction) |
| Color coding | Production is shown in red and staging in yellow, in the tree, in data tabs (the toolbar and the tab icon) and in the Status Bar |
| Read-only connections | Statements that change anything are not run, and the result table cannot be edited. On PostgreSQL, MySQL and MariaDB, the database itself also refuses changes |
| Showing the SQL before applying | When you edit the result table, drop or rename objects from the tree, or use the table designer, DBVisor shows the SQL before it runs it |
| Manual commit | You can check before you commit. If you close a tab or disconnect while there are uncommitted changes, DBVisor asks what to do |
| AI agents | Read statements run in a read-only transaction and are rolled back. Statements that change data are allowed only on "Write data" connections, and DBVisor asks you before they run (on development connections, you can skip the confirmations for adding, updating and deleting data for 30 minutes). Production connections are not available to agents by default, and DBVisor asks before sharing data (10.9 Connect AI Agents) |

What needs confirmation is decided by a simple analysis of the SQL. Changes made inside functions or procedures and the like cannot be detected. For a database that really must not be changed, connect with a user that has read privileges only.
#12. Settings
To change settings, open the VS Code Settings (Ctrl+,) and search for "dbvisor".
| Category | Setting | Default | Description |
|---|---|---|---|
| Connection tree | dbvisor.explorer.showSystemObjects |
false |
Shows system schemas, template databases and built-in roles |
| Connection tree | dbvisor.explorer.showRowCounts |
true |
Shows the estimated number of rows next to tables |
| Connection tree | dbvisor.explorer.autoReveal |
true |
Selects the table of the active data tab in the tree (for other tabs, the database or the connection) |
| Connection tree | dbvisor.explorer.defaultSchemaShortcut |
true |
Shows the default schema, opened, right under the connection, and puts everything else under "All Databases and Schemas" |
| Running | dbvisor.query.fetchSize |
500 |
Number of rows to load at a time |
| Running | dbvisor.query.maxRowsInMemory |
100000 |
Maximum number of rows kept for one result |
| Running | dbvisor.query.timeoutSeconds |
0 |
Query timeout in seconds. 0 means no timeout |
| Running | dbvisor.query.stopOnError |
true |
When running several statements, stops at the first error and does not run the rest |
| Safety | dbvisor.safety.confirmDangerousStatements |
true |
Asks for confirmation before risky statements |
| Safety | dbvisor.safety.confirmAllWritesOnProduction |
true |
On production connections, asks for confirmation before every statement that changes anything |
| Editor | dbvisor.editor.codeLens |
true |
Shows "Run" above each statement in .sql files |
| Editor | dbvisor.editor.hover |
true |
Shows the definition when you hover over a table or column name in .sql files and in SQL strings in code |
| Source code | dbvisor.code.codeLens |
true |
Shows "Run SQL", "Open in Data Tab" and the connection above SQL strings in source code |
| Results | dbvisor.results.columnHeader |
name |
What the column headers show (name: physical names, comment: logical names, both: both) |
| Results | dbvisor.export.encoding |
utf8bom |
The encoding selected first when you export to CSV or TSV |
| History | dbvisor.history.maxEntries |
1000 |
Number of items kept in the query history. 0 turns off recording |
| Formatting | dbvisor.format.keywordCase |
upper |
Case of keywords when formatting (upper / lower / preserve) |
| Dumps | dbvisor.dump.pgDumpPath |
(empty) | Path of pg_dump. If empty, DBVisor looks for it on the PATH |
| Dumps | dbvisor.dump.mysqldumpPath |
(empty) | Path of mysqldump |
| Dumps | dbvisor.dump.mariadbDumpPath |
(empty) | Path of mariadb-dump. If empty, DBVisor uses mariadb-dump on the PATH, or mysqldump if that is not found |
| AI agents | dbvisor.agent.enabled |
true |
Lets AI agents use DBVisor connections through MCP |
| AI agents | dbvisor.agent.maxRows |
100 |
Maximum number of rows an agent gets from a query (up to 1,000) |
| AI agents | dbvisor.agent.maxCellLength |
200 |
Maximum number of characters of a value that an agent gets |
| AI agents | dbvisor.agent.timeoutSeconds |
30 |
Time limit, in seconds, of a query run by an agent |
| AI agents | dbvisor.agent.maskedColumns |
["*password*", "*passwd*", "*secret*", "*token*"] |
Names of columns whose values become *** (* matches any characters) |
You can change the colors of the icons in the tree and the result screens with the VS Code setting workbench.colorCustomizations (see "Icon colors" in Managing connections).
#13. Keyboard shortcuts
#13.1 Writing SQL
| Action | Data tab | .sql file |
|---|---|---|
| Run the statement at the cursor (or the selection) | Ctrl+Enter |
Ctrl+Enter |
| Run all statements | Ctrl+Shift+Enter |
Ctrl+Shift+Enter |
| Format the SQL | Shift+Alt+F |
Shift+Alt+F (Format Document) |
| Show completion suggestions | Ctrl+Space |
Ctrl+Space |
| Undo, find | Ctrl+Z, Ctrl+F |
Same as the VS Code editor |
You can also move the border between the SQL pane and the results of a data tab by focusing the border and pressing the up and down arrow keys.
#13.2 Result table
| Action | Keys |
|---|---|
| Move between cells | Arrow keys, Tab (to the right) |
| Extend the selection | Shift + arrow keys (when rows are selected, Shift + ↑ / ↓ extends the range of rows) |
| Select all | Ctrl+A |
| Copy, copy with column names | Ctrl+C, Ctrl+Shift+C |
| Paste, paste as new rows | Ctrl+V, Ctrl+Shift+V |
| Start editing | Enter, F2 |
| Confirm the edit | Enter (moves down), Tab (moves right) |
| Cancel the edit | Esc |
| Set to NULL (deletes the rows when rows are selected) | Delete |
| Show the context menu | Menu key, Shift+F10 |
| Find in the results | Ctrl+F (in the search box, Enter: next, Shift+Enter: previous, Esc: close) |
| Go to the next / previous match (even after the search box is closed) | F3, Shift+F3 |
| Go to the previous / next row in record view | Alt+↑, Alt+↓ |
| Change the column width (with the focus on the right edge of a column header) | ←, → (with Shift for larger steps) |
#13.3 Connection tree and query history
When a tree has the focus, keys work on the focused item (the item you moved to with the arrow keys; right-clicking an item also moves the focus to it).
| Key | Connection tree | Query history |
|---|---|---|
F2 |
Rename (objects, connections, connection folders, saved queries) | ― |
Delete (Cmd+Backspace on macOS) |
Delete (objects, connections, saved queries). DBVisor asks you first | Remove from the history |
Ctrl+C |
Copy the name (objects), copy the SQL (saved queries) | Copy the SQL |
Ctrl+Enter |
Open Data (tables, views), New Query (connections, databases, schemas), Open in New Query (saved queries) | ― |
F12 |
Show DDL | ― |
Enter |
Expand / collapse (saved queries open in a new query) | Open in a new query |
- For items that cannot be renamed or deleted, the Status Bar says so.
- When several items are selected and the focused item is one of them, the key works on all the selected items (
F2works only on the focused item; 6.9 Working with several items at once and dragging). - You can also use the keys common to VS Code trees (
→←to expand and collapse,Shift+ ↑ / ↓ to extend the selection, typing to find items and so on).
#13.4 Other
| Where | Action | Keys |
|---|---|---|
| Parameter input | Run, cancel | Enter, Esc |
| Column filter, WHERE box | Apply | Enter |
| ER diagram | Zoom in and out | Ctrl + mouse wheel |
#14. Troubleshooting
#14.1 Cannot connect
| Symptom | What to check |
|---|---|
| DBVisor shows what happened | When a connection fails, DBVisor shows what happened (the connection was refused, the host name was not found, there was no response, the password is wrong, the database does not exist and so on) and what to check, both in the test connection of the form and in the notification from the tree ("Show Details"). Start by checking what it says |
| It takes a long time and then fails | Check the host name and port, the firewall and the VPN. For databases behind a bastion server, use an SSH tunnel. You can make the wait longer with "Connection timeout (seconds)" under "More Settings" in the connection form |
| Authentication fails | Check the user name and password. If you changed the password, choose "Re-enter Password" in the notification, or edit the connection and enter it again. On SQL Server, the same "Login failed" also appears when the database does not exist or the user cannot open that database |
| You want to connect to a named instance of SQL Server | host\instance name is not supported. Specify the port number of the instance |
| You cannot connect to Oracle | Enter the PDB service name (such as XEPDB1) in "Service name". SIDs are not supported. For TCPS, specify the TCPS port (often 2484), and leave the CA certificate file empty |
| DBVisor does not connect to the SSH server | If the host key differs from the key in ~/.ssh/known_hosts, DBVisor does not connect. Ask the administrator whether the key was changed, then fix known_hosts |
| You get an SSL error | On PostgreSQL, MySQL and MariaDB, if the server uses a self-signed certificate, choose "Require" (does not verify the certificate), or specify a CA certificate file. Oracle does not support CA certificate files, so connect without SSL or use an SSH tunnel |
| The SQLite file is not found | A relative path is relative to the (first) folder of the workspace. To create a new file, turn on "Create the database file if it does not exist" |
| "The file is not a SQLite database" appears | Check that the file you specified is a SQLite database (encrypted databases cannot be opened) |
| "The database file is locked by another connection" appears | A manual-commit transaction in another tab, or another program, is writing to it. End it with a commit or rollback, then run your statement again |
#14.2 Connections or objects do not appear
| Symptom | What to check |
|---|---|
| Workspace connections do not appear | Check that you trust the workspace. If .vscode/dbvisor.json has a format error, the reason appears under "DBVisor" in the Output panel |
| System schemas do not appear | Turn on the setting dbvisor.explorer.showSystemObjects |
| "Users" on MySQL shows an error | You need the privilege to read mysql.user |
| Your changes do not appear in the tree | Choose "Refresh" in the item's context menu, or "Refresh" at the top of the view |
#14.3 Cannot edit results
| Symptom | What to check |
|---|---|
| "Apply" and the editing buttons on the toolbar do not appear | Results with columns from several tables, and results of views, cannot be edited. Use "Open (table)" above the table, or "Open Data" on the table. Results on read-only connections cannot be edited either (you can clear the setting with "Edit Connection" above the table) |
| You can only add rows | The result does not include the key columns (the primary key, or a NOT NULL unique key). Include the key columns in the SELECT, or use "Open (table)" above the table. For tables without a key, you can only add rows (if you set a virtual key, you can also change and delete rows) |
| You cannot edit on Oracle | On Oracle, only simple SELECTs on one table can be edited |
| Applying fails with an error | A constraint was violated, or someone else changed the data. Read the message, fix the problem and apply again (your changes on the screen are still there) |
| You cannot apply because there are cells with a yellow frame | They are unique key columns on new rows that need a value. Enter values |
#14.4 Cannot sort or filter
- You have changes that you have not applied yet. Apply or discard them first.
- Only results of read statements (
SELECT,WITHand so on) can be sorted and filtered. - On SQL Server, results with unnamed columns (such as
COUNT(*)) or duplicate column names, and statements that start withWITH, are not supported. On Oracle, results with duplicate column names are not supported. Give the columns aliases.
#14.5 Completion suggestions do not appear
- In
.sqlfiles, only keywords appear unless you select a connection in the Status Bar. - For connections without a saved password and connections that use an SSH tunnel, DBVisor does not connect while you type. Run a query once, or expand the tree to connect, and the suggestions appear.
- If a table you just created does not appear, choose "Refresh" in the tree.
#14.6 Files and text encoding
| Symptom | What to check |
|---|---|
| An exported CSV shows garbled characters in Excel | Export it again with the encoding "UTF-8 with BOM" |
| Characters are garbled in CSV import | Change the encoding to Shift_JIS or another encoding |
| Not all rows are shown | One result keeps up to 100,000 rows. To get all rows, use "Export..." |
| The dump command is not found | Install pg_dump or the other command, or specify its path with a setting such as dbvisor.dump.pgDumpPath. Use a pg_dump of the same or a newer version than the server |
| The screens appear in English | To show them in Japanese, set the display language of VS Code to Japanese (2.4 Display language) |
#14.7 Transactions
- "In Transaction" does not go away: In manual commit, it stays until you end the transaction with a commit or rollback. Even when you run DDL on Oracle, MySQL or MariaDB and it is committed, the display goes away only with a commit or rollback.
- A confirmation appears when you close a tab: There are uncommitted changes. Choose whether to commit or roll back. If you dismiss the confirmation, DBVisor rolls back.
- On PostgreSQL, every statement fails after an error: When an error occurs in the middle of a transaction, PostgreSQL fails all later statements until you roll back. Roll back and start over.
#14.8 AI agents cannot connect or do not work
- An agent in the terminal answers "DBVisor is not running in VS Code": Check that the folder where you started the agent is open in VS Code. Start the agent again inside a folder that is open in VS Code.
- It answers "Several VS Code windows run DBVisor": Several windows use DBVisor, and none of them has the folder where you started the agent open. Start the agent in a folder that is open in the window you want to use.
nodeis not found: Agents in the terminal need Node.js. Install Node.js, and open the terminal again.- The DBVisor tools do not appear in the chat in VS Code: If the harness is "Local", choose "Agent" and check in "Configure Tools..." that DBVisor is on. If you choose "DBVisor" with the command "MCP: List Servers", you get "Start Server" and "Show Output" (the log). If the Connect AI Agents page says "The AI agent integration is turned off.", choose "Turn On".
- A connection does not appear in the list: The connection is set to "Not allowed" (production connections are by default). Change it on the Connect AI Agents page or in the connection form.
- It answers "the connection needs a password": The connection has no saved password. Choose "Connect" in the notification that VS Code shows, or connect in the connection tree, and then ask again.
- It answers "allows only structure only": The connection is set to "Structure only". To let the agent read data, change it to "Read data".
- An error occurs after you reload the window: Ask again, and the agent reconnects to the new window.
#14.9 "Run SQL" or definitions do not appear for SQL in source code
- The buttons do not appear: Check that the file is in a supported language (Java, Kotlin, C#, JavaScript, TypeScript, Python, Go, PHP), and that the string starts with
SELECT ... FROM,INSERT INTO,UPDATE ... SET,DELETE FROM,WITH ... AS (or the like. To tell SQL apart from English text such asSelect a file, a string where only the first letter is uppercase, likeSelect, also needs*,=,,,(or an uppercaseFROMor similar. For strings without buttons, select the code that builds the SQL, and then choose "DBVisor" > "Run SQL in String" in the context menu. If the settingdbvisor.code.codeLensisfalse, the buttons do not appear. - The SQL ran on the wrong connection: Select the connection name on the buttons to change it. DBVisor remembers it for each file.
- Definitions do not appear: For connections that are not connected, have no saved password or use an SSH tunnel, hovering alone does not connect. Connect in the tree first, then hover. In
.sqlfiles, check that a connection is selected in the Status Bar. If a table you just created does not appear, choose "Refresh" in the tree. - The parameter names are hard to understand:
?becomes:p1,:p2and so on in order of appearance. You may rename them in the data tab.
#14.10 If the problem persists
- In the Output panel (
Ctrl+Shift+U), select "DBVisor" to see records such as mistakes in connection settings. - You can copy an error message with "Copy" on the error in the results. Include it when you ask for help.
#15. FAQ
Q. Where are passwords stored?
A. In VS Code's SecretStorage (such as the OS keychain). They are not written to .vscode/dbvisor.json or to settings files.
Q. Can I share connections with my team?
A. If you save a connection to "Workspace", it is written to .vscode/dbvisor.json. You can share this file with Git. Each person enters their own password.
Q. Is the query history synced with other computers? A. No. The history is stored only on this computer. The values you enter for parameters are not kept either.
Q. How do I avoid changing a production database by mistake? A. Set the connection's environment to "Production", and DBVisor always asks for confirmation before statements that change anything. If you also turn on "Read-only", statements that change anything are not run. To be completely safe, connect with a user that has read privileges only (11. Safeguards against mistakes).
Q. When should I use a data tab, and when a .sql file?
A. Data tabs are handy for looking at table contents, trying a quick query or editing results on the spot. Use .sql files when you want to keep SQL as files or share it with your team.
Q. Can I export results to an Excel file (.xlsx)? A. Yes. Choose Excel in "Export..." on the results (8.5 Exporting to files). To keep the results of several statements together, use "Run and Export to Excel" (7.9 Running and exporting to Excel). To keep a comparison of results, use "Export to Excel" on the comparison (8.6 Comparing results).
Q. Can I edit tables without a primary key? A. You can add rows as they are. To change and delete rows, set columns that identify a row as a "virtual key" (9.6 Editing tables without a primary key (virtual keys)).
Q. There are so many tables that browsing the tree is hard. A. Use the magnifying glass ("Find Object...") at the top of the Connections view, and type part of a table name, column name, schema or logical name (6.8 Finding objects by name).
Q. A process does not finish, and it seems to be waiting for someone else's update. A. Right-click the connection and choose "Show Sessions" to see the running statements and the sessions that are waiting for locks (Blocked by). If needed, you can cancel or terminate them right there (10.8 Session manager).
Q. Can I drag table and column names into a data tab?
A. Not by dragging (this is a VS Code limitation). Use "Insert into Editor" in the context menu of the tree item, or copy with Ctrl+C and paste. You can drag them into .sql files (6.9 Working with several items at once and dragging).
Q. Can I use SQLite? A. Yes. Open the database file (5.8 Opening a SQLite database file).
Q. Can I use Windows authentication for SQL Server, or MongoDB? A. Not at the moment. The supported databases and authentication methods are those in 1.2 Requirements.
Q. Is the data in my database sent to AI agents? A. Only what an agent reads (query results and SQL in the editor) on the connections you allow is sent through the agent to its AI service. DBVisor itself sends nothing to any AI service. DBVisor asks you the first time an agent reads data from a connection, and production connections are not available to agents by default. Passwords and host names are never passed on (10.9 Connect AI Agents).
Q. Can AI agents change data? A. Only on connections where you chose "Write data". When an agent tries to run a statement that changes data or schema, DBVisor asks you before each statement (10.9 Connect AI Agents). On other connections, agents put SQL that changes data into a data tab, and you check it and run it.
Q. Can I use connection settings from other tools? A. You can paste a connection string or URL (JDBC URLs too) to fill in the connection form (5.7 Filling in the form from a connection string).
#16. Glossary
| Term | Meaning |
|---|---|
| Connection tree | The tree of connections and database contents shown in the Connections view |
| Data tab | A tab with the SQL pane at the top and the result table at the bottom |
| SQL pane | The upper part of a data tab, where you write SQL |
| Results panel | The panel that shows the results beside the editor when you run SQL from a .sql file |
| Result table | The table that shows a result set. It can be edited when certain conditions are met |
| Record view | A way of showing one row as a vertical list of column names and values |
| Physical name, logical name | The physical name is the name of a column or table; the logical name is the first line of its comment |
| Apply | Writing the changes you made in the result table to the database |
| Auto-commit, manual commit | The switch between committing each statement right away and committing nothing until you commit |
| Environment | What a connection is used for (development, staging, production). It changes the colors and the confirmations |
| Read-only | A connection setting that keeps statements that change data or schema from running |
| Base | In a comparison of results, the result used as the reference |
| Workspace | The folder open in VS Code, where .vscode/dbvisor.json is placed |
| DDL | SQL that creates or changes the structure of tables and other objects (CREATE, ALTER, DROP and so on) |
| CodeLens | The "Run" shown above each statement in .sql files |
| Unique key | Columns whose values are guaranteed not to repeat (primary keys, unique constraints, unique indexes) |
| Virtual key | Columns that you choose to identify rows in a table without a primary key. Nothing is created in the database |
| Connection string | The connection information (host, port, database, user and so on) written on one line. Forms include URLs such as postgresql://... and strings such as Server=...;Database=... |
| AI agent | An AI assistant that takes your requests and does the work using tools. Examples include the agent mode of the chat in VS Code, Claude Code and Codex |
| MCP | Model Context Protocol. A standard for AI agents to use outside tools. DBVisor works as an MCP server and gives agents tools that use your connections |
#Appendix A. Moving from A5:SQL Mk-2
This table shows how commonly used features of A5:SQL Mk-2, a database tool widely used in Japan, map to operations in DBVisor.
| A5:SQL Mk-2 feature | In DBVisor |
|---|---|
| Table editor (open a table and edit it) | Open the table with "Open Data", edit it in the result table and choose "Apply" (9. Editing data) |
| Opening a table with conditions | Open the data, then use the "WHERE" box on the toolbar or the column filters (8.3 Sorting and filtering) |
| SQL editor (running, completion, formatting) | A data tab or a .sql file (Ctrl+Enter, Ctrl+Space, Shift+Alt+F) |
| SQL parameters | SQL with parameters (:name) (7.3 SQL with parameters) |
| Comparing SQL results | Comparing results (8.6 Comparing results) |
| SQL history | Query history (10.1 Query history) |
| Export to Excel | Choose Excel when exporting results (8.5 Exporting to files) |
| Collecting SQL results in Excel (as test evidence) | Run and Export to Excel (7.9 Running and exporting to Excel) |
| Copying records (as INSERT or UPDATE statements) | "Copy as INSERT Statements" and "Copy as UPDATE Statements" in the context menu of the table (8.10 Copying rows as SQL statements) |
| Automatic SQL generation (templates for SELECT, INSERT and so on) | "Generate SQL..." in the context menu of a table (6.7 Generating SQL templates) |
| Editing tables without a primary key | Set a virtual key (9.6 Editing tables without a primary key (virtual keys)) |
| Searching tables and columns (by name or comment) | Find Object (6.8 Finding objects by name) |
| Dragging table and column names (into the SQL editor) | Drag into a .sql file, use "Insert into Editor" for data tabs, or copy the names of several columns at once (6.9 Working with several items at once and dragging) |
| Pasting from Excel | Copy a table whose columns are in the same order as the table, and paste it into the result table (9.4 Pasting rows) |
| Changing table definitions | Edit Table Structure (6.5 The table designer) |
| Creating table definition documents | Export Table Definitions (10.4 Table definition documents) |
| Reverse-engineering ER diagrams | Show ER Diagram (viewing and saving as an image; the diagram cannot be edited) (10.3 ER diagrams) |
| Creating dummy data for tests | Generate Test Data (10.6 Generating test data) |
| CSV import and export | Import CSV, and exporting results (10.5 CSV import, 8.5 Exporting to files) |
| Execution plans | Execution plans (estimated, and run and measured) (7.8 Execution plans) |
| Read-only edition | "Read-only" for each connection (5.5 Environments and read-only connections) |
The SQL designer and editing ER diagrams are not available at the moment.
#Appendix B. Related documents
| Document | Contents |
|---|---|
| Managing connections | All fields of the connection form, filling in from a connection string, SQLite files, SSL modes, how to write .vscode/dbvisor.json, the structure and operations of the connection tree, the table designer, ER diagrams, dumps and table definition documents |
| Running queries | Data tabs and .sql files, parameters, transactions, history, execution plans, completion, formatting, statement separators for each database and working with results |
| Editing table data | Conditions for editable results, editing operations, pasting, applying, virtual keys, CSV import and test data generation |
| CHANGELOG.md | Changes in each version |