Re: best way to audit activity



1. Open Profiler.
2. Create you trace
3. Under the file menu, there is an option to save the trace which will
generate a T-SQL script with all of the commands that you need.

--
Mike Hotek
MHS Enterprises, Inc
http://www.mssqlserver.com


"archuleta37" <archuleta37@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:63773881-DC9F-4E1D-A417-7FEE4D794131@xxxxxxxxxxxxxxxx
I need setup an audit trail on all CRUD that happens on a SQL 2000
database.
I don't want to enable C2 auditing since I think that would be overkill.
Creating a Profiler template and tuning it to the exact info I want seems
the
right approach, but using the profiler is not ideal since it cannot
survive a
reboot without having to manually restart the trace. I think what I need
to
do is to make a stored procedure that uses the sp_trace* stored procs to
start a trace and add at .bat file to the system startup that triggers the
stored proc to start running.

The problem is that I can't seem to find the documentation I need to l
understand how to use sp_trace_setevent. Also, it seems like it would be a
lot easier if I could just create a SQL Profiler template and have a
stored
procedure just use the template. I think I've run into some mention that
this
is possible, but nothing more than that.

Is it possible to just use a profiler template? If so, I need code samples
to get me started, and if not, then I need complete documentation on
sp_trace_setevent params and maybe all of the other sp_trace* procs. Can
someone point me in the right direction here?


.



Relevant Pages

  • Re: best way to audit activity
    ... equivalent server-side trace. ... Creating a Profiler template and tuning it to the exact info I want seems ... do is to make a stored procedure that uses the sp_trace* stored procs to ...
    (microsoft.public.sqlserver.security)
  • Re: Profiler Bug viewing trace flat file?
    ... The TextData column is definitely populated when I query resulting trace ... selected in Profiler and run from Profiler. ... declare @TraceID int ...
    (microsoft.public.sqlserver.tools)
  • Re: Profiler Bug viewing trace flat file?
    ... exec PostAvailableContractsCache_sp ... The TextData column is definitely populated when I query resulting trace ... selected in Profiler and run from Profiler. ...
    (microsoft.public.sqlserver.tools)
  • Re: Application Trace Profiler
    ... I have my debug event handling loop in a background thread, ... I tried this article and I was able to profile the Trace messages from my ... there any way to detach from the application so that the profiler can exit ... intercept the Trace statements of another running .NET application. ...
    (microsoft.public.dotnet.general)
  • Re: Profiler temp file
    ... Yes you are missing the whole point. ... Trace to a file without running profiler at all. ... shows how to create a script from scratch but if you follow my instructions ...
    (microsoft.public.sqlserver.tools)