on 05-14-2014 5:28 AM
Dear Experts,
I have one requirement,How to find how many hours a user logged in the system for one month.Please give me answer.thanks in advance.
regards,
Patan Thavaheer.
From ASE point of view, you can periodicaly save records from master..sysprocess and then analyze them
or
you can install auditing functionality
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01672.1572/html/sec_admin/X23329.htm
use those options to record only logins and logouts:
exec sp_audit "logout", "all", "all", "on"
exec sp_audit "login", "all", "all", "on"
go
Then you should analyze:
select extrainfo from sybsecurity..sysaudits_01
go
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my opinion, you can only do this by for instance
coping (per 5 min ) table master..sysprocess to table <your_database>..sysprocess_record
and then analyze this table (sysprocess_record) to get needed information.
Byt be carefull. If you have a lot of processes this table can fill quickly so you have to also make some deletion/aggregation process.
Regards,
Tomek
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.