My Oracle Support Banner

How To Fix Message "SQLiteDatabaseLockedException: Database Is Locked" With a Sqlite Database (Doc ID 1471080.1)

Last updated on MAY 15, 2018

Applies to:

Oracle Database Mobile Server - Version 11.1.0.0.0 and later
Information in this document applies to any platform.

Goal

This happens when another thread is accessing the database.

The lock is there to avoid corruption in the database.

The recommended way to do it, is to hold on to one database connection through one SqliteOpenHelper.

See: http://stackoverflow.com/questions/2493331/what-are-the-best-practices-for-sqlite-on-android
See: http://touchlabblog.tumblr.com/post/24474398246/android-sqlite-locking

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.