Take the 2-minute tour ×
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. It's 100% free, no registration required.

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." (http://www.petefinnigan.com/ramblings/how_to_set_trace.htm)

  • 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
add comment

1 Answer

up vote 7 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
add comment

Your Answer

 
discard

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.