locked
Who deleted row ? RRS feed

  • Question

  • since 4 days ,
    Row was deleted ,
    Can I know who deleted a record from table in MS sql2005 server ?

     

    Wednesday, October 13, 2010 11:02 PM

Answers

  • Yes profiling is overhead. You should run server side trace for "less" overhead.
    http://support.microsoft.com/kb/929728 (An instance of SQL Server performs slowly when you use SQL Profiler to perform a client-side trace of the events in the instance)

    If you are looking for specific table then you need to create trigger on that table.

    In SQL 2008, we have added Auditing feature (added based on customer's request to handle situation in which you are currently)


    Balmukund Lakhani | Please mark solved if I've answered your question
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Wednesday, October 13, 2010 11:50 PM
  • Thanks for help
    • Marked as answer by AhmedFawzy Thursday, October 14, 2010 12:15 AM
    Thursday, October 14, 2010 12:15 AM

All replies

  • Without trace files (or pre configured Trigger).. NO.
    SQL would not keep this information by default due to overhead of Auditing.


    Balmukund Lakhani | Please mark solved if I've answered your question
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Wednesday, October 13, 2010 11:34 PM
  • thanks,

    When I run SQL Profiler to create trace files , Database Engine go to more slow performance.

     

    Wednesday, October 13, 2010 11:44 PM
  • Yes profiling is overhead. You should run server side trace for "less" overhead.
    http://support.microsoft.com/kb/929728 (An instance of SQL Server performs slowly when you use SQL Profiler to perform a client-side trace of the events in the instance)

    If you are looking for specific table then you need to create trigger on that table.

    In SQL 2008, we have added Auditing feature (added based on customer's request to handle situation in which you are currently)


    Balmukund Lakhani | Please mark solved if I've answered your question
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Wednesday, October 13, 2010 11:50 PM
  • Thanks for help
    • Marked as answer by AhmedFawzy Thursday, October 14, 2010 12:15 AM
    Thursday, October 14, 2010 12:15 AM