This simple-looking little tool (currently a time-limited unsupported preview) is there to remember your queries, even those you didn’t save. For example, I wrote a query to analyse someone else’s problem on Ask SSC, and didn’t save it. Naughty. Particularly if I want to see what that query was at a later date… Now, however, Red Gate’s SQL Tab Magic, a SSMS add-in, is here to the rescue. It saves your query to its own repository, whenever you execute a query or when you exit SSMS, or even (seemingly) periodically. Which is very helpful.
Another trick up Tab Magic’s sleeve is that it remembers which tabs you had open when you shut down SSMS, and brings those back, complete with any unsaved queries, even if SSMS crashed out (or was killed).
The final question, then – what about when SSMS crashes out? Well, you’re still stuffed, but at least you’ve got another tool to help you recover your work…
I like this tool. Nice and simple. Does the job. Looks good.
This is not the only tool out there that does similar things – Mladen Prajdic (blog|twitter) provides the SSMS Tools Pack, that has some of this functionality already, in as much as it keeps track of queries that you don’t save. And the SSMS Tools Pack does so much more than “just” the query tracking stuff! If you’re not using it, check it out – it (a) is free, and (b) works with other versions of SSMS, including old and new… (OK, I say “free” in that Mladen doesn’t charge for it, but, if you use it, and you find it useful, then you really ought to help fund his lifestyle through the handy links on his site!)