I think you're trying to use DuckDB incorrectly. If you have a writer connection open to the DB, you can't open reader connections as well (including from IntelliJ). You'll get file lock errors, as you noticed. You can either have a single writer connection at once, or multiple reader connections at once. DuckDB is significantly better than SQLite for analytical queries on big data sets, but it's not a replacement for a transactional database such as SQLite.