• In the trigger code presented by segiy, any applications and users are inserted into their respective tables with every run, if they are found not to exist yet:

    INSERT INTO dbo.Audit_User ( UserName )

    SELECT SYSTEM_USER

    WHERE NOT EXISTS (SELECT * FROM dbo.Audit_User WHERE UserName = SYSTEM_USER)

    INSERT INTO dbo.Audit_App ( AppName )

    SELECT APP_NAME()

    WHERE NOT EXISTS (SELECT * FROM dbo.Audit_App WHERE AppName = APP_NAME())

    In Post #1784267 you asked:

    ....but I think that you need some code somewhere to populate dbo.Audit_TableColumn ??

    I was just pointing out that for dbo.Audit_TableColumn not a solution similar to that for dbo.Audit_User and dbo.Audit_App should be implemented. 🙂

    Other than that, No I don't think there are any more conclusions so far.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?