Loading analysis services profiler traces into a table

Profiler is a handy tool to find out what is happening on your server. Since SQL Server 2005, this tool can also be used to analyze Analysis Services. I’m pleased to see that many people start using this tool, and save the profiler traces into text files, since this is faster than storing them directly in a table (remember, databases are one of the slower mechanisms to store data in: security, reliability, they all come at the price of performance: a stupid binary file is not secure nor reliable, but it is faster to write to).

The problem however is that you need to upload these trace files into a relational table afterwards if you want to query them easily. For trace files coming from tracing the relational database, there is a nice table valued function fn_trace_gettable that helps you loading the data in a table. Unfortunately, this function doesn’t work for trace files from Analysis Services.

But there is a manual workaround: load the trace file in the profiler, and then use the Save As functionality of the profiler, where you can save in a relation table: