Trigger to notify use of Enteprise Manager

Last Post 22 Jul 2009 01:03 AM by dale123. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

20 Jul 2009 06:33 AM
Hello all. I would like to set a trigger for when people use enterprise manager.

Basically I would like to be emailed the username and computer name.

The reason is I created a service account with additional privileges that the developers are to use on rare occasions. They are instructed to use their own account for everyday use.

I suspect that they are just using the service account to get around permission issues.

I am a new DBA and am trying to remove permissions in an environment where all the developers were admins. I have to do this without breaking stuff hence the reason for the service account.

Also, I just learned T-SQL or I could probably figure this out eventually. It seems like a common enough task so maybe someone already has the code written.

Thank you,

New Member
New Member

20 Jul 2009 07:58 AM
I don't think that its possible for you to capute anything from EM directly (atleast I dont know)

Here are your options

1. When a user connects to your SQL Server, using TRACE you can find out the Tool (EM or ISQL Window,...) that they used to connect. I believe it also tells you the machine name of the user which can tell you who is the actual user is, provided some machine naming convention is used in your organization

2. Another option would be Create a Group, add members to this group & define the Security @ Group level

Hope that helps

New Member
New Member

22 Jul 2009 01:03 AM
Im assuming that you mean SQL Server 2005 Management Studio as asspose to SQL Server 2000 Enterprise manager because this top is in the 2005 section??

If so you can use a DDL Trigger to fire for Login events
Logon Triggers on MSDN

This will fire for every login - but you can log just events where SSMS are the application name.

Acceptable Use Policy