Handle locked sqlite db.