Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Server level trigger at Database level...


Server level trigger at Database level...

Author
Message
John Waclawski
John Waclawski
Valued Member
Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)

Group: General Forum Members
Points: 61 Visits: 415
My boss found a table in live data that we can't account for on who created it or what it's for. Barring a security issue & whatever along those lines I'm creating a trigger to fire off if someone alters/drops/creates a table in a database.

As you probably already know I can do this at a database level with no problems. Is there a way to put a trigger at the server level to trip the ALTER_TABLE/DROP_TABLE/CREATE_TABLE when anything is done at the database level? Or will I be stuck putting this trigger on each database?


Thanks!


I know, I know...my subject line is back-a$$-wards. Should be "Database trigger at server level" Whistling

======================================================
John
SQL Server 200x Newb and proud of it! :-D
======================================================
Bru Medishetty
Bru Medishetty
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1790 Visits: 1950
My guess is you should have them on each of the databases in that Server

These should help you..

http://www.sql-server-performance.com/articles/audit/ddl_triggers_p1.aspx

http://www.developer.com/db/article.php/3552096/Using-DDL-Triggers-to-Manage-SQL-Server-2005.htm


Bru Medishetty

Blog -- LearnSQLWithBru

Join on Facebook Page Facebook.com\LearnSQLWithBru

Twitter -- BruMedishetty
John Waclawski
John Waclawski
Valued Member
Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)

Group: General Forum Members
Points: 61 Visits: 415
Bru Medishetty (5/18/2010)
These should help you..

http://www.sql-server-performance.com/articles/audit/ddl_triggers_p1.aspx


Coincidentally I've been using that one all day working on my issue. :-D



Found this one as well. Still reading it.

======================================================
John
SQL Server 200x Newb and proud of it! :-D
======================================================
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search