Home > SQL Server Tips > Database Management and Administration > A guide to basic new features in SQL Server Management Studio 2008, part 1
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE MANAGEMENT AND ADMINISTRATION

A guide to basic new features in SQL Server Management Studio 2008, part 1


Roman Rehak, Contributor
12.09.2008
Rating: -4.25- (out of 5)


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


This is the first part of two articles that cover the new features in SQL Server Management Studio released in August 2008. The second part covers advanced features in SSMS 2008.

When SQL Server Management Studio (SSMS) was first introduced with SQL Server 2005, Microsoft's main goal was to combine some of the existing tools and to integrate functionality provided by Query Analyzer and Enterprise Manager.

As expected, SSMS 2008 includes several new features and improvements – some of which have been requested for years. This article will introduce several new useful SQL Server Management Studio features, and later part 2 will show more advanced new features.

IntelliSense support. IntelliSense is a feature that monitors the context of what you are typing in the code editor and prompts you with syntax help or some likely choice to finish what you are typing. When implemented properly, it can be a huge time saver. It's one of those features that once you are used to it, you can never go back. If I recall correctly, this feature goes all the way back to Visual Basic 5.0 and has been included in every version of Visual Studio. But for some reason, the SQL Server team has been struggling for a long time to implement it.

IntelliSense appeared in the first beta version of SQL Server 2005 back in 2003, but it was removed by the RTM version. Again, IntelliSense was present in the CTPs of SQL Server 2005, but before the product was finished, Microsoft announced that the feature would only be supported when connected to a SQL Server 2008. So if you work a lot with SQL Server 2000 or 2005, you still have to rely on third-party tools such as Red Gate Software Ltd.'s SQL Prompt.

IntelliSense has syntax help, word completion, a list of available database objects and a list of system functions among other things. One feature I find very helpful...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
SQL Server Migration Strategies and Planning
PASS Summit 2009 Preview
Are data warehouses made for the cloud?
Q&A: Moving forward with SQL Server in the cloud
SQL Server Mailbag: Migrating down to Standard Edition
Using Microsoft Hyper-V for SQL Server consolidation
Migrating to SQL Server 2008 and leveraging new features
The challenges of SQL Server consolidation
Testing a SQL Server environment before an upgrade
SQL Server Consolidation Fast Guide
SQL Server consolidation strategies and best practices

Microsoft SQL Server 2008
Q&A: SQL Server 2008 a better fit for consolidation
End of life comes for SQL Server 2005 SP2, 2008
Microsoft releases SQL Server 2008 R2 CTP
What's new for installation with SQL Server 2008?
SQL Server Reporting Services 2008 offers faster speeds, new variations
Microsoft SQL Server 2008 Learning Guide
A first look at Microsoft SQL Server 2008 R2
Understanding transparent data encryption in SQL Server 2008
Working with sparse columns in SQL Server 2008
Implementing SQL Server 2008 FILESTREAM functionality

Microsoft SQL Server Performance Monitoring and Tuning
SQL Server Mailbag: CALs, witnesses and unwanted changes
SQL Server Mailbag: Data restoration and DB property management
Working with IntelliSense in SQL Server 2008 Management Studio
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Troubleshooting Distributed Transaction Coordinator errors in SQL Server
Clearing the Windows page file and its effect on server performance
Optimizing SQL Server indexes –- even when they're not your indexes
Performance implications of transaction log autogrowth in SQL Server
The short course on how SQL Server really works
Determining the source of full transaction logs in SQL Server

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
contiguity  (SearchSQLServer.com)
contiguous  (SearchSQLServer.com)
drilldown  (SearchSQLServer.com)
hashing  (SearchSQLServer.com)
hybrid online analytical processing  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


is the listing of parameters for a stored procedure call. Once you type a stored procedure name and hit the space key, you should see the list of procedure parameters, including their data types. IntelliSense also identifies misspelled keywords, similar to the way a spell checker does.

Region outlining. This feature implements collapsible regions by grouping together a set of related statements and allowing you to quickly hide or expose entire sections of code. Just like IntelliSense, it has been in Visual Studio for a while. Now, finally, database developers and DBAs can improve their productivity by being able to better navigate within large code files. A region is automatically created for a batch, BEGIN-END, BEGIN TRY-END TRY and BEGIN CATCH-END CATCH blocks. The screenshot in Figure 1 shows region outlining. Both batches are the same, but the first batch is almost hidden in a collapsed region.

[IMAGE]
Figure 1: Region outlining in SQL Server Management Studio 2008 features collapsible regions. (Click on image for enlarged view).

Multi-server queries. With SSMS 2008, you can now execute the same script against multiple servers simultaneously. This can be very handy for multi-server administration or for easily comparing results from different servers. The feature works with the Registered Servers window.

First, you need to create a group of registered servers. Next, you right-click on the group and select New Query. The code in the query window executes against each server in the group that's currently running and is accessible from SSMS. The status bar in the lower left corner shows how many servers the query window was able to connect to, against the total number of servers in the group. You should see something like 5/5 or 4/5, if one server in the group is stopped at the moment. You can define whether you want to receive results in a combined result set or whether you want a separate result set for each server. However, results can only be merged into a single result set if all result sets have the same schema – that behavior is sort of similar to using the UNION clause. You can also configure whether the result set should include the server name. The screenshot in Figure 2 shows the configuration dialog for multi-server queries.

[IMAGE]
Figure 2: SQL Server Management Studio 2008 features a configuration dialog allowing multi-server queries. (Click on image for enlarged view).

It takes some time to get used to the results returned by a multi-server query. In my opinion, it is a good idea to include the server name in the results to easily identify where the data came from. I personally prefer to not merge results into a single result; if the query returns a lot of columns, you have to keep scrolling to the left to see where the data came from. You also have to examine any error messages very closely to identify which server they came from and to determine whether you need to take corrective action on some servers before you continue executing further multi-server queries.

Custom colors in connection properties. SSMS allows you to define a custom color when creating a connection to a SQL Server instance. Then when you connect to the instance, the status bar for the query window shows in the color you selected. This gives you a quick visual hint to help you figure out what server you are connected to without reading the details on the status bar – and perhaps prevent you from executing your script on the wrong server.

One idea floating in the SQL Server blogs is to configure all development servers with one color, QA servers in another color and then production servers with a color that really stands out to help you stay extra cautious when working directly with production data. But, you have to be really careful because this only works when you create a new connection but not when you change the existing connection and point to another server.

If you are connected to Server A and the status bar is green, the bar will stay green when you change the connection for the query window to point to Server B, even if Server B is registered to show in another color. This could be potentially dangerous since you actually could be connected to a different server than the custom color is indicating. Then you run the danger of accidentally executing scripts on the wrong server. If you are going to use this feature, I recommend that you train yourself to close the query window and start a new connection rather than reconnecting to another server.

ABOUT THE AUTHOR:   

[IMAGE]Roman Rehak is a senior database architect at MyWebLink.com in Colchester, Vt. He specializes in SQL Server development, database performance tuning, ADO.NET and writing database tools. He regularly contributes SQL Server articles to Visual Studio Magazine, SQL Server Magazine and other technical publications and presents at user groups and conferences in the U.S. and Canada. He is an active member and volunteer for the Professional Association for SQL Server. Roman also serves as Tech Chair for the SQL Server track at the annual DevTeach conferences in Canada and is president of the Vermont SQL Server User Group.

MEMBER FEEDBACK TO THIS TIP

Do you have a comment on this tip? Let us know.


Rate this Tip
To rate tips, you must be a member of SearchSQLServer.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



SQL Server Development - .NET, C#, T-SQL, Visual Basic
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts