January 21, 2005 at 12:27 pm
Hi. I want to set an alert on my production databases so that when a new user table gets created I'm notified. Can someone point me in the right direction on how to do this or is this even possible?
Juanita
January 24, 2005 at 8:00 am
This was removed by the editor as SPAM
January 24, 2005 at 8:22 am
I guess you could put a trigger on the sysobjects table where the inserted xtype = 'U'.
January 24, 2005 at 8:23 am
Thanks, I'll try that!
January 24, 2005 at 8:24 am
The trigger on system tables are not reliable... and not supported by Microsoft. The best way would be to do snapshots of that table every 5 minutes or so and check for new objects.
January 24, 2005 at 8:26 am
Thanks !!!!
January 24, 2005 at 1:22 pm
Nicolas, if you could post a script that will create a trigger on sysobjects, that would be very good of you. AFAIK, it is not possible to create such a trigger at all.
Juanita, two remarks from me:
First: In a production system no common user should have such privileges as CREATE TABLE. This seems to be a rather "dynamic" approach, which isn't the best at all. However, Remi's suggestion is good.
Second: The next version of SQL Server will contain DDL triggers.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
January 24, 2005 at 1:34 pm
Thanks so much for the information !!! very important info !!
Juanita
January 24, 2005 at 2:03 pm
Just gave it a try, guess you can't create a trigger on there.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply