| Sue Hoegemeier 2006-03-15, 3:23 am |
| You can't add triggers to system tables. You can find some
hacks to get around it but it's not recommended and
generally pointless anyway. The triggers won't fire the way
you think they would -often times they won't fire due to
different mechanisms used by SQL Server when it updates
information in system tables.
On SQL Server 2005, you can use DDL triggers.
Otherwise, you can look at auditing tools - third party or
profiler, server side traces.
-Sue
On Tue, 14 Mar 2006 15:51:27 -0800, "Tim Greenwood"
<tim_greenwood A-T yahoo D-O-T com> wrote:
>We're trying to enforce some coding practices here and were taking the
>sledgehammer approach of putting a trigger on the sysobjects table that
>would raise an error when invalid names were submitted.
>
>Why is "sa" not allowed to add a trigger to that table ?
>
>What other methods are the recommended way to enforce something like this?
>
>Thanks !!
>
|