Trigger/auditing problem

From: harvinder (harvinder_at_discussions.microsoft.com)
Date: 12/27/04


Date: Mon, 27 Dec 2004 13:17:06 -0800

Hi,

We need to do auditing on few of our tables and want to capture the
following information using trigger on tables:
1) when was the table modified
2) How is table modified - from Query Analyzer(QA) or Application
3) If from QA - directly modified table or ran procedure

I was able to get first 2 information using getdate() and
master..sysprocesses in the trigger.
How to get the 3rd information. Is any system table store this information
whether the sql is run against the table directly or sql executes the
procedure that modifies the table?

Thanks
--Harvinder



Relevant Pages

  • Re: trigger issue
    ... > I have a function in ms sql server ... > in which i m updating a table and returning one value ... > or modifies the table structure. ... trigger will be fired and its script executed, as a result of this a table ...
    (microsoft.public.sqlserver.server)
  • Re: set value (with out tirgger)
    ... Then trigger it is. ... so comparisons are tricky since you can run into cases ... Bottom line to me is that I would attempt to let the UI do this calculation ... modifies it should be responsible. ...
    (microsoft.public.sqlserver.programming)
  • RE: Trigger/auditing problem
    ... for how to use it in a proc see ... > master..sysprocesses in the trigger. ... > whether the sql is run against the table directly or sql executes the ... > procedure that modifies the table? ...
    (microsoft.public.sqlserver.server)
  • Re: Trigger/auditing problem
    ... >We need to do auditing on few of our tables and want to capture the ... >master..sysprocesses in the trigger. ... >whether the sql is run against the table directly or sql executes the ... >procedure that modifies the table? ...
    (microsoft.public.sqlserver.server)
  • Re: Trigger/auditing problem
    ... > We need to do auditing on few of our tables and want to capture the ... > master..sysprocesses in the trigger. ... > information whether the sql is run against the table directly or sql ... > executes the procedure that modifies the table? ...
    (microsoft.public.sqlserver.server)