Hi,
How to disable one person /user to concurrently login from different machines?
Thank you in advance
Hi,
How to disable one person /user to concurrently login from different machines?
Thank you in advance
for PostgreSQL take a look at pg_stat_activity:
select usename , usesysid , application_name , client_hostname
from pg_stat_activity
What database?
SQL Server has optional dbparms Host and Appname that you can set when logging in.
This SQL statement will tell you how many copies of the app are running on another machine.
SELECT count(*) INTO :li_appcount
FROM master.sys.sysprocesses
WHERE hostname <> 'my computer' AND program_name = 'my program';
Assuming you connect to a database when you log on to your application you can track the connection (insert a row into a table) for that userid. As part of the log on process you then query that table to see if the user is logged on and prevent them if they are. HOWEVER, you need to have some sort of process of clearing entries from this table should the user drop network connectivity, shut off the PC, or some other type of situation which prevents the application from clearing their entry from the table as part of a 'normal' exiting of the program. In MS SQL Server you can also track the users via various system procedures and do the same (prevent simultaneous connections) but these may not work if you have permissions locked down.
Hi mathews,
I think you'll need to be (a lot) more specific. Log into what, exactly? A PB application? What kind of app are we talking about?