Track User level metadata changes in SQL Server

  • Scenario is one of db user(employee) resigns his job, i need to track the metadata changes done by that db user, any script please suggest
    Note: i have not enabled CDC

  • You can look in the default trace. It rolls over though, so doesn't go back very far.
    Other than that, you need custom monitoring (not CDC, that's for data)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Any Script to do past 2 weeks monitoring, please suggest

    Thanks in advance

  • Have a look at this and see whether it will do what you need.
    Obviously, this won't work for changes made before it is implemented.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • GA_SQL - Tuesday, July 25, 2017 5:03 AM

    Any Script to do past 2 weeks monitoring, please suggest

    GilaMonster - Tuesday, July 25, 2017 4:06 AM

    You can look in the default trace. It rolls over though, so doesn't go back very far.

    Whether you have 2 weeks of data in the default trace depends on how active your system is. I've seen it hold 12 hours of data, I've seen it hold several months of data.
    If it's not in the default trace, then you will need to have had custom monitoring in place to track schema changes by user. SQL does not do this by default baring the default trace.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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