473,545 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ 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 3665
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_defaultlangu age, 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_defaultlangu age, 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_defaultlangu age, 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_defaultlangu age, 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
8755
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 experienced in writing triggers. Here is the first one: CREATE TRIGGER DecreInters ON Interaction FOR DELETE AS
0
1502
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 then the triggers and indexes are recreated at the end. This produces a massive improvement in performance. The problem is the process is...
0
1208
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 Server Error in '/testweb' Application. -------------------------------------------------------------------------------- This feature is not...
0
4902
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 rules for the new project. but, i plan to use a lot of triggers and functions in this project, but I'm confused! I know that triggers call already...
3
3152
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 database, named "MyDB", successfully. I am using the Windows Authentication mode to login to SQL Server. My server name is "AD\SQLEXPRESS" where "AD"...
3
3523
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 Triggers and saving them. I have found the node for Triggers in SQL Server 2005's Management Studio and tried to create a 'New Trigger...' but when I...
4
3665
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. Obviously their usernames and passwords are common to their exchange mailbox ones. What we would like to do is just have the one common login for...
0
2404
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 activity occurs, I had expected that the delete trigger on the child would always fire before the delete trigger on the parent. But I was wrong! They are...
0
7680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7934
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7446
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7778
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1908
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 we have to send another system
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.