Auditing - Server-Side Profiler Trace

  • I am setting up auditing on startup using a server-side stored procedure. I don't understand the output file not being written to until I close the trace. Where does the data get stored in the interim? In a temp table? Do I have to worry about the size of the temp database (or wherever the data is)? The file size is set to the default of 5m. Also, I have rollover on. When the file finally rolls over, is the original file considered cleared to look at? Or is it still considered part of the running audit? I need to run continuous auditing. I'm confused on the trace file and how I may lose audit records if I try to look at it at the wrong time.

  • This was removed by the editor as SPAM

  • Does no one have a hint for me on this?

  • Not sure where does it save the traces, but I guess that is actually saves it in the file, even the file has a size of 0.

    What I'm sure that when the trace rolls over into another file, the previous file is ready to read, and you can use it as if the trace would be actually stoped.

    According to microsoft, it is always better to trace into a file, because it uses a technology similar to writting to the log files. So it is faster...and then it is better to import the file into a SQL table, because it is easier to filter and read. Check function fn_trace_gettable to do this,.

  • The trace does write straight to the file, but only in chunks of 128k or so (or maybe depends on how your disk is formatted). Whether SQL explicitly buffers it somewhere or whether it's your server's normal I/O subsystem buffering I'm not sure. I would guess it's the latter though because "blackbox" tracing is achieved through the same tracing mechanism and SQL would want to think all information has been sent to disk.

    Cheers,

    - Mark


    Cheers,
    - Mark

  • Do you know what would happen if the server went down? Do I lose everthing? Does it overwrite the file?

    I'm required to keep audit trail for a year. Not sure how I can guarantee I'll get everything.

    (Keep in mind I am an Oracle DBA just being assigned to sql server so I am looking for comparable ability to audit and keep logs).

Viewing 6 posts - 1 through 5 (of 5 total)

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