[sqlite] SQL error: database is locked

2008-07-09 Thread Shain Lee
Hi

I am using sqlite in Fedora 9. Database created and done every thing perfectly. 
But when i going to test the DB via small transactions , inserting of records 
are failing.

SQL error: database is locked

DBD::SQLite::db commit failed: database is locked(5) at dbdimp.c line 218 at 
db_access.pl

what would be the reason , is it about a permission issue or coding issue ?
Please help

Many Thanks,
Shaine.


  __
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at 
Yahoo! http://uk.docs.yahoo.com/ymail/new.html
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL error: database is locked

2008-06-04 Thread M.Kursad DARA
Thanks 
I'll try.

-Original Message-
From: Mihai Limbasan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2008 4:29 PM
To: [EMAIL PROTECTED]; General Discussion of SQLite Database
Subject: Re: [sqlite] SQL error: database is locked


M.Kursad DARA wrote:
> Hi folks,
>  
> I want to move my sqlite db's to another location and wants to mount 
> on nfs.
>  
> when i try to select some data from my sqlitedb on nfs i'm getting 
> error
> below: 
>  
> SQL error: Database is locked.
>  
> What's is the solution.
>  
> Thanks.
>  
> ps : I googled but cant find exact solution.
>  
Hi there.

The SQLite FAQ entry #5 at http://sqlite.org/faq.html#q5 has this to
say:

SQLite uses reader/writer locks to control access to the database. [...]

*But use caution: this locking mechanism might not work correctly if the

database file is kept on an NFS filesystem.* This is because fcntl() 
file locking is broken on many NFS implementations. You should avoid 
putting SQLite database files on NFS if multiple processes might try to 
access the file at the same time.

So, basically, it's a "don't do that" situation. Try using CIFS sharing.

You could search for more mentions of NFS on sqlite.org by using Google 
this way:

http://www.google.com/search?q=nfs+site:sqlite.org

HTH

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL error: database is locked

2008-06-04 Thread Mihai Limbasan

M.Kursad DARA wrote:

Hi folks,
 
I want to move my sqlite db's to another location and wants to mount on

nfs.
 
when i try to select some data from my sqlitedb on nfs i'm getting error
below: 
 
SQL error: Database is locked.
 
What's is the solution.
 
Thanks.
 
ps : I googled but cant find exact solution.
 

Hi there.

The SQLite FAQ entry #5 at http://sqlite.org/faq.html#q5 has this to say:

SQLite uses reader/writer locks to control access to the database. [...] 
*But use caution: this locking mechanism might not work correctly if the 
database file is kept on an NFS filesystem.* This is because fcntl() 
file locking is broken on many NFS implementations. You should avoid 
putting SQLite database files on NFS if multiple processes might try to 
access the file at the same time.


So, basically, it's a "don't do that" situation. Try using CIFS sharing.

You could search for more mentions of NFS on sqlite.org by using Google 
this way:


http://www.google.com/search?q=nfs+site:sqlite.org

HTH
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQL error: database is locked

2008-06-04 Thread M.Kursad DARA
Hi folks,
 
I want to move my sqlite db's to another location and wants to mount on
nfs.
 
when i try to select some data from my sqlitedb on nfs i'm getting error
below: 
 
SQL error: Database is locked.
 
What's is the solution.
 
Thanks.
 
ps : I googled but cant find exact solution.
 
 
M.Kursad DARA
Sistem ve Uygulama Muhendisi
Tel : +90 212 365 95 08
  [EMAIL PROTECTED]
  http://www.mynet.com
 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Joe Wilson
On second thought, instead of -D__DJGPP__, comment out the following 
lines in src/os_unix.c instead:

/* #ifdef __DJGPP__ */
# define fcntl(A,B,C) 0 
/* #endif */

--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> I suspect file locking via fcntl() is not working in your embedded libc.
> 
> Try compiling the source code with -D__DJGPP__ which will make fcntl() a no 
> op.
> 
> - Or - if that fails try compiling with -DSQLITE_LOCK_TRACE -DSQLITE_DEBUG to 
> see what errors it generates.
> 
> (Don't do both at the same time)



 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Joe Wilson
> > 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>:
> > > Dear Friends
> > > Please let me know what should i do with this?
> > >
> > > SQLite version 3.3.13
> > > Enter ".help" for instructions
> > > sqlite> create table tbl1(one varchar(10), two smallint);
> > > SQL error: database is locked
> > > sqlite>
> > >
> > > (sqlite is launched by root)

I suspect file locking via fcntl() is not working in your embedded libc.

Try compiling the source code with -D__DJGPP__ which will make fcntl() a no op.

- Or - if that fails try compiling with -DSQLITE_LOCK_TRACE -DSQLITE_DEBUG to 
see what errors it generates.

(Don't do both at the same time)


 

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:44 anis chaaba napsal(a):
> there's another process using the data base or executing a transaction
No there's not. :-(

I have fear, that is some bug in croscompilation.

Jakub Ladman

>
> 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>:
> > Dear Friends
> > Please let me know what should i do with this?
> >
> > SQLite version 3.3.13
> > Enter ".help" for instructions
> > sqlite> create table tbl1(one varchar(10), two smallint);
> > SQL error: database is locked
> > sqlite>
> >
> > (sqlite is launched by root)
> >
> > Jakub Ladman
> >
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> >
> > -
> >

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL error: database is locked

2007-02-27 Thread anis chaaba

there's another process using the data base or executing a transaction

2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>:


Dear Friends
Please let me know what should i do with this?

SQLite version 3.3.13
Enter ".help" for instructions
sqlite> create table tbl1(one varchar(10), two smallint);
SQL error: database is locked
sqlite>

(sqlite is launched by root)

Jakub Ladman


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




[sqlite] SQL error: database is locked

2007-02-27 Thread Jakub Ladman
Dear Friends
Please let me know what should i do with this?

SQLite version 3.3.13
Enter ".help" for instructions
sqlite> create table tbl1(one varchar(10), two smallint);
SQL error: database is locked
sqlite>

(sqlite is launched by root)
 
Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-