Triggers on system tables

  • Probably a 'No', but I was wondering if it was possible in any way to add triggers to system tables. i.e. a trigger on sysfiles that emails me if someone sets maxsize to unrestricted.

    I've tried "sp_configure 'allow updates',1", but am still getting permission denied.

    Cheers.

  • Definitely a 'No'.

    Technically you can create triggers on certain tables in MSDB, but that's all. Do a search here. This has been discussed several times before.

    Maybe you should tighten your permissions. No everyone should be able to set maxsize.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thanks.

    Unfortunately the user needs to be dbo of certain databases, I'll just set up some nightly integrity checks instead

  • It's highly frowned upon and could cause problems. In SQL Server 7, triggers on system tables were not guarenteed to fire.

    I'd setup a job that runs every hour to look for this.

  • Yes it is possible, just don't do it.

    http://www.sqlservercentral.com/columnists/rmarda/letsblockthedba.asp

    Change you SA password and see who complains, then shoot them.

  • Thanks David,

    that is, indeed, nasty! Might just have a little try on a desktop server and see what breaks!

     

     

  • Well, even if it doesn't break a thing, at best you're running an unsupported system. I wouldn't call Microsoft PSS with an issue with such a system. Not everything that can be done, should be done. 

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • lmao

    Never thought of doing that one!!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply