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 off
if '%1'=='' goto nofile
goto file
:nofile
echo. > %TEMP%\Untitled.sql
start sqlwb -nosplash %TEMP%\Untitled.sql
goto end
:file
start sqlwb -nosplash %1
:end

 


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

3 comments:

Buck Woody said...

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

Michael said...

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

Dav said...

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