Lookin for a function that gives me the name of the process modifyng a table

  • If you are inside a stored procedure, function or trigger

    object_name(@@procid)

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537
  • Thanks for the fast answer, the function worked and it gives me the name of the process.

    i was trying to get the name of the process modifying the table, but guess i need to add the

    object_name(@@procid) to all the processes that move something in the target table.

    i cant modify some of those, so i cant use this option.

    For a new question.

    ¿Is there a way to create or see (if exists) a log or something that tells me wich processes have modified certain field on a table or just the table?

  • OK for anyone that enters thhis topic, i entered this link:

    http://sqlserver2000.databases.aspfaq.com/how-do-i-audit-changes-to-sql-server-data.html

    and used some recommendations from there.

    im still missing the proceess that changes the data, but i got some useful info on the link below, hope it helps to anyone who enters this topic with a similar problem.

    cheers =D

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

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