Saturday, September 29th, 2007

Query Analyzer, Resurrected.

Carpe Datum over at MSDN talks about people wanting Query Analyzer back over Management Studio.  I admit, the lack of Query Analyzer has been a source of ire for me as well.  I like the default Management Studio for editing databases and what not, but if I want to whip up a quick query or something I miss query analyzer.  Unfortunately the solution he provides causes Management Studio to always assume you want to run a query.  After a bit of fooling around, I came up with a batch routine that seems to mimic Query Analyzer pretty well.  I present to you isqlw.bat :)

 

@echo offif  ‘%1′==” goto nofilegoto file:nofileecho. > %TEMP%\Untitled.sqlstart sqlwb -nosplash %TEMP%\Untitled.sqlgoto end:filestart sqlwb -nosplash %1:end

 

This works well for me, YMMV of course, but I hope you might find it useful.

3 Comments on “Query Analyzer, Resurrected.”

  1. Buck Woody

    Great info - especially the -nosplash bit. I forgot to mention that one.

  2. Michael

    Yeah, I was pleasently surprised to discover that sqlwb.exe supported the /? switch :)

  3. Dav

    Nice work, that batch file’s made of 100% win! :)

Leave a Reply