Re: Trigger on Login

From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 08/18/04


Date: Wed, 18 Aug 2004 21:34:09 +0100

You cannot put triggers on system tables.

-- 
-- 
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know
<anonymous@discussions.microsoft.com> wrote in message
news:8ac701c4854e$31fd8ca0$a601280a@phx.gbl...
> 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: Records not inserting...
    ... > I am totally new to SQL server. ... However, in a trigger, would I be ... test the effects of certain data modifications and to set conditions for ... UPDATE statements. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Help for an Oracle Newbie
    ... application I wrote using SQL Server ported over to Oracle. ... Obviously there are several built in data types in SQL Server that do ... Of course I had to use a different name for the trigger under each ...
    (comp.databases.oracle.server)
  • Re: TRIGGER (AFTER INSERT) and Store Procedure ... insert failed !
    ... >into SQL server, the record exist anyway! ... >If you refresh the data you will see the record... ... it gets refreshed after trigger excecution automatically. ... I don't know your monitoring system, but I guess that removing the result ...
    (microsoft.public.sqlserver.programming)
  • Re: Help for an Oracle Newbie
    ... application I wrote using SQL Server ported over to Oracle. ... Obviously there are several built in data types in SQL Server that do ... Of course I had to use a different name for the trigger under each ... In SQL Server I always create a CreatedDate column ...
    (comp.databases.oracle.server)
  • Re: how to assign the contents of a field to a variable
    ... > Columnist, SQL Server Professional ... > teh requirements of the trigger are to export an XML document to MSMQ ... > DECLARE @int_msmqqueue INT ... > DECLARE FieldCursor CURSOR ...
    (microsoft.public.sqlserver.programming)