title: How to dump an output from SQL Server Profiler 2008 to a CSV-like file
body: <p>I am debugging stored procedures, and right now I am interested in what ran in what order and which which parameters as opposed to how fast things ran and what may sneak in between and cause a slowdown.</p>
  
  <p>So, I captured a couple of minutes worth of trace. The problem is that there is too much stuff, and I need to narrow it down. If I do <code>File -&gt; Save As</code>, I get the following options:</p>
  
  <ul>
  <li>Trace File...</li>
  <li>Trace Template...</li>
  <li>Trace Table...</li>
  <li>Trace XML File...</li>
  <li>Trace XML File for Replay...</li>
  </ul>
  
  <p>Now, these are decent options, but what I really want is a tabular format, such as CSV. I think that commas in SP trace would probably mess up the CSV format. I would gladly use something else, such as <code>||</code> as a delimiter.</p>
  
  <p>Once I do have the tabular format, I can filter it down using <code>grep</code>, etc. and then easily process it with Python to see the exact things I want. I started parsing the XML file with a script, but found myself spending too much time on the trace <code>XML</code> file format (have not used <code>lxml</code> library before).</p>
  
  <p>So ... is there an easier way? Can I at least copy it to Excel somehow?</p>