Check users logged on

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can someone advise how to check which users are logged onto the database.

Thanks in advance.
 
Do you need to see who's logged in NOW?

or do you need to check who logged in during a particular time frame last
week etc?

I've just implemented a "SessionLog" on my database application, which using
VB code, runs an append query adding the username of the person currently
logged in, into a table, with a few extra details include date and time.

To see who is logged in now, maybe you could add their usernames into this
table when they open the system, and remove them as they are exiting....?

Then you would just need to look at the table to see who's in the table list
- There would always be at least one record in their, one for you.

Hope this helps, let me know either way.

Dan Walters
 
I have not set-up user accounts therefore the users do not need to log in as
such. Can I still check which users are accessing the database.

Thanks
 
you can figure out what machine they are on or create a table to store the
info
retrieving the network user name can be done through windows API
a function to do so can be found at http://www.mvps.org/accesss
I believe in the API section

Pieter
 
Almost all of my apps have a users table, where I record and store some
setting parameters. One of which is LoggedOnAt, which is a datetime field.
I use the windows API that Pieter mentioned to get their windows logon ID,
then if that is not already in the table, I add it.

Then I set the LoggedOnAt value to the current data/time. When they log
off, I set this value to null. Two things this does for me. If I have a
user who is logged on for more than about 8 hours, I anticipate that they had
a problem with the database, and call and ask them if they are having
difficulties. It also lets me know who to contact if I need to do
maintenance to the database.

HTH
Dale
 
The environment which my solution runs, is within education, a locked down
system (access to cmd etc is v. limited) and the system isn't mission
critical - ensures two members of staff cannot book the same IT lab on the
same day, at the same time!

Thank you
 
Cant you do it the old fashioned way and just open the ldb with notepad to
see their NT logon?

If you are trying to get all users out so you have exclusive access, set a
event on open that monitors a field and if changed will cause all users to be
forced to exit.

Code available if requested.
 
I never knew you could open an ldb with notepad, but there is and ldbViewer
program that is available for download, which lets you look at the ldb file.
Unfortunately, it tells you the "computer" that has the file open, not the
user.

Dale.
 
Back
Top