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?

link|improve this question
feedback

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.

link|improve this answer
feedback

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)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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