Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to open the default trace file (log_17.trc) from dir

C:\Program Files\Microsoft SQL Server\MSSQL10.INSTC\MSSQL\Log

I get the following error in the SQL Server profiler:

Failed to open file. Access is denied

I'm using sysadmin account. I'm on Windows 7. Any ideas?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

I just recreated the problem on my own Windows 7 machine running SQL Server 2008 R2 SSMS and SQL Server 2008 Data Engine, and I had to start start SQL Profiler in elevated mode (Run as Administrator) to open the default trace files.

share|improve this answer
add comment

Try this:

SELECT * FROM fn_trace_gettable( convert (varchar(1000),(SELECT value FROM ::fn_trace_getinfo(default) where traceid = (select max(traceid) from ::fn_trace_getinfo(default)) and property = 2 )) , default)

share|improve this answer
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.