Database is locked Query

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Database is locked Query

Gaurav Patole
Hello,

I have a database file placed onto a NTFS LAN based local server.
Application's on different machines tries to access this database file and
update it frequently.

I am using Christian Werner's ODBC Driver. I am facing "Database is locked"
problem.

 

*         Is concurrency weak in SQlite?

*         Doesn't the lock get cleared when the application that locked it
crashes?

*         How do I explicitly clear the database from lock?

*         What is the full fledge solution for "database is locked"? Any
precaution's to be taken for multiple access to the database file?

 

 

Thanks,

Gaurav

Reply | Threaded
Open this post in threaded view
|

Re: Database is locked Query

Jay Sprenkle
On 9/29/05, Gaurav Patole <[hidden email]> wrote:
>
> Hello,
>
> I have a database file placed onto a NTFS LAN based local server.
> Application's on different machines tries to access this database file and
> update it frequently.



from: http://www.sqlite.org/cvstrac/wiki?p=WhenToUseSqlite

*Situations Where Another RDBMS May Work Better*

   - *Client/Server Applications*

   If you have many client programs access a common database over a
   network, you should consider using a client/server database engine instead
   of SQLite. SQLite will work over a network filesystem, but because of the
   latency associated with most network filesystems, performance will not be
   great. Also, the file locking logic of many network filesystems
   implementation contains bugs (on both Unix and windows). If file locking
   does not work like it should, it might be possible for two or more client
   programs to modify the same part of the same database at the same time,
   resulting in database corruption. Because this problem results from bugs in
   the underlying filesystem implementation, there is nothing SQLite can do to
   prevent it.

   A good rule of thumb is that you should avoid using SQLite in
   situations where the same database will be accessed simultaneously from many
   computers over a network filesystem.