Considering am having a trace file in the location,
"C:\Program Files\Microsoft SQL Server\MSSQL10.SQLSERVER2008\MSSQL\DATA\audittrace20100707161605.trc" How to open the trace file? Is it possible to fetch it as a table. So that, we can play around the data available in the trace.
Option 1 - We can see the trace file using SQL Profiler.
Option 2: Use the below query to read the data in SSMS
SELECT *
FROM ::fn_trace_gettable(
'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLSERVER2008\MSSQL\DATA\audittrace20100707161605.trc', default
)
GO
::fn_trace_gettable -> this function will read the trace file and the output is a table.

Cheers,
Venkatesan Prabu .J
Dear Venkatesan,
ReplyDeleteWe would like to invite you to attend a CTO summit being held on Aug 2 at Bangalore.
Was unable to find your email address on your blog. Do let me know where i can send the invite.
thanks
Brian
You might be interested in taking a look at the collection of Tutorials and videos on MS SQL server.
ReplyDeleteTutorials: http://www.dataminingtools.net/browsetutorials.php?tag=mss
Videos: http://www.dataminingtools.net/videos.php?id=3