Number of open connections

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

Number of open connections

Chris Locke
Does SQLite keep a count of the number of current open connections to the
database?
On the DB4S mailing list, there is an enquiry (
https://github.com/sqlitebrowser/sqlitebrowser/issues/1798) about
encryption failing due to the database being open.  Was wondering whether a
PRAGMA or function returned the number of open database connections.


Thanks,
Chris
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Number of open connections

Chris Locke-3
Does SQLite keep a count of the number of current open connections to the
database?
On the DB4S mailing list, there is an enquiry (
https://github.com/sqlitebrowser/sqlitebrowser/issues/1798) about
encryption failing due to the database being open.  Was wondering whether a
PRAGMA or function returned the number of open database connections.


Thanks,
Chris
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Number of open connections

Richard Hipp-3
On 3/11/19, Chris Locke <[hidden email]> wrote:
> Does SQLite keep a count of the number of current open connections to the
> database?

No.

SQLite can find out if some other connection has the database open in
WAL mode, or if some other database has an active transaction, because
it needs to know those things.  But there is no counter.


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Number of open connections

Chris Locke-3
Thanks Richard for the reply.  Appreciated.

On Tue, Mar 12, 2019 at 2:49 AM Richard Hipp <[hidden email]> wrote:

> On 3/11/19, Chris Locke <[hidden email]> wrote:
> > Does SQLite keep a count of the number of current open connections to the
> > database?
>
> No.
>
> SQLite can find out if some other connection has the database open in
> WAL mode, or if some other database has an active transaction, because
> it needs to know those things.  But there is no counter.
>
>
> --
> D. Richard Hipp
> [hidden email]
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users