using a trigger to audit deleted records

  • Howdy

    I have put together a trigger that will

    append any deletes from a table to another table. I also wan't to be able to get the username who did the delete.

    Is there a stored procedure or another command that will give me the username responsible for the delete?

    Thanks

    Thanks

    Edited by - growl on 10/01/2003 01:39:44 AM

  • Try suser_sname(), if you want the PC it was done from you can use host_name()

    HTH

    Ray Higdon MCSE, MCDBA, CCNA

    ------------

    Ray Higdon MCSE, MCDBA, CCNA

  • If everyone has their own login use system_user. You also can check out user_name() and suser_name(). I tend to use system_user with SQL Server and suser_name() with Sybase.

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

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