Home Forums SQL Server 2014 Development - SQL Server 2014 How to join INFORMATION_SCHEMA.COLUMNS, COLUMNS_UPDATED ( ), inserted and deleted tables RE: How to join INFORMATION_SCHEMA.COLUMNS, COLUMNS_UPDATED ( ), inserted and deleted tables

  • diallonina (7/27/2014)


    Oh Eirikur Eiriksson, i am impressed by your script :w00t:

    In your sample, you are listing the colums of the table to audit and if this table changed (column added or removed, the script must be modified to fit to the new structure. Am i right ?

    That's why i wanted to use sysColumns, so the coumns will be bound 'dynamically' and no more need to change the triggers.

    It's really a good start. Thank you 😉

    You are welcome.

    On the "generic audit trigger", I normally prefer to write a create trigger script that is generic rather than writing a generic audit trigger.

    😎

    Michael Coles suggests in his book Pro SQL Server 2008 XML to use FOR XML AUTO to create a generic trigger, not a bad solution but it doesn't filter out the unchanged values.

    This topic does pop up once in a while, here is another similar thread: http://www.sqlservercentral.com/Forums/FindPost536737.aspx