SQLServerCentral.com / Discuss Content Posted by Yakov Shlafman / Article Discussions by Author / Article Discussions / Starting Query Analyzer / Latest PostsInstantForum.NET v99.99.99SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comFri, 09 Dec 2016 21:02:30 GMT20RE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>Of course, there is always another way to start QA <img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'></P><P>How about creating an association to a script file extension - I guess most of us use .SQL. The association can be set via the QA Options - General Tab. Set "Select SQL Query Analyser as the default editor ... etc" to true. Then a simple "double-click" of the script file from Windows Explorer initiates the loading of QA. Make sure you choose the correct database before executing the script.</P><P>There is a down side to this if you use an external text editor for creating scripts. Obviously, that editor will no longer act as the double-click default. To overcome this, there is always the "open With" option when you right-click a script file. WinXP will remember this after the first time it is done (you may have to go through selecting a program the first time it is done) so that QA always appears as an option thereafter.</P><P>It is also not a great method if you are working with multiple databases/servers. But for DBAs predominantly working on a single database it certainly provides a fast method of opening QA with the added advantage of already displaying the script you want.</P><P>So there you have YAC - yet another choice - just what everyone needs.</P><P> </P><P>Rowan Shattky--------------Life is not a chair to sit on, but a cliff to hang from.</P>Wed, 12 Oct 2005 22:49:00 GMTProofOfLifeRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT style="BACKGROUND-COLOR: #dddddd" size=1>Also, one little know tip for the Quick Launch menu, re-size the toolbar so that only the double arrows are visible, if you click the arrows a popup menu appears and you can select your shortcut from the menu. Below is a screenshot of how this looks on my home computer with the toolbar title visible. </FONT></P><P><FONT color=#1111ff><EM>That would certainly save task bar space, especially if you have other tool bars. I can't get my QuickLaunch bar that small though - the smallest it will go is 3 icons wide. Is there some trick to make it smaller?</EM></FONT></P></BLOCKQUOTE><P><FONT color=#111111>You need to show the toolbar title. The title comes from the folder name, so just make it a short name.</FONT></P><P> </P>Wed, 12 Oct 2005 17:14:00 GMTphilcartRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspxIf you have a particular database, or group of databases, you use regularly you can modify the properties of your shortcut in the quick launch bar (or your desktop, for that matter) by doing the following. 1. Right-click on the Query Analyzer Shortcut, select "Properties". 2. Modify the Target to be something like this ""C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isqlw.exe" -SYourServerName -dYourDBName -E". Naturally, if you are using a SQL Login, you'll need to make a few adjustments, but hopefully y'all get the idea. It sure saves time! One click and you are in Query Analyzer using the Server and DB you need. I several shortcuts in my quick launch bar, one for each server/database I use repeatedly throughout the day.Wed, 12 Oct 2005 08:27:00 GMTsmstankusRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>Philcart</P><P><FONT style="BACKGROUND-COLOR: #dddddd" size=1>Also, one little know tip for the Quick Launch menu, re-size the toolbar so that only the double arrows are visible, if you click the arrows a popup menu appears and you can select your shortcut from the menu. Below is a screenshot of how this looks on my home computer with the toolbar title visible. </FONT></P><P>That would certainly save task bar space, especially if you have other tool bars. I can't get my QuickLaunch bar that small though - the smallest it will go is 3 icons wide. Is there some trick to make it smaller?</P><P><FONT style="BACKGROUND-COLOR: #dddddd" size=1>You can also create your own toolbars full of whatever shortcuts you need. Just choose "New Toolbar..." from the Toolbars menu. I have 4 on my work computer, "Quick Launch", "SQL Admin", "Development" and "Remote Desktops".</FONT></P><P>This is an excellent idea, especially the Remote desktop one (I often have 4 or 5 desktops open at any one time). You can then create a seperate .rdp file for each shortcut, to save the settings for that remote server, including the password (if you want to save it) for instananeous log in. Thanks!</P><P>Incidentaly, as this thread started by discussing command line switches, there is a really good one for TerminalServer/Remote Desktops. If you add the switch <STRONG><FONT face="Courier New" color=#3333dd>/console</FONT></STRONG> to the command in the shortcut (or start RD by entering <FONT face="Courier New" color=#3333dd><STRONG>mstsc /console</STRONG></FONT> into the Run dialogue) then you get the actual deskop of the server, not a virtual console. If someone is using the console at the time, they get logged off, unless you are using the same account, in which case you get to takeover their session (they are still locked out though). This is the only mode remote sessions to XP machines work, and is an optional switch on Win2K3 remote desktops. It doesn't work when connecting to a Win2K machine though <img src='images/emotions/sad.gif' height='20' width='20' border='0' title='Sad' align='absmiddle'> </P><P>Regards</P><P>Adam</P>Wed, 12 Oct 2005 08:25:00 GMTAdam-150390RE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>Another quick way would be to assign a combination of keys to the shortcut and then you could open it with ctrl-alt-q for example.</P><P>You can do this by right clicking the shortcut, properties, short cut key.</P><P>I use this technique a lot because I have a bad hand and moving from keyboard to mouse is difficult so I use keyboard shortcuts with keys I can press with the left hand.</P><P> </P>Wed, 12 Oct 2005 07:36:00 GMTCraig A. SilvisRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspxBeing able to run Query Analyzer from the command line was worth the price of admission, that is the time I took to read the article. I will use that alot!Wed, 12 Oct 2005 07:08:00 GMTjwainzRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>One of my most used command-line switches is -C. This loads a previously saved configuration file. Comes in very handy when you have a couple of people working on a server via remote desktop and they each have their own favourite fonts <img src='images/emotions/wink.gif' height='20' width='20' border='0' title='Wink' align='absmiddle'></P><P>Also, one little know tip for the Quick Launch menu, re-size the toolbar so that only the double arrows are visible, if you click the arrows a popup menu appears and you can select your shortcut from the menu. Below is a screenshot of how this looks on my home computer with the toolbar title visible. </P><P>You can also create your own toolbars full of whatever shortcuts you need. Just choose "New Toolbar..." from the Toolbars menu. I have 4 on my work computer, "Quick Launch", "SQL Admin", "Development" and "Remote Desktops".</P><P><IMG alt="" hspace=0 src="http://www.philcart.net/blogmedia/ql_menu.jpg" border=0></P>Wed, 12 Oct 2005 05:39:00 GMTphilcartRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>This is what my start menu looks like</P><P><IMG alt="Start Menu" hspace=0 src="http://glossopian.co.uk/uploads/Main/StartMenu.jpg" align=baseline border=0></P><P> </P><P>Windows Key followed by 1 Opens QA, Windows Followed by 2 EM. I also have short cuts assigned on the Shortcuts, so I can press Ctrl + Alt + 1 for QA etc.</P><P> </P><P> </P>Wed, 12 Oct 2005 05:04:00 GMTDavid JacksonRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>After all these years as a dba, finally someone has shown me how to become a power user!</P><P> </P><P>Fantastic, thank you all!</P>Wed, 12 Oct 2005 04:47:00 GMTRichBRE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>Of course, there are other, MUCH simpler ways of adding shortcuts to your Quick Launch bar, and of opening the Run dialogue. <img src='images/emotions/tongue.gif' height='20' width='20' border='0' title='Tongue' align='absmiddle'></P><P>First, shortcuts. Click on Start, and navigate to the program you want to add to Quick Launch (QL). Instead of the 6 steps to 'Send it to your desktop', then drag it from your desktop to the QL bar, just RIGHT click and drag straight from the Programs menu to the QL bar. When you relaes the mouse, select 'Copy To' rather than the default 'Move To' otherwise it will dissapear from the Programs menu.</P><P>To launch 'Run', just use the 'WindowsKey + R' shortcut - much easier than adding another shortcut to the QL bar (WindowsKey + E also opens Explorer a great deal faster than using any menus).</P><P>The command line switches were useful. Unless you try each Windows executable from a command line, it is not always obvious which support switches and which don't. Query Analyser supports several more of them too. Open the Run dialogue, and enter <FONT face="Courier New" color=#1111ff><STRONG>isqlw /?</STRONG></FONT> to get a full list.</P><P>Regards</P><P>Adam</P>Wed, 12 Oct 2005 03:06:00 GMTAdam-150390RE: Starting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspx<P>Yakov,</P><P>Like you said, there are several ways to get in to QA. One other method of starting QA that you didn't mention, and the one I tend to use the most, is to start it from within Enterprise Manager. By using the appropriate shortcut keys for the Enterprise Manager "<FONT face="Courier New"><U>T</U>ools</FONT>" and then "<FONT face="Courier New">SQL <U>Q</U>uery Analyzer</FONT>" menu options you can fire off QA with a combination of "<FONT face="Courier New">Alt+T</FONT>", "<FONT face="Courier New">Q</FONT>" keystrokes. This method has the added feature of using whatever credentials you are currently running EM with.</P><P>Another method you could use would be to assign a "Shortcut Key" combination to the QA entry in your Program Files - this can be done by right-clicking the QA entry and looking under its properties. I don't actually have a shortcut key combination set up for QA but I have set up several others which save me time on a regular basis (e.g. Ctrl+Alt+W to load Word, Ctrl+Alt+X to load Excel, Ctrl+Alt+N to load Notepad, Ctrl+Alt+E to load Enterprise Manager...)</P><P>I know it's personal preference but if I can ever find a way of doing things without a mouse, or any other pointing device, I will.</P><P>Mark</P>Wed, 12 Oct 2005 01:51:00 GMTsheptonStarting Query Analyzerhttp://www.sqlservercentral.com/Forums/Topic218244-247-1.aspxComments posted to this topic are about the content posted at <A HREF="http://www.sqlservercentral.com/columnists/yShlafman/startingqueryanalyzer.asp">http://www.sqlservercentral.com/columnists/yShlafman/startingqueryanalyzer.asp</A>Thu, 08 Sep 2005 21:40:00 GMTYakov Shlafman