• About
    • Blog
    • Business Process
    • Charity Work
    • History
    • News
  • Services
    • Legacy System Support
    • Bespoke System Development
    • Web Design & Development
    • View all services
  • Products
  • Our work
    • Customers
    • Case Studies
  • Careers
  • Contact
Microsoft Partner - Application Development
13th October 2014

Tip: Retrieving SQL Commands from SQL Profiler

PSP Knowledge SQL SQL Profiler SQL Statements TextData
Tip: Retrieving SQL Commands from SQL Profiler

The Issue

So, the other day I am sitting around watching a bit of SQL Profiling on the old laptop, to see what a set of API requests were actually doing to a database, when I realised that there was no easy way to copy the all the executions into my documentation.

I tried all sorts from selecting all the rows and doing a copy and past to individually selecting just the execution rows and copying the statements from the preview window but I either ended up with statements in the wrong order or a stack of tabular data that turned to mush everytime a line feed was present.

All I wanted was the actual TextData column. Ah! I know, lets remove all the columns apart from that one and then copy and…… er no. All the columns were copied again.

By this point my head was hurting. Surely I am not asking for much here. Then, on came the lightbulb.  Dimely at first but within a few seconds was bright enough to mezmorise even the most streetwise of rabbits.

The Solution

Within the File | Save As menu is the option to save the trace as a table. Yep, a table. After that it was plain sailing with a sprinkle of complicated SQL (SELECT TextData FROM MyTrace) and a slice of copy and paste, I had my single column of data.  All that was left was remove the unwanted junk, using my good old friend Del, and job complete.

And there you go. A simple solution to what should be a simple task. I hope this tip is helpful and as usual, constructive critisism and suggestions are welcome.

Share:
PSP IT Design & Development
About Us
  • Privacy Policy
  • History
  • Customers
  • News
  • Blogs
Services
  • Legacy System Modernisation
  • Website Design & Development
  • Bespoke Application Development
  • Outsource IT Strategy
  • All Services
Contact
  • 01775 722377
  • letstalk@psp-it.co.uk
  • Carver House, Apex Court, Spalding Office Park, Elsoms Way, Pinchbeck, Spalding,Lincolnshire, PE11 3UL

Terms & Conditions Privacy Policy

© PSP People Systems Process Ltd. 2022. All Rights Reserved.

MENU

MENU

  • About

    • Blog

    • Business Process

    • Charity Work

    • History

    • News

  • Services

    • Legacy System Support

    • Bespoke System Development

    • Web Design & Development

    • View all services

  • Products

  • Our work

    • Customers

    • Case Studies

  • Careers

  • Contact

© PSP People Systems Process Ltd. 2022. All Rights Reserved. Privacy Policy

give us a call
01775 722377
drop us an email