Re: [sqlite] any way to find out how many current connections to db?

2007-08-13 Thread Ben Combee
On 8/13/07, Chase <[EMAIL PROTECTED]> wrote: > > is there any way (in c/c++) to find out how many current connections > there are to a database that i am connected to? > > i'd like to do some housekeeping on the database every so often, but > only if there's no one else connected to it at the

Re: [sqlite] any way to find out how many current connections to db?

2007-08-13 Thread Joe Wilson
Rather than count the number of connections which would be prone to failure due to race conditions, you should do this instead: BEGIN EXCLUSIVE; -- run whatever SQL statements you want here, -- or copy the database file. COMMIT; Just schedule this job off-hours when people are not likely

[sqlite] any way to find out how many current connections to db?

2007-08-13 Thread Chase
is there any way (in c/c++) to find out how many current connections there are to a database that i am connected to? i'd like to do some housekeeping on the database every so often, but only if there's no one else connected to it at the time. any ideas? thanks. - chase

Re: [sqlite] any way to find out how many current connections to db?

2007-08-12 Thread John Stanton
Try using lsof. Chase wrote: is there any way (in c/c++) to find out how many current connections there are to a database that i am connected to? i'd like to do some housekeeping on the database every so often, but only if there's no one else connected to it at the time. any ideas?

[sqlite] any way to find out how many current connections to db?

2007-08-11 Thread Chase
is there any way (in c/c++) to find out how many current connections there are to a database that i am connected to? i'd like to do some housekeeping on the database every so often, but only if there's no one else connected to it at the time. any ideas? thanks. - chase