Trigger on Login

anonymous_at_discussions.microsoft.com
Date: 08/18/04


Date: Wed, 18 Aug 2004 11:07:16 -0700

select distinct spid, login_time, loginame
from master.dbo.sysprocesses
order by login_time desc

Per above, it seems that all logins to MS-SQL are recorded
in the [sysprocesses] table in 'master'. You "could" I
suppose put a trigger on this table to look for logins
that match the syntax you are looking for (either NTLM-
type or SQL authentication).

If the trigger was lightweight enough it shouldn't hurt
anything. What do you think?

-DMllp/DBA

>-----Original Message-----
>Is there any trigger on login.
>
>We have this new request. on login, thro any application,
we need to pass on
>a sql server message to the application that the password
will expire in so
>x days. (There is a separate table to maintain the
password history).
>
>thanks a lot for the help. (thanks to SOX!)
>
>
>
>.
>



Relevant Pages

  • Re: Trigger on Login
    ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... it seems that all logins to MS-SQL are recorded ... > If the trigger was lightweight enough it shouldn't hurt ... > password history). ...
    (microsoft.public.sqlserver.dts)
  • Re: Authentication options with SS2005
    ... This trigger prevents from 'AuditLogin' login having more that one ... If there are more than one connections, ... more logins than is set by our domain policy. ...
    (microsoft.public.sqlserver.security)