By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,574 Members | 1,968 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,574 IT Pros & Developers. It's quick & easy.

saving userlogon time

P: 57
Hi All,

We have an windows application running on different systems , We want to mentain a log of user login time(UserName:LoginTime) can someone please tell me how can i do that. (i have to display that log in a internal web based system and i am not supposed to touch windows application but i can write stored pocedures in sql server).


Vineet Bindal
Feb 19 '09 #1
Share this Question
Share on Google+
4 Replies

Expert 2.5K+
P: 2,878
It really depends on how your user login to your application.Does it write anything on any table once it login? You have to see how the windows login and interact/interface with your database.

-- CK
Feb 19 '09 #2

P: 57
it depends on the user. sometimes they write and sometimes they dont.. what i was thinking is whenever user logs in they have to be varified with username and password there any way to track that from usertable? when and which user is being varified from that table?
Feb 19 '09 #3

Expert 2.5K+
P: 2,878
You might need to just use the logging mechanism of the SQL Server. However, if the user is using a single logon/local account, you will not be able to identify them individually.

-- CK
Feb 19 '09 #4

P: 57

TimeStart as 'Login Date',
CONVERT(VARCHAR(5), TimeStart, 108) as 'Login Time',
U.UserName as 'User',
L.UserLevelDesc as 'Role',
left(P.Param2, 8) as 'BP Version'
SY_ProcessLog P
left join Users U on p.userid = U.UserID
left join SY_UserLevel L on U.UserLevelID = L.UserLevelID

TimeStart >= @FromDate2
and P.Process in ('Start')
and U.UserName <> 'BP ADMIN'
P.TimeStart desc
Feb 19 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.