Why do I get sqlite error, “unable to open database file”?

Aha, just stumbled across an article explaining this. Also Django have info on their NewbieMistakes page. The solution is to make sure the directory containing the database file also has write access allowed to the process. In my case, running this command fixed the problem: sudo chown www-data .

Creating stored procedure and SQLite?

SQLite has had to sacrifice other characteristics that some people find useful, such as high concurrency, fine-grained access control, a rich set of built-in functions, stored procedures, esoteric SQL language features, XML and/or Java extensions, tera- or peta-byte scalability, and so forth Source : Appropriate Uses For SQLite

How to get a list of column names on Sqlite3 database?

I want to migrate my iPhone app to a new database version. Since I don’t have some version saved, I need to check if certain column names exist. This Stackoverflow entry suggests doing the select and parse the result. Is that the common way? Alternatives?

How do I unlock a SQLite database?

In windows you can try this program http://www.nirsoft.net/utils/opened_files_view.html to find out the process is handling db file. Try closed that program for unlock database In Linux and macOS you can do something similar, for example, if your locked file is development.db: $ fuser development.db This command will show what process is locking the file: > … Read more

OperationalError: database is locked

From django doc: SQLite is meant to be a lightweight database, and thus can’t support a high level of concurrency. OperationalError: database is locked errors indicate that your application is experiencing more concurrency than sqlite can handle in default configuration. This error means that one thread or process has an exclusive lock on the database … Read more