Duty Free!!

SQL Write-Ahead Overhead…

SQL Server Management Studio Tips

sql server management studio.

Starting SSMS is easy..just Run ‘ssms’. This client tool for SQL Server helps managing the SQL Server a comfortable task. One can align the tabs in a manner that suits their kind of work.

Tip1 : Integrate BOL as a tab in the SSMS : This can be done using Tools -> Options -> Help . In the Show Help using field select  ” Integrated help viewer”.  So when ever you press F1, the SSMS wouldnt start a new window but opens the BOL as  a tab. Search also opens as a tab as you can see in the  SSMS image above.

Tip2 :  Most of the times I would run sp_who2 to know the current connections on the server.  Keyboard shortcuts can be configured for stored procedures through the Options->keyboard window.

Tip 3:  The Template Explorer [ To your right in the image], is a feature which helps in standardizing your queries. Ctrl+Alt+T shall open the Template Explorer. You can drag and drop a  template into your Query tab. Then press Ctrl+Shift+M to fill the Template parameters.  For creating your own templates, the following link shall help.

Tip 4: In SSMS 2008, the ‘go’ statement takes a int parameter. This is a SSMS and SQLCMD feature and may not be a change in the actual Query Engine. The parameter is like a simple loop so the statement can execute those many times.

Tip 5:  For all of us who use shortcuts, a good feature is to have the shortcuts displayed beside the tasks/tooltips  themselves to be aware the next time. To configure rightclick on Toolbar+ customize. Check the “Show Screentips on toolbars” and “Show shortcut keys in screentips”.

Tip 6: Most people know the common Ctrl+Tab to move between query tabs. Also Alt+F6 can be used to move within Tab groups. Ctrl+R to hide/unhide Result window. Also F6 can be used to move between Frames.

Tip 7: To automatically register local servers in Registered Servers tab, rightclick on Localservers Group ->Tasks->Register Local servers. Also we can export the registered servers so they can be imported to other servers’ management studio. This would be of great help in passing  the registered servers on to other machines.

Tip 8:  At times we need to save the Gridresultset into a CSV file. By default the column header isnt copied .To have the Column header copied as well, go to Tools-> Options>Query Results>SQL Server> check the “Include Column headers when copying or saving the results.” One more import screen in the Tools->Options is the Text Editor->Transact SQL> General. This form contains settings for Word wrap, line numbers. The Intellisense form can be used to disable Intellisense just incase you are scripting directly on a Prod Server.

Tip 9: Intellisense has been a visible addendum to SSMS 2008. Sometimes we would want to disable for a session and this can be done by Rightclick on Query window and click Intellisense Enabled.

Keep in mind that all the above tips work in SSMS 2008 but some wont on SSMS 2005.

Advertisements

April 25, 2009 Posted by | SQL Server | , , , , , | Leave a comment