473,480 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SQL 2005 & Login Triggers?

With SQL 2005, did Microsoft introduce login triggers? I seem to
remember hearing something about it but, I don't remember exactly what
I heard.

Thanks,
JD

Oct 31 '06 #1
4 3658
Hi, Joey

The new thing in SQL 2005 are DDL triggers, including triggers for:
- CREATE_LOGIN (Applies to CREATE LOGIN statement, sp_addlogin,
sp_grantlogin, xp_grantlogin, and sp_denylogin when used on a
nonexistent login that must be implicitly created.)
- ALTER_LOGIN (Applies to ALTER LOGIN statement, sp_defaultdb,
sp_defaultlanguage, sp_password, and sp_change_users_login when
Auto_Fix is specified.)
- DROP_LOGIN (Applies to DROP LOGIN statement, sp_droplogin,
sp_revokelogin, and xp_revokelogin.)

If you want a trigger that fires when a user logs-in on SQL Server
(i.e. when a new connection is created), I'm afraid that it's nothing
new here, so you will have to use the clasic tools: SQL Profiler. If
you want to do this programatically, I think you can create a trace
(see Books Online for more info).

Razvan

JoeyD wrote:
With SQL 2005, did Microsoft introduce login triggers? I seem to
remember hearing something about it but, I don't remember exactly what
I heard.

Thanks,
JD
Nov 1 '06 #2
Razvan,
Thank you for the info. What you've said has helped to refresh my
memory.

JD
Razvan Socol wrote:
Hi, Joey

The new thing in SQL 2005 are DDL triggers, including triggers for:
- CREATE_LOGIN (Applies to CREATE LOGIN statement, sp_addlogin,
sp_grantlogin, xp_grantlogin, and sp_denylogin when used on a
nonexistent login that must be implicitly created.)
- ALTER_LOGIN (Applies to ALTER LOGIN statement, sp_defaultdb,
sp_defaultlanguage, sp_password, and sp_change_users_login when
Auto_Fix is specified.)
- DROP_LOGIN (Applies to DROP LOGIN statement, sp_droplogin,
sp_revokelogin, and xp_revokelogin.)

If you want a trigger that fires when a user logs-in on SQL Server
(i.e. when a new connection is created), I'm afraid that it's nothing
new here, so you will have to use the clasic tools: SQL Profiler. If
you want to do this programatically, I think you can create a trace
(see Books Online for more info).

Razvan

JoeyD wrote:
With SQL 2005, did Microsoft introduce login triggers? I seem to
remember hearing something about it but, I don't remember exactly what
I heard.

Thanks,
JD
Nov 1 '06 #3
In SQL Server 2005 Service Pack 2, there is a new feature for Logon
Triggers. Logon triggers fire after the authentication phase of logging
in finishes, but before the user session is actually established. See
the updated Books Online for more information.

Razvan
PS. SQL Server 2005 Service Pack 2 is now in the "Community Technology
Preview" phase.

Razvan Socol wrote:
Hi, Joey

The new thing in SQL 2005 are DDL triggers, including triggers for:
- CREATE_LOGIN (Applies to CREATE LOGIN statement, sp_addlogin,
sp_grantlogin, xp_grantlogin, and sp_denylogin when used on a
nonexistent login that must be implicitly created.)
- ALTER_LOGIN (Applies to ALTER LOGIN statement, sp_defaultdb,
sp_defaultlanguage, sp_password, and sp_change_users_login when
Auto_Fix is specified.)
- DROP_LOGIN (Applies to DROP LOGIN statement, sp_droplogin,
sp_revokelogin, and xp_revokelogin.)

If you want a trigger that fires when a user logs-in on SQL Server
(i.e. when a new connection is created), I'm afraid that it's nothing
new here, so you will have to use the clasic tools: SQL Profiler. If
you want to do this programatically, I think you can create a trace
(see Books Online for more info).

Razvan

JoeyD wrote:
With SQL 2005, did Microsoft introduce login triggers? I seem to
remember hearing something about it but, I don't remember exactly what
I heard.

Thanks,
JD
Nov 9 '06 #4
Thanks Razvan - that is something my employer has been asking me about.
SP2 ? We've only got a couple of our SQL 2005 installs up to SP1.

I'll be checking it out.

thanks again,
JoeyD

Razvan Socol wrote:
In SQL Server 2005 Service Pack 2, there is a new feature for Logon
Triggers. Logon triggers fire after the authentication phase of logging
in finishes, but before the user session is actually established. See
the updated Books Online for more information.

Razvan
PS. SQL Server 2005 Service Pack 2 is now in the "Community Technology
Preview" phase.

Razvan Socol wrote:
Hi, Joey

The new thing in SQL 2005 are DDL triggers, including triggers for:
- CREATE_LOGIN (Applies to CREATE LOGIN statement, sp_addlogin,
sp_grantlogin, xp_grantlogin, and sp_denylogin when used on a
nonexistent login that must be implicitly created.)
- ALTER_LOGIN (Applies to ALTER LOGIN statement, sp_defaultdb,
sp_defaultlanguage, sp_password, and sp_change_users_login when
Auto_Fix is specified.)
- DROP_LOGIN (Applies to DROP LOGIN statement, sp_droplogin,
sp_revokelogin, and xp_revokelogin.)

If you want a trigger that fires when a user logs-in on SQL Server
(i.e. when a new connection is created), I'm afraid that it's nothing
new here, so you will have to use the clasic tools: SQL Profiler. If
you want to do this programatically, I think you can create a trace
(see Books Online for more info).

Razvan

JoeyD wrote:
With SQL 2005, did Microsoft introduce login triggers? I seem to
remember hearing something about it but, I don't remember exactly what
I heard.
>
Thanks,
JD
Nov 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8753
by: Shock | last post by:
Hi everybody, I just wrote my first two triggers and from the minimal amount of testing I have done, they work! However, I was hoping I could get some feedback from those of you more...
0
1499
by: K Finegan | last post by:
I have an archival process on a large database that runs once a month. At the beginning of the process the triggers and indexes on the tables whose data is moved are dropped, the data is moved and...
0
1202
by: nedk | last post by:
I am getting the following error when attempting to login to a site where I am trying to use Membership. Does anyone know why I am getting this error and how to fix it. Thanks in advance. -Ned ...
0
4894
by: Bruno Lavoie | last post by:
Hello, i'm etablishing a naming convention for a new project under postgresql. For tables, sequences, views, that's ok! I used good naming conventions for this in the past and i'll keep these...
3
3150
by: Arpan | last post by:
I recently installed SQL Server 2005 (Management Studio Express) along with SQL Server 2005 Express (Configuration Manager) in my Win2K Pro m/c & use IIS 5.0 to run ASPX projects. I could add my...
3
3515
by: satchi | last post by:
Ok this should be a simple question but it's seemingly difficult (or something's wrong w/ my SQL Server Managmenet Sudio). I have created new triggers in SQL Server 2000 by clicking on Managing...
4
3650
by: adam.waterfield | last post by:
I am just wondering if anyone here can help with a problem that we have here. We have a PHP based website/application that has a user login that is connected to our AD setup. This works fine....
0
2392
by: petwir | last post by:
We've got a cascading delete being used in DB2. I've built new triggers under the parent/child tables in this cascading delete relationship. So when they delete the parent, and the cascade...
0
7041
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7043
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7081
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6737
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4776
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.