.DB-SHM

DB-SHM File

SQLite Shared Memory File
Ask a question
QUICK ANSWER

A .db-shm file is a temporary SQLite index file created automatically when a database runs in WAL (Write-Ahead Logging) mode. It contains no user data and cannot be opened directly. Open the main .db file instead; SQLite manages the -shm file on its own. It is safe to delete only when the database is fully closed.

Developer: SQLite Development Team (D. Richard Hipp) Category: Database Files Open standard MIME: application/octet-stream
OPENS ON Windows macOS Linux Android
Related: .DB · .DBF · .ACCDB · .SQL

On this page

19k+ extensions indexed
Last reviewed Jul 26, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DB-SHM file format?

A .db-shm file is an ephemeral shared-memory index file created automatically by SQLite when a database operates in WAL (Write-Ahead Logging) mode. It exists alongside the main database file and its companion .db-wal file, together forming the three-file set that WAL mode requires.

The file is a fixed 32 KB in size and is memory-mapped by all SQLite connections sharing the same WAL-mode database. It stores WAL index headers and a hash table mapping WAL frame numbers to database page numbers, allowing readers to efficiently locate the latest version of each page without scanning the entire WAL file.

Unlike the main .db file, the .db-shm file stores no user data and is not portable across CPU architectures - its byte order matches the host machine. SQLite creates it automatically when the first connection opens a WAL-mode database and deletes it cleanly when the last connection closes. A leftover .db-shm file after a crash is safe to delete, provided the database is not currently open; SQLite recreates it on the next access.

In exclusive locking mode, SQLite uses heap memory instead, so no .db-shm file is written to disk. The file cannot be opened or interpreted meaningfully by any tool other than SQLite itself.

Security & safety

RISK: LOW

The .db-shm file itself contains no user data and cannot be meaningfully parsed. No executable content. The associated .db database file may contain sensitive personal data (messages, contacts, etc.) depending on the application. Deleting a stale -shm file (when database is closed) is safe; deleting it while the database is open may cause corruption.

Format details

in a nutshell
FULL NAMESQLite Shared Memory Fileaka SQLite WAL shared memory, SHM file
DEVELOPERSQLite Development Team (D. Richard Hipp)since 2010 (SQLite 3.7.0, WAL mode)
MIME TYPEapplication/octet-stream
TYPEbinary shared-memory index (ephemeral, OS-native byte order)
STANDARDOpen · royalty-free

Programs that open DB-SHM files

Windows2 apps
SQLite (command-line shell) Open-source Do NOT open .db-shm directly; open the main .db file with sqlite3 - SQLite manages -shm automatically.
DB Browser for SQLite Open-source Open the main .db file; DB Browser handles WAL/-shm transparently. Do not open -shm directly.
macOS1 app
DB Browser for SQLite Open-source Open the associated .db file; the tool reads -shm/-wal automatically.
Linux1 app
SQLite (command-line shell) Open-source Open the main .db file with sqlite3; -shm is managed automatically.
Android1 app
Google Android (OS) Free Android manages SQLite databases internally; -shm files appear in app data and are managed by the OS.

Technical details

deep spec
SQLite mode requiredWAL (Write-Ahead Logging) mode; not created in journal or exclusive locking mode
File sizeFixed 32 KB (one 32 KB block per lock region)
Byte orderHost machine native; not portable across CPU architectures
EncodingBinary (memory-mapped OS structures; not a standalone serialized format)
ContentWAL index headers and hash table mapping WAL frame numbers to database page numbers
User dataStores no user data; functions as a read-index of the companion .db-wal file
LifecycleAuto-created when first WAL-mode connection opens; auto-deleted on last clean close
Crash recoverySafe to delete manually if the database is not open; SQLite recreates it automatically
Companion filesAlways co-located with the .db main database and .db-wal write-ahead log
Crash safety mechanismDual-copy WAL index header; both copies checked for consistency on open
Exclusive locking modeSQLite uses heap memory instead; no .db-shm file is written to disk
MIME typeapplication/octet-stream (no dedicated MIME type)
Introduced withSQLite WAL mode, version 3.7.0 (July 2010)
PlatformAndroid, iOS, Windows, Linux, macOS
Released2010 (SQLite 3.7.0, WAL mode)
Latest versionSQLite 3.x (current; format tied to WAL implementation)
Open standardYes · royalty-free
Specificationwww.sqlite.org

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DB-SHM files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DB-SHM files.

Frequently asked questions

What is a .db-shm file?
A SQLite shared memory index file, automatically created when a SQLite database runs in WAL mode. It helps coordinate concurrent access and contains no user data.
Can I delete the .db-shm file?
Only if the associated database (.db) is completely closed. Deleting it while the database is in use can cause corruption. When the database is not open, deletion is safe - SQLite recreates it automatically.
Why do I have both .db, .db-shm, and .db-wal files?
This is WAL mode: the main .db file + a write-ahead log (.db-wal) + a shared memory index (.db-shm). All three together make one logical database.
How do I open a .db-shm file?
You don't open the -shm file directly. Open the main .db database file in DB Browser for SQLite or the sqlite3 command-line tool; SQLite manages the -shm automatically.
Is db-shm an Android-only file?
No. It's a standard SQLite feature (since 3.7.0, 2010) present on all platforms that use SQLite in WAL mode: Android, iOS, macOS, Windows, Linux.

References

1SQLite - WAL-mode File Format (walformat.html)www.sqlite.org
2SQLite - Write-Ahead Logging (wal.html)www.sqlite.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.BINCD/DVD Disc Image (BIN/CUE)
7.NOMEDIAAndroid No-Media Marker File
8.RPMSGRestricted Permission Message
9.MDMarkdown Document
10.TMPTemporary File

Related extensions

.DBSQLite Database File
.DBFDatabase File (dBASE / xBase table)
.ACCDBMicrosoft Access Database (2007+)
.SQLSQL Script (Structured Query Language source / database dump)
.MDBMicrosoft Access Database (97-2003, Jet engine)
.FDBFirebird Database

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z