Monday, October 10, 2022

[SOLVED] can't access db tables from dbeaver ([SQLLITE_BUSY] database file is locked (database is locked))

Issue

First of all, I realize similar questions have been asked but none of them seem to have the same problem and I can't find a solution.

I can create tables and do write/read operations perfectly well within python accessing my SQLlite database. However, when trying to access the database through dbeaver I get the following issues:

  1. First, when trying to connect to the db file, it asks me "A file named database.db already exists. Do you want to replace it?"

  2. When trying to look at the tables via GUI it loads for a couple of seconds before showing an error

error

I have not found a way to solve this issue. Has anyone experience with this and a solution?

EDIT: I want to add what sqllite has to say about the given error: https://www.sqlite.org/rescode.html#busy

It states that the error occurs "because of concurrent activity by some other database connection". I don't know where this concurrent activity would come form though, as I'm closing everything and I'm just trying to look at the tables in the GUI. I think the issue has something to do with the first issue where it asks me if I want to replace the file.


Solution

Based on the previous comments, uninstall DBeaver snap

snap remove dbeaver-ce

and install using the .deb package from the official site

wget https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb
sudo apt install ./dbeaver-ce_latest_amd64.deb

this works for me.

all the credits to the previous comments =)



Answered By - Marcelo Lara
Answer Checked By - Pedro (WPSolving Volunteer)