Repository navigation
Advanced: Sqlite
- .SQLITE - (Hidden developer/debugging command): Built-in SQLite Shell
-
Overview:
.sqlitelaunches a small, self-contained interactive SQLite shell built directly into DBRepair, using the exact same statically-linked SQLite/ICU build the rest of the tool uses. It always starts connected to a scratch in-memory database; use.opento connect to a real file. Useful for inspecting database state directly (checking FTS index health, row counts, schema, or running ad-hoc SQL) without needing a separate SQLite binary that understands Plex's ICU collation/tokenizer. -
Availability: Must be typed in full. It is not part of the numbered menu and does not appear in
Show. -
Dot-commands available inside the shell:
-
.bail on|off - Stop (nonzero exit) on the first statement error.
Off by default.
.close - Close the active connection; reports whether the
handle actually cleared.
.dbinfo - Show page size, page count, encoding, and
auto_vacuum mode.
.echo on|off - Print each statement's SQL text before its
output. Off by default.
.exit / .quit - Leave the shell.
.ftsinfo <table> - Show row counts for an FTS4 table's shadow
tables (_content/_segments/_segdir/_docsize/_stat).
.indexes [pattern] - List indexes, optionally filtered by table
name pattern.
.open [--readonly|--readwrite|--create] <file>
- Close the current connection and open <file>.
Opens READ-ONLY by default (unlike sqlite3).
--readwrite and --create are required to open
read-write; they behave identically
(read-write, create if missing). --readonly is
accepted but is already the default. Also accepts
the short forms RO/RW/CREATE.
.schema [pattern] - Show CREATE statements, optionally filtered
by name pattern.
.slots - List the 4-slot connection pool: which slot is
active, its path, and open/closed state.
.tables [pattern] - List tables/views, optionally filtered by
name pattern.
Any other input is treated as SQL and executed against the active connection.
- Example: Checking FTS health from the command line without a separate SQLite build:
./DBRepair .sqlite
sqlite> .open /path/to/com.plexapp.plugins.library.db
sqlite> .ftsinfo fts4_metadata_titles_icu
Documentation for DBRepair v26.10.00
DBRepair is proprietary software. Copyright: @ChuckPA 2022-2026 All Rights Reserved.
Use at own risk! This tool is not associated with Plex Inc.