Trigger on sysdatabase table to track DB renaming

  • Is there a way where in i can track the renaming of a database.Creating a trigger on the sysdatabase is not possible . Any round abouts ...

  • found a round about

    Update the sysobjects and set the xtype to 'U', add the trigger and set the

    xtype back to 'S'

  • Personally, I think modifying a system table this way is a bad idea. First off, there is no guarantee that your trigger will persist if you upgrade or apply service pack to your system.

    Just my two cents.


    Joseph

  • It also becomes an unsupported configuration should you need to place a service call to Microsoft. Also, triggers on system objects aren't guaranteed to fire.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

Viewing 4 posts - 1 through 3 (of 3 total)

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