How to determined when a user last logged on.

How may you determine when a user last logged on?
Is there an sp for this?
0
Patrick
1/4/2005 12:40:20 PM
sybase.ase.administration 7058 articles. 2 followers. Follow

5 Replies
409 Views

Similar Articles

[PageSpeed] 20

Patrick Krosbakken wrote:
> How may you determine when a user last logged on?
> Is there an sp for this?
I don't think this is possible unless you use the auditing feature.
0
Will
1/4/2005 1:41:32 PM
> How may you determine when a user last logged on?
> Is there an sp for this?
If your release supports login triggers, you could use a
login script that is run automatically when a user connects
to record the date/time into a table.  See the
sp_modifylogin procedure documentation and System
Administration Guide for login triggers.
0
wkraatz
1/4/2005 2:05:08 PM
If the user is currently logged in, see the "loggedindatetime" field of
sysprocesses (this is new as of 12.5 GA)

Otherwise, as otheres have suggested, you can set up auditing (any
version) or login triggers (12.5) to capture that information.

-bret


Patrick, Krosbakken wrote:

> How may you determine when a user last logged on?
> Is there an sp for this?

0
Bret
1/4/2005 3:17:39 PM
> How may you determine when a user last logged on?
> Is there an sp for this?

If you Sybase ASE server is 12.5 or + use the login
trigger(stored procedure) to manage you problem, otherwise
no choice but audit.
Remember that the login stored procedure must be in the
login default database and it must also be associated with
the logins that you want to monitor by using sp_modifylogin.

Here is basic example of login trigger that I use for some
of serevr:

use defdb -- tartamion_prod ,or master for example
go
if exists ( select name from sysobjects where
name="login_spy" and type="U")
begin
drop table login_spy
end
go
create table login_spy
(login                          varchar(10)                 
   NOT NULL
,srv_name                       varchar(10)                 
   NOT NULL
,date                           varchar(30)                 
   NOT NULL
)
on 'default'
go
grant insert  on login_spy to public
go

if exists ( select name from sysobjects where
name="sp_login_spy" and type="P")
begin
drop prod sp_login_spy
end
go
create proc sp_login_spy as
-- This proc can be executed as login trigger to record all
access to server
begin
declare @uname varchar(10)
declare @chd varchar(30)
select @chd=convert(varchar(30),getdate())
select @uname=substring((l.name),1,10) from
master..syslogins l, master..sysprocesses p where
l.suid=p.suid an
d p.spid=@@spid
insert into master..login_spy
values(@uname,substring(@@servername,1,10),@chd)
end
go
grant exec on sp_login_spy to public
go
-- This stored procedure must be rewritten in a more
complete fashion.


Taghi
0
taghi
1/4/2005 3:23:06 PM
In addition to the suggestions already here, you could make use of the
configuration "log audit logon success" to log entries of successful logins
to the error log.  You could then write a simple script to get the info you
want, or get really fancy and use the filesystem access features of ASE to
query the errorlog.

<Patrick Krosbakken> wrote in message
news:41da8eb4.7d23.1681692777@sybase.com...
> How may you determine when a user last logged on?
> Is there an sp for this?


0
Sherlock
1/7/2005 3:47:03 PM
Reply:

Similar Artilces:

last logged on user left after restart, not log out
On my Windows 7 clients (Novell Client IR7) I'm seeing a puzzling event: In my client properties, I have Advanced Login>Last Logged On User turned "off" and the user field is indeed cleared if I log out. HOWEVER, the user field is NOT cleared if I restart or shutdown/startup the computer. In those cases, the last logged on user's name is waiting in the field when it appears after boot. It's like the step that clears the user field isn't happening when Windows is shutting down. I'm not well-versed enough in Windows 7 or the Novell Client on Window...

How to determine user role
Please advice.  I know that for logged in user the way to determine if he is in role is: user.isinrole("role1") But I have a task to display the role of another user, I have its UserName as an input. How do I do it?  And linked question: Why user.isinrole("role1") doesnt work in UserControls? Says "Name 'user' is not declared".    Roles.IsUserInRole("username","rolename")--Harder Better Faster Stronger - My BlogSalvo Davide Rapisarda...

Administrator change users email without being logged in as user?
If an administrator has a member's UserName but not his password, is there a simple way the administrator can change the member's email? I am using the default membership provider which stores the email and lowered email in the aspnet_membership table. Can someone show me an example of vb code  to do this (if it is possible)?  CHO, Homepage Doctorhttp://www.homepagedoctor.com/Tutorials.htm Hi, Try below codeprotected void Page_Load(object sender, EventArgs e) {if(!Page.IsPostBack) {MembershipUserCollection mu = new MembershipUserCollection();mu = Membership.GetA...

Last user logged on
Hi, Is is possible to clear the last user logged on in the novell client login screen and if possible the workstation tab? Chris. "Chris Gollner" <cgollner@sprusons.com.au> wrote in message news:YEH8c.9660$jb5.2656@prv-forum2.provo.novell.com... > Hi, > > > Is is possible to clear the last user logged on in the novell client login screen and if possible the workstation tab? > > > Chris. > Now you've got me going crazy trying to remember. There *is* a way, and it clears everything. You have to manually put the name ...

determining where user logged in from
Is there anyway someone can determine where a user logged in from? I'm trying to create a web app that allows users to search on certain files from within their network but restrict those files when they log in from outside their network. Any ideas? Are we talking about a windows network? If this is the case you can request the username and domain that they are logged into when they make each request to the web server Request.ServerVariables["AUTHUSER"] will return Domain\User string. - This will require Anonymous access turned off on your web server. Is that of any use to you? With...

How do I determine if a user is logged in?
I would like to check in a batch file whether a user is logged in or has logged in as 'workstation only'. This check is going to be done before 'userinit.exe' has been processed in XP so that I can choose which XP desktop appears. Does anyone know of a variable or registry key which can be checked? Or of a utility that will return an ERRORLEVEL value? Paul, From: http://support.novell.com/cgi-bin/search/searchtid.cgi?/10086294.htm HKLM\Software\Novell\Login\ DWORD Local Login 1=The user logged in only to the workstation. 0=The user l...

determine logged in user
I am using forms authentication and I want to be able to determine the logged in user. I am able to do this by setting a variable at login but I also have the option to save the login so if the user is returning that variable doesn't get set. I was wondering if there was an easy way to get this info. I am very new to asp.net and I am using VB. Any help is appreciated. Thanks, Mike Uhlman When you use Forms Authentication and a visitor logs in successfully you can access the username they used with the code User.Identity.Name() so if you wanted a label showing their name use UserNameL...

Determine when users log on
Is it possible to use NAAS (or some other method) to audit when user's log onto or off of a NetWare server? -- mkelley_25 ------------------------------------------------------------------------ Sweet! Thanks for that info. -- mkelley_25 ------------------------------------------------------------------------ mkelley_25's Profile: http://forums.novell.com/member.php?userid=66586 View this thread: http://forums.novell.com/showthread.php?t=417620 'NOVELL: Downloads - Novell Audit 2.0.2 Starter Pack' (http://download.novell.com/Download?buildid...

How do I determine if user is logged in?
I want only authenticated users to save some stuff, so if a user is not logged in, I show a modalpopup to let the user log in:         if (User.Identity.IsAuthenticated)            this.SaveStuff();        else            this.ModalPopupExtender1.Show(); SaveStuff(){    if(User.Identity.IsAuthenticated)        ... save stuff} When the user then is logged i...

Web page not detecting a logged in user/user not logging in
Hey guysAs it stands, I've created two web pages within my app. One is a login page which is simply a blank page with the login control dragged on top. Within this control I redirect to my second page which contains a set of asp:Panels that are supposed to hide/display depending on which user is browsing the page.I've read several tutorials and at the moment, I've installed memberships/roles using the aspnet_regsql application. I've also used the web administration tool to create an 'administrators' role and create a user which is assigned to that role. I've also ...

User Log in Log
I need to keep a daily record of network logins Being Auditcon does not work with NW6, is there a way I can enable Logging on a server/tree to capture user login? Install NSURE Audit. Configure it to record logins and out for both the server and eDir. The Nsure Audit starter pack 1.0.3 is downloadable from the website. ~+~^~+~^~+~^~+~^~+~^~+~^~+~^~ Jim Gosney Netware/Groupwise Admin./Eng. Genesco, Inc. Nashville, TN Currently reading: fiction: Lord of the Rings: Return of the King -- J.R.R. Tolkien non-fiction: George Washington -- James Burns and Susan Dunn rel...

Users logging in as the same user..
HI there.. I have a problem with ASE12.0 .. I have created 10 users on the database and granted everybody permissions and all.. However, it seems everybody, no matter who logs in, logs in as the same user.. For eg... I have user logins John, Alex, Alan, Steve......etc etc And i created a user group for all of them (eg developers..) However, when they log on to isql, anything that they do will be under John, no matter if it is logins John, Alex, Steve... or etc etc.. If i do a sp_who.. all the connections will be listed as John. If they create tables, all table created will ...

determining which users are currently logged in
How can I determine which users are currently logged in to my web app? I want to set up an admin utility which can modify user accounts and can view which accounts are currently logged in. I also want the ability to log a user out.Kevin Babcockhttp://blogs.telerik.com/kevinbabcock I have found this article to be helpful in answering my question. I thought I'd share in case any of you had a similar question.Kevin Babcockhttp://blogs.telerik.com/kevinbabcock...

determine current logged in user
I need to determine the current logged in user weather they logged in through ctrl-alt-del, the red N, or through c:\WINDOWS\system32\loginw32.exe. I need to do this in a script so I can record it to a database. Does anyone know what the best way to do this is? Thnaks. As long as they logged into the Novell network from the initial Novell/Windows login, then there will be a Windows environment variable called NWUSERNAME (reference it in batch files by %NWUSERNAME%). The value of that environment variable will change depending on who is currently logged in, but it will n...

Web resources about - How to determined when a user last logged on. - sybase.ase.administration

Bin Ladin Determined To Strike in US - Wikipedia, the free encyclopedia
Bin Ladin Determined To Strike in US was the President's Daily Brief prepared by the Central Intelligence Agency and given to U.S. President ...

Audiences, Bidding, Placement for Facebook Ad Campaigns Now Determined at Ad Set Level
Facebook announced a change to its ad campaign structure Thursday: The audiences, bidding and placement for campaigns are now determined at the ...

Search Twitter - determined
... Learn more here Search Refresh Capricorns Are US @ UsCapricorns 2m #Capricorns are responsible, reliable, practical, and they are determined ...

Brazilian man born with his head UPSIDE DOWN but fought a determined struggle for independence - YouTube ...
A man born with physical disabilities so severe his head is UPSIDE-DOWN has defied the odds to become an inspirational public speaker. Claudio ...

Golf: Henrik Stenson determined to complete Desert Swing with win at Abu Dhabi HSBC Golf Championship ...
Our John McAuley sits down with world No 2 Stenson, fresh off his victory at the DP World Tour Championship, as the in-form Swede has set his ...

HSC 2014: Two determined girls on a road less travelled
Receiving a Higher School Certificate might not get Lucy Weston or Marnie Stevens-Denholm into university but it will change their lives.

How We Determined The Most Underrated Cities For 20-Somethings
In our ranking of the 20 most underrated cities for 20-somethings, we compared a livability ranking from AreaVibes.comto a ranking system of ...

Anthony Milford says he determined to depart Raiders 'on a big note'
Canberra star Anthony Milford is committed to finishing his time with the Raiders ''on a big note''.

Young breast cancer survivor Sali Stevanja is determined no woman should go through what she did
Meeting Sali Stevanja is a potent reminder that appearances rarely tell you everything about a person.

G20 'determined' to halt tax avoidance by large international companies
THE G20 group of the world's top economies expressed determination to crack down on companies who duck their full taxation responsibilities with ...

Resources last updated: 12/7/2015 8:38:08 PM