Subject | Re: [firebird-support] How to limit the number of concurrent users to a database |
---|---|
Author | Alexandre Benson Smith |
Post date | 2012-06-13T21:13Z |
Em 13/6/2012 18:03, Jesús García escreveu:
I think that just relying on MON$CONNECTIONS (or any table populate upon
connect/disconnect) is prone to error due to abnormal app termination.
If I would implement it I would have a last time used that is updated by
the application, a timer or any other periodical interval (open query,
open form, etc.). And consider any connection with a last time used
greater than "some interval" as a dead connection.
see you !
> Why control it in the server side?if your customer can connect to the database as sysdba, can remove the trigger or change the logic in the connect event.He could use the approachs combined.
>
> If You do it on the client side, after connect, do a select of mon$attachments and if it is greater than the licensed concurrent connections, then You can disconnect the user or show the connection list and let the user drop an existing connection.
>
> Jesus
>
>
I think that just relying on MON$CONNECTIONS (or any table populate upon
connect/disconnect) is prone to error due to abnormal app termination.
If I would implement it I would have a last time used that is updated by
the application, a timer or any other periodical interval (open query,
open form, etc.). And consider any connection with a last time used
greater than "some interval" as a dead connection.
see you !