Trace user

  • Hi All,

    I have to find out who has inserted records in the table . Is there any way to do. I have not created any trigger for such a thing and default traces also not helping me on this. Mine is SQL SERVER 2005.

    Please help me regarding this.

    Thanks,

    Arooj

  • Unless you had some form of auditing in place at the time the insert was done, you're probably not going to be able to find anything out. The default trace does not record DML statements.

    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
  • If you're really adventurous (and the relevant log is still around, either in the active log or in a backup), you can get some information like that from the transaction log.

    See here[/url] for an example of how to do this.

    Having said that, you'll have to do some work to tie the rows in question to the correct operation in the log, and even then you'll only have the SID for the SQL Server login (so if multiple people have access to that login you won't have gotten too far, for example).

    Like Gail said, no way around proper auditing for something like this.

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

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