.NET

Productivity Tools

OmniDB has a number of tools that save clicks and keystrokes. They work with every supported database unless noted otherwise, and anything that would change a database (a rename, a schema sync, a restore) is first shown to you as SQL — you run it yourself.

Finding things

Search everywhere. Press Shift twice to open the palette. It finds sections, connections, bookmarks, snippets and, for the selected connection, tables (from two typed characters) in one box, ignoring case and diacritics. The arrow keys move, Enter opens the pick (a table opens in Edit Data) and Esc closes it.

Bookmarks. Right-click a table in the tree and choose Add to bookmarks. The Bookmarks section in the left rail lists the pinned tables per connection; clicking one opens the connection (if it is not open yet) and the table in Edit Data, and the cross removes it. Bookmarks are private to each OmniDB user.

The left rail and connections

Navigation panel. Under Settings > Navigation panel you choose which items the rail on the left shows, put them in the order you like with the arrows and move the divider between its upper and lower part. The Settings icon is always last and cannot be hidden. Every change takes effect at once, without a reload, and is saved for your user.

Read-only connection. Tick it in the connection form and writes through that connection are refused; the Connections list, the Database tab and the connection menu show a lock. PostgreSQL, MySQL/MariaDB and SQLite also switch the session itself to read-only, and on every engine the query editor, the console and Edit Data refuse anything but SELECT-like statements. It is a safety net against accidents (the production tab left open), not a security boundary — use a database role without write privileges for a hard guarantee.

The SQL editor

Query results

Edit Data and importing

Dump, restore and running script files

Dump table (structure and data) to SQL file and Dump table (structure only) to SQL file (a table's Generate menu) write the table's DDL, followed by one INSERT per row, as an SQL file — no external program is needed. The Run an SQL script from a file (restore a dump) button in the query toolbar runs such a file (or any SQL script) statement by statement in one transaction, so a failing statement, named in the error, undoes the rest wherever the database has transactional DDL. Up to 48 MB and 1,000,000 statements; refused on a read-only connection.

Compare

The exchange button in the query toolbar compares the current connection with another one: either the schema (tables, columns and their types) or one table's rows by primary key. The result is a summary plus a script that makes the target match the source (CREATE TABLE, ADD COLUMN, type changes, INSERT/UPDATE for rows), opened in a tab of the target connection for you to read and run — comparing changes nothing. Destructive statements (DROP, row DELETE) are only written as comments unless you ask for deletes. Nullability, defaults, indexes and constraints are not compared.

Scheduled queries

The Scheduled queries section in the left rail runs SQL on a connection every N minutes (from 1 minute to a week). The schedules are listed on the left with a + / − footer; the selected one's settings — name, interval, SQL — are on the right, with Run now, Pause / Resume and its last 50 runs (status, duration and what each statement did, or the error it stopped on). The calendar button in the query toolbar saves the editor's SQL (the selection, else the whole text) as a new schedule. The scheduler lives in the OmniDB server process, so it runs only while OmniDB is open; a run that came due while it was closed happens once at the next start. Read-only connections still refuse writes, and connections that use an SSH tunnel or token authentication cannot be scheduled.

Version control (git)

The branch button under the snippets tree (and under the monitoring units list) keeps your shareable definitions in a git repository as plain files: snippets as .sql files in snippets/ (one directory per snippet folder), custom monitoring units as monitoring/<engine>/*.json and scheduled queries as schedules/<connection alias>/*.json (the alias and SQL only — never an address or a credential). Commit writes the files, removes the .sql/.json files that no longer match anything and commits them; Import from folder reads them back, creating or updating definitions and never deleting any. An imported schedule starts paused so nothing runs unattended.

Git runs inside OmniDB, so no git installation is needed. In the desktop app the repository lives in a folder inside OmniDB's own home until you pick another one with Choose folder… (remembered between launches). On macOS that built-in folder sits inside the app's container, which other programs cannot open — pick your own folder if you want to push the repository with your own git tools. On a multi-user server you type the folder's path and the feature is limited to superusers. Pushing and pulling are left to your own git tools.