How to log the users login and logout datetime in a table in sql server 2000

  • Hello,

    I want to log the users logged in time and log out time for a particular database in sql server 2000.a

    can anyone help me on this.

    Thanks in advance.

    Prakash

  • Um... aren't logins on a server level with access permissions beyond that to a database and then to a table within the database? You are allowed to logon or logoff to the server which are discrete events that can be audited. Once on a server you access the data in a database or a table in the database or no longer access it.

    If you are really asking for access at the database level, I am not sure you can capture that easily except perhaps through object access auditing. Even then, you might need to cross-reference that with the server logins to tell when the last access of a database was done for that user.

    To check on an object level (filter by database, etc) you could use the Profiler with Audit Object Permissions, Audit Object Derived Permissions and Audit Object GDR events.

    Am I missing something?

    Toni

    *Fixed typo*

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply