SQL Editor & History
Write and execute read-only SQL queries in CodeMirror 6 with audited execution history and CSV export.
The SQL view provides a CodeMirror 6 editor with SQL syntax highlighting and schema-aware completions for the active connection.
Read-only execution
All queries run through DBVision's audited read-only execution layer:
- Only a single read-only
SELECT(orWITH ... SELECT) statement per request is accepted. - Write statements (
INSERT,UPDATE,DELETE,DDL), multi-statement batches, and NUL bytes are rejected. - On SQL Server, server cursors reject
FOR XML,FOR JSON, and stored procedure calls. If the SQL Server driver rejects a decimal outside its exact range, cast the value tovarcharin your query.
Results and CSV export
Query results render in a virtualized table below the editor. You can export query results to CSV directly from the results toolbar.
Execution history
DBVision records SQL executions in the metadata database for each user and connection:
- Executed SQL text (encrypted at rest when stored), duration, row count, and status.
- Records are retained for
DBVISION_EXECUTION_LOG_DAYSdays (default30, configurable from1to3650). - You can inspect past runs in the editor's history panel and load a previous query back into the editor.