Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a trace on a remote server. I am able to generate the trace, set filters, and even stop and delete the trace through sql server without an issue. However, the file created with sp_trace_create seems to be owned by the SQL Service and I do not have administrative permission to grant myself read-access.

  • Is there something similar to Oracle's trace_files_public for SQL Server 2008 R2?

"There is an undocumented parameter _trace_files_public that if set to true changes the file permissions in the user_dump_dest directory when trace files are created to allow everyone to read them." (

  • Is there a way I can view the contents through SMSS (since I seem to have adequate permission there, if not to the file itself?)

  • Something else that would be even better I haven't considered?

Sorry if my terminologies are rough--the whole dba thing is new to me.

Thanks in advance! My sys-admin will appreciate not being bugged to set permissions (again.)

share|improve this question
up vote 8 down vote accepted

To view the trace file contents in SMSS, I am using the following function: FN_TRACE_GETTABLE. To run FN_TRACE_GETTABLE, the users don't need any permissions on the server's file system. Only the account that is running the service must have the permissions to access the trace file, but it already has them, because it has created the trace file in the first place.

I have an automated job that uploads a trace file into a table every weekend, and neither me nor the account running the job have any permissions on the server's file system. This is running 2008 R2.

When I was developing that job, I had run FN_TRACE_GETTABLE from SSMS quite a few times.

share|improve this answer
Perfect! I'll vote you up just as soon as I'm able. – emragins Mar 21 '12 at 22:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.