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

Last updated on SEPTEMBER 21, 2016

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

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 hundreds of Community platforms