dbTalk Databases Forums  

Trigger on Login

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Trigger on Login in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sat
 
Posts: n/a

Default Trigger on Login - 08-17-2004 , 03:31 PM






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!)




Reply With Quote
  #2  
Old   
Mary Chipman
 
Posts: n/a

Default Re: Trigger on Login - 08-18-2004 , 09:35 AM






No -- SQLS authentication occurs before authorization to any
particular database, and triggers are a feature of database tables.
However, you could code your application to inspect your password
history table for an expiration date on startup. Bear in mind that
this is less secure than using integrated security with Windows
logins, where you *can* set password expiration policy.

--Mary

On Tue, 17 Aug 2004 15:31:06 -0500, "Sat" <satheesh (AT) earthlink (DOT) net>
wrote:

Quote:
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!)




Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Trigger on Login - 08-18-2004 , 01:07 PM



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



Quote:
-----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!)



.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Trigger on Login - 08-18-2004 , 03:34 PM



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 (AT) discussions (DOT) microsoft.com> wrote

Quote:
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!)



.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.