:::: MENU ::::

Posts Categorized / SSMS tips and tricks

  • Mar 30 / 2012
  • 0
DBA best practices, dbDigger, Performance Tunning and Optimization, SSMS tips and tricks, T-SQL Tips and Tricks

Move the columns to required position in SSMS result pane

It is always good to have a clear idea of filtered data and order of columns for any required result. However, consider the scenario that you have executed a resource intensive query and got the data in SSMS result pane. And after having a look at the result set you perceive that moving a column prior to a specific one may improve the report.
A option may be to change the order of columns in query and re-generating the result set to required order. But this would again consume resources for that resource intensive query. Best solution for changing column order in result set would be by dragging the column to required position.
Here is an example, i have retrieved result from AdventureWorks database and later moved the column [Phone] from last to second last position.

Swaping the columns in SSMS results pane

This simple tip may prevent the re-execution of query for column re-ordering purpose.

  • Feb 20 / 2012
  • 0
dbDigger, SSMS tips and tricks, T-SQL Tips and Tricks

Copy and paste among multiple lines in SSMS

SQL Server Management Studio (SSMS) is my favorite tool and m fan of it right from its start with SQL Server 2005. With every new release SSMS got more coll features for DBAs. Recently i came across a very useful feature in SSMS query pane. It allows to select specific content from multiple lines in query pane. This feature is extremely helpful when we are required to select table names, column names or even values from the script. The selected values may be deleted or copied as required. And may be paste in same alignment any where among the text.

Basically the technique is to hold the ALT key and drag the mouse on required text in SSMS query pane. Following is an example of its usage and you may use it for many tasks in more creative manner.
Suppose i am required to select just table names given in three seperate T-SQL statements. I would press ALT key and start dragging the mouse on required data. The selection would be as shown in following snap
select data from multiple lines in SSMS

Now we may copy data for onward use. It is notable that during the paste process data would preserve its alignment that was during the copy process. Spend some time to play with this cool feature and make use of it.

  • Dec 06 / 2010
  • 0
dbDigger, Publications of Atif Shehzad on MSSQLTips.com, SSMS tips and tricks

Scripting every task performed through SSMS GUI

Recently i explored a wonderful option provided in SQL Server Management Studio. SSMS allows to generate script for any operation performed through its GUI. It is awesome and provides you a comprehensive and authentic T-SQL code reference. You may save the GUI tasks performed in form of .sql files. Such code may be reused in daily tasks or scheduled jobs.

Click here to read my article for details of using this feature of SSMS.

  • May 12 / 2010
  • 0
dbDigger, SSMS tips and tricks

How to increase font size in SSMS query pane

While working in query pane of your favorite SQL Server Management Studio (SSMS), you may be required to change font size in SSMS query pane. For this click on Options in Tools menu of SSMS.
Options frame would be opened. Click on Fonts and Colors under environment as shown in snap. On right side you have font size drop down along with several other fonts and colors related settings.

Change font size of query pane in SSMS

Adjust the font size and Click Ok. changed font size would be immediately implemented even in already opened query panes.

  • May 04 / 2010
  • 0
DBA best practices, dbDigger, SSMS tips and tricks

Customize SSMS startup environment for object explorer, query pane and activity monitor

After launching SQL Server Management Studio (SSMS) you always modify the environment by opening query pane or by opening/closing the object explorer. In SSMS i am also habitual to use activity monitor. Fortunately SSMS provides you option to modify the start up environment. At start up you can configure SSMS to open

  • empty environment
  • object explorer
  • query pane
  • both object explorer and query pane at same time
  • In SSMS 2008 open object explorer and activity monitor at same time

To configure your SSMS start up environment. Just go to Options in tools menu.

Open Options in SSMS

Now open ‘At start’ drop down list in produced options frame. It is under ‘General’ heading as marked in snap below.

Configure SSMS startup options

Select required environment and click Ok to save the settings. Next time when you would open SSMS you have your required environment there. Activity monitor of SSMS 2008 can be used with SQL Server 2005 instance.

Pages:1234567
Consult us to explore the Databases. Contact us