[GRASS-dev] [GRASS GIS] #1358: WinGRASS 6.4.1: SQLite driver errors: `Unable to open database'
GRASS GIS
trac at osgeo.org
Tue Aug 21 12:57:44 PDT 2012
#1358: WinGRASS 6.4.1: SQLite driver errors: `Unable to open database'
-------------------------------------+--------------------------------------
Reporter: rvanderweide | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Database | Version: 6.4.1 RCs
Keywords: wingrass, SQLite driver | Platform: MSWindows 7
Cpu: x86-64 |
-------------------------------------+--------------------------------------
Changes (by mmetz):
* milestone: 6.4.2 => 6.4.3
Comment:
Replying to [comment:7 neteler]:
> Replying to [comment:6 glynn]:
> > Apparently, this can happen on Windows due to other programs scanning
files in the background, which prevents them from being replaced.
TortoiseSVN and Windows Search are common culprits. Use of "PRAGMA
journal_mode ..." has been suggested as a workaround.
>
> Any ideas how to implement this?
>
> http://www.sqlite.org/pragma.html#pragma_journal_mode
In this particular example, the import failed because of this 'feature' of
recent sqlite versions:
http://www.sqlite.org/lockingv3.html
"When SQLite creates a journal file on Unix, it opens the
directory that contains that file and calls fsync() on the
directory, in an effort to push the directory information to disk."
Here, both the shapefile to be imported and the sqlite database were in
the same folder. The OGR dsn/layer is opened first, then the sqlite db.
This fails because the OGR dsn/layer is still open because GRASS still
needs to read it. But this example is unusual and would not happen in a
standard GRASS mapset.
Anyway, I have changed the default location of the sqlite db in trunk
r52829 from $MAPSET/sqlite.db to $MAPSET/sqlite/sqlite.db, such that
sqlite, just like the dbf driver, gets its own exclusive directory. This
does however not solve the issues mentioned by Glynn but at least some
other issues I found with recent sqlite versions.
Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1358#comment:8>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list