<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Bill Ramos on SQL Server</title><subtitle type="html">Adventures in SQL Server</subtitle><id>http://blogs.msdn.com/billramo/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/billramo/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-03-26T20:16:39Z</updated><entry><title>New Manageability White Papers for SQL Server 2008</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/06/12/new-manageability-white-papers-for-sql-server-2008.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/06/12/new-manageability-white-papers-for-sql-server-2008.aspx</id><published>2009-06-12T22:48:17Z</published><updated>2009-06-12T22:48:17Z</updated><content type="html">&lt;p&gt;&lt;/p&gt;  &lt;p&gt;TechNet Books Online just published three whitepapers - check them out!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SQL Server 2008 Management Data Warehouse: &lt;a href="http://msdn.microsoft.com/en-us/library/dd939169.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd939169.aspx&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;SQL Server 2008 Policy-Based Management: &lt;a href="http://msdn.microsoft.com/en-us/library/dd938891.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd938891.aspx&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Understanding and Using PowerShell Support in SQL Server 2008: &lt;a href="http://msdn.microsoft.com/en-us/library/dd938892.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd938892.aspx&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9738194" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author></entry><entry><title>DAT315 – Session Review for SSMS Tips &amp; Tricks Session</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/05/15/dat315-session-review-for-ssms-tips-tricks-session.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/05/15/dat315-session-review-for-ssms-tips-tricks-session.aspx</id><published>2009-05-15T19:37:41Z</published><updated>2009-05-15T19:37:41Z</updated><content type="html">&lt;p&gt;One of the attendees of my TechEd session “DAT315 - Manageability Series: Uncover Hidden Secrets of T-SQL Scripts with Microsoft SQL Server Management Studio” suggested that I post the list of demos that I did for the session so that they could remember the ah-ha moments. Here we go.&lt;/p&gt;  &lt;p&gt;Object Explorer Details (OED)&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The property pane below the list of objects can be expanded to show more properties.&lt;/li&gt;    &lt;li&gt;Right click on the column header in OED to add columns. Columns can be sorted. Settings stored for each object type.&lt;/li&gt;    &lt;li&gt;When you copy selected rows, the headers are included. the example was to sort tables by row count, copy the top 10 items, paste in Excel. In Excel, press Alt+F1 to chart the result.&lt;/li&gt;    &lt;li&gt;Navigate as you type works in OED based on the sorted column. The same works in Object Explorer – just need to include the schema name. Use the Filter command to focus on a set of objects you are working with.&lt;/li&gt;    &lt;li&gt;Use the Search command in the toolbar area of OED to look for object names. If you are in a database, search looks for all objects with the matching name. Use LIKE expressions. If you start the search at the server level, search works across all databases. The Stop command halts the search.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Shell Tips&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Customize the toolbar through Tools | Customize or right click on toolbar and choose Customize command. Move toolbar buttons like Debug, Stop, and Parse to the end of your toolbar so that you don’t click them by accident. &lt;/li&gt;    &lt;li&gt;While in customize, take commands like Edit.SelectAll, and Edit.Delete and drag them on to the toolbar to duplicate the old Query Analyzer Erase button.&lt;/li&gt;    &lt;li&gt;Showed off the &lt;a href="http://blogs.msdn.com/billramo/archive/2009/01/19/find-strings-fast-in-sql-server-management-studio.aspx" target="_blank"&gt;Go to Find Combo box&lt;/a&gt; for Find, Help, and Commands.&lt;/li&gt;    &lt;li&gt;Use Dynamic Help command to show help for commands based on keywords the cursor is on with the T-SQL editor window.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Solutions and Projects&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create Projects for your scripts. You can use multiple projects per solution to organize your work.&lt;/li&gt;    &lt;li&gt;Set the Connect for your project to use as the default connection for scripts in your project.&lt;/li&gt;    &lt;li&gt;Bookmarks allow you to save positions within your scripts for marking TODO areas or places of interest. You can create folders to organize your bookmarks within your solution. Use the Edit | Bookmark command set to see the keystrokes. Bookmarks are saved with the solution.&lt;/li&gt;    &lt;li&gt;Use Templates to store your&amp;#160; standard scripts of interest. Each user has their own folder that you could push changes to using SMS. Use the Ctrl+Shirt+M command to replace template parameters that look like:     &lt;br /&gt; &amp;lt;object_name, datatype, default_value&amp;gt;&lt;/li&gt;    &lt;li&gt;Showed how you can change the default template for the New Stored Procedure command by going into the Program Files directory C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql\Stored Procedure.&lt;/li&gt;    &lt;li&gt;Modify the SQLFile.sql file in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql to add text to New Query windows.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Editor Tips&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Change the color of the Editor status bar to help prevent you from executing the wrong query against a production server. Use the connection properties for Registered Servers, or the Connection properties in the Connection dialog for OE or Editor windows to change the color.&lt;/li&gt;    &lt;li&gt;Use Tools | Options for Fonts &amp;amp; Colors to change the size of your tooltip. You can also change the size of the results in grids, etc.&lt;/li&gt;    &lt;li&gt;To Block Select text, use Alt+Mouse moving. With the keyboard, use Shift+Alt+ArrowKeys&lt;/li&gt;    &lt;li&gt;Delete leading Whitespace for a line of text or selected lines of text with Ctrl+K, Ctrl+\ combo.&lt;/li&gt;    &lt;li&gt;Use the spitter control at the upper right corner of the text editor window to split your file just like MS Word. You can also use the Window | Split command to do the same. Window | Remove Split to do just as the command states.&lt;/li&gt;    &lt;li&gt;Easily add a new line below the current line – regardless of cursor position in the line using Ctrl+Shift+Enter. Add a line above the current one using Ctrl+Enter.&lt;/li&gt;    &lt;li&gt;Move a line down using Alt+Shift+T. Sorry – no command to move the line up.&lt;/li&gt;    &lt;li&gt;Using Ctrl+I to incrementally search for text in the editor. It finds as you type. When you found what you are looking for, use F3 to Find Next and Sift+F3 to find previous. Search term goes into the Go to Find combo.&lt;/li&gt;    &lt;li&gt;If you collapse regions in you text and can’t find it using the Find command, make sure you set the search option Find in Hidden text.&lt;/li&gt;    &lt;li&gt;Use Ctrl+J with intellisense to replace one column with another. Use object aliases to make finding items easier.&lt;/li&gt;    &lt;li&gt;You can set options like – turn off Intellisense when working against a stressed production server – by using the Tools | options setting for the T-SQL Editor.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Debugging&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Demonstrated the 3 part series that I blogged about. Start with “&lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-1.aspx" target="_blank"&gt;Basic Debugging&lt;/a&gt;”&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;SSMS Start-Up Options and Activity Monitor&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Demonstrated how to change your Startup options to launch Activity Monitor each time you start SSMS.&lt;/li&gt;    &lt;li&gt;Demonstrated how to use Activity Monitor to track down queries with missing indexes. See blog entry “&lt;a href="http://blogs.msdn.com/billramo/archive/2009/01/13/not-more-excuses-of-missing-indexes-with-activity-monitor-in-sql-server-2008.aspx" target="_blank"&gt;Not more excuses of missing indexes with Activity Monitor in SQL Server 2008&lt;/a&gt;”&lt;/li&gt;    &lt;li&gt;Demonstrated how to use Activity Monitor to track down blocking queries.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Multi-Server Query Execution&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;From registered servers, run queries against any folder. Status bar is in a different color and shows how many servers will execute the query.&lt;/li&gt;    &lt;li&gt;Configure output options to include Server name and Login name in the results using Tools | Options for Multi-Server queries.&lt;/li&gt;    &lt;li&gt;Demonstrated using the template file by dragging the ChangeSAPassword template into a blank multi-server query editor. Here is the script example.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;-- Change SA password across servers   &lt;br /&gt;USE [master]    &lt;br /&gt;GO    &lt;br /&gt;ALTER LOGIN [sa] WITH PASSWORD='&amp;lt;Password_String, sysname, SAPassWord&amp;gt;';    &lt;br /&gt;GO    &lt;br /&gt;SELECT name, sid, modify_date     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FROM sys.sql_logins     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; WHERE name = 'sa';    &lt;br /&gt;GO &lt;/p&gt;  &lt;p&gt;Use the Ctrl+Shift+M key to replace the SA password.&lt;/p&gt;  &lt;p&gt;Thank you everyone who attended the session.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d6ec092d-a4c9-422b-b8ce-ebf722c0df2c" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://technorati.com/tags/TechEd" rel="tag"&gt;TechEd&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SSMS" rel="tag"&gt;SSMS&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9618859" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author></entry><entry><title>PowerShell Script Examples from DAT314</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/05/13/powershell-script-examples-from-dat314.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/05/13/powershell-script-examples-from-dat314.aspx</id><published>2009-05-14T05:36:42Z</published><updated>2009-05-14T05:36:42Z</updated><content type="html">&lt;p&gt;I’d like to thank everyone who attended my TechEd session today titled “Manageability Series: Microsoft SQL Server Automation on Steroids, Including PowerShell Support”. Sean McCown – SQL MVP – and all around DBA – creator of the Midnight DBA videos available at: &lt;a title="http://midnightdba.itbookworm.com/" href="http://midnightdba.itbookworm.com/"&gt;http://midnightdba.itbookworm.com/&lt;/a&gt; – was kind enough to stop by after the session to point out how the SQLPS shell doesn’t support plug-ins. Chad Miller’s SQLPSX library of useful scripts for working with SQL Server will work with the SQLPS shell – you just might not get all the functionality. Your best bet is to configure the standard PS shell as Michiel Wories describes in his blog post at: &lt;a href="http://blogs.msdn.com/mwories/archive/2008/06/14/SQL2008_5F00_Powershell.aspx" target="_blank"&gt;“SQL Server PowerShell is Here!”&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Here is a list of the PowerShell script examples that I demonstrated in my session that &lt;a href="http://blogs.msdn.com/buckwoody/default.aspx" target="_blank"&gt;Buck Woody&lt;/a&gt; provided to me.&lt;/p&gt;  &lt;p&gt;# TechEd PowerShell Overview examples for DAT314   &lt;br /&gt;# Originally from Buck Woody &lt;a href="http://blogs.msdn.com/buckwoody/default.aspx"&gt;http://blogs.msdn.com/buckwoody/default.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;# Show Databases not backed up in a day   &lt;br /&gt;DIR &amp;quot;SQLSERVER:\SQL\SQL1\SQL2K8\Databases&amp;quot; |     &lt;br /&gt;where-Object {((get-date)-($_.LastBackupDate)).days -gt 1} |     &lt;br /&gt;sort-Object -Property LastBackupDate |     &lt;br /&gt;select-Object Name, RecoveryModel, LastBackupDate &lt;/p&gt;  &lt;p&gt;# Server Discovery   &lt;br /&gt;$machine_name = &amp;quot;SQL1&amp;quot;    &lt;br /&gt;get-wmiobject -class win32_service -computer $machine_name&amp;#160; |     &lt;br /&gt;where { $_.name -like 'MSSQL*' -and $_.Description -like '*transaction*'} |     &lt;br /&gt;select name |     &lt;br /&gt;ConvertTo-HTML -title &amp;quot;Services&amp;quot; -head &amp;quot;&amp;lt;link rel='stylesheet' href='styles.css' type='text/css' /&amp;gt;&amp;quot; |     &lt;br /&gt;Out-File C:\ServiceNames.html &lt;/p&gt;  &lt;p&gt;# Show all services and their states using WMI   &lt;br /&gt;$strComputer = &amp;quot;.&amp;quot;    &lt;br /&gt;$tab = [char]9    &lt;br /&gt;$colItems = get-wmiobject -class &amp;quot;Win32_Service&amp;quot; -namespace &amp;quot;root\cimv2&amp;quot; -computername $strComputer | sort &amp;quot;State&amp;quot;    &lt;br /&gt;foreach ($objItem in $colItems) {write-host $objItem.State $tab $objItem.Name} &lt;/p&gt;  &lt;p&gt;#Write to the log:   &lt;br /&gt;$log = New-Object System.Diagnostics.EventLog     &lt;br /&gt;$log_type = &amp;quot;Application&amp;quot;    &lt;br /&gt;$source = &amp;quot;ApplicationName&amp;quot;    &lt;br /&gt;$message = &amp;quot;Message To Enter Go TechEd&amp;quot;    &lt;br /&gt;$eventid = 12347    &lt;br /&gt;$type = &amp;quot;Information&amp;quot;    &lt;br /&gt;$log.set_log($log_type)    &lt;br /&gt;$log.set_source($source)    &lt;br /&gt;$log.WriteEntry($message,$type,$eventid)    &lt;br /&gt;#Read the log:    &lt;br /&gt;get-eventlog application | Where-Object {$_.EventID -eq 12347}    &lt;br /&gt;get-eventlog application | Where-Object {$_.source -eq &amp;quot;ApplicationName&amp;quot;}    &lt;br /&gt;#Clear the event log    &lt;br /&gt;Get-EventLog -list | % {$_.Clear()} &lt;/p&gt;  &lt;p&gt;# Accout Group names using WMI   &lt;br /&gt;$groups = Get-WmiObject –computerName SQL1 Win32_Group     &lt;br /&gt;$groups | %{$_.Name} &lt;/p&gt;  &lt;p&gt;# Simple Yes and No    &lt;br /&gt;$s = 'Welcome to Powershell - You Like?'    &lt;br /&gt;[System.Reflection.Assembly]::LoadWithPartialName(&amp;quot;System.Windows.Forms&amp;quot;)    &lt;br /&gt;$d = [Windows.Forms.MessageBox]::Show($s, &amp;quot;Windows Form&amp;quot;, [Windows.Forms.MessageBoxButtons]::YesNo, [Windows.Forms.MessageBoxIcon]::Question)    &lt;br /&gt;$d -eq [Windows.Forms.DialogResult]::Yes &lt;/p&gt;  &lt;p&gt;#--------------------------------------------   &lt;br /&gt;# SQLPSX - SQL Server PowerShell Extensions    &lt;br /&gt;# By Chad Miller    &lt;br /&gt;# &lt;a href="http://sqlpsx.codeplex.com/"&gt;http://sqlpsx.codeplex.com/&lt;/a&gt;    &lt;br /&gt;# Set of useful CMDLETs that use SMO objects    &lt;br /&gt;#--------------------------------------------    &lt;br /&gt;# View some of the commands    &lt;br /&gt;Get-Command *et-Sql* | Select Name &lt;/p&gt;  &lt;p&gt;# With SQLPSX   &lt;br /&gt;$server = Get-SqlServer 'SQL1\DEMO1' &lt;/p&gt;  &lt;p&gt;# With SMO   &lt;br /&gt;#Connect and run a command using SMO    &lt;br /&gt;[reflection.assembly]::LoadWithPartialName(&amp;quot;Microsoft.SqlServer.Smo&amp;quot;)    &lt;br /&gt;$sqlServer = new-object (&amp;quot;Microsoft.SqlServer.Management.Smo.Server&amp;quot;) &amp;quot;SQL1\DEMO1&amp;quot; &lt;/p&gt;  &lt;p&gt;# Get server processes   &lt;br /&gt;$server.EnumProcesses() | Format-Table &lt;/p&gt;  &lt;p&gt;$db = Get-SqlDatabase 'SQL1\SQL2K8' AdventureWorks   &lt;br /&gt;Get-SqlUser $db | Format-Table &lt;/p&gt;  &lt;p&gt;Get-SqlLogin $server | select members &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:21eec5a3-7a0a-4ed0-8191-1ce2d241ccde" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://technorati.com/tags/TechEd" rel="tag"&gt;TechEd&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9613282" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author></entry><entry><title>Welcome to TechEd 2009</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/05/10/welcome-to-teched-2009.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/05/10/welcome-to-teched-2009.aspx</id><published>2009-05-11T06:37:18Z</published><updated>2009-05-11T06:37:18Z</updated><content type="html">&lt;p&gt;This is my first TechEd in a long time. The last time I spoke at a TechEd was back in 1997 in Japan! I have three sessions this Tuesday, Wednesday, and Thursday that talk about how to get the most out of our manageability suite of tools in SSMS.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you happen to be at TechEd this year, stop by the Technical Learning Center at the DAT area and say hello. I’ll be on Twitter as well @billramo talking about #teched.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cb5f39e0-7fb8-4086-8e9f-67efba71c359" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/TechEd" rel="tag"&gt;TechEd&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9601345" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author></entry><entry><title>SQLPSX from Chad Miller</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/05/06/sqlpsx-from-chad-miller.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/05/06/sqlpsx-from-chad-miller.aspx</id><published>2009-05-07T06:19:10Z</published><updated>2009-05-07T06:19:10Z</updated><content type="html">&lt;p&gt;I’ve been playing around &lt;a href="http://chadwickmiller.spaces.live.com/default.aspx" target="_blank"&gt;Chad Miller’s&lt;/a&gt; SQL Server PowerShell Extensions – &lt;a href="http://sqlpsx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25394" target="_blank"&gt;SQLPSX 1.5&lt;/a&gt; on &lt;a href="http://www.codeplex.com/" target="_blank"&gt;CodePlex&lt;/a&gt; getting ready for my &lt;a href="http://www.msteched.com/teched/agenda.aspx" target="_blank"&gt;TechEd&lt;/a&gt; session Manageability Series: Microsoft SQL Server Automation on Steroids, Including Powershell on Wed 5/13. &lt;/p&gt;  &lt;p&gt;Chad has developed huge library of Powershell cmdlets, functions, and scripts that hit the key scenarios for SQL Server DBAs. All of the functions that Chad developed can be accomplished using the SMO object model calls, but Chad’s functions exposes them like you would expect to see them in PowerShell.&lt;/p&gt;  &lt;p&gt;For example, once you install his library along with using either the SQL PowerShell shell or a PowerShell 1.0 shell referencing the SQL snapins – see &lt;a href="http://msdn.microsoft.com/en-us/library/cc281962.aspx" target="_blank"&gt;Running SQL Server PowerShell&lt;/a&gt; – you can mix and match functionality.&lt;/p&gt;  &lt;p&gt;For example, &lt;a href="http://chadwickmiller.spaces.live.com/blog/cns!EA42395138308430!315.entry" target="_blank"&gt;take his example of running DBCC&lt;/a&gt; CheckDB for a database. &lt;/p&gt;  &lt;p&gt;#Get a database object and set to a variable   &lt;br /&gt;$db = get-sqldatabase 'SQL1\DEMO1' pubs&lt;/p&gt;  &lt;p&gt;#Run a checkdatabse   &lt;br /&gt;invoke-sqldatabasecheck $db&lt;/p&gt;  &lt;p&gt;That’s all it takes – no need to use the SMO object model.&amp;#160; You can use a command like this to run DBCC CheckDB against all databases:&lt;/p&gt;  &lt;p&gt;cd SQLSERVER:\SQL\SQL1\DEMO1\Databases   &lt;br /&gt;dir | invoke-sqldatabasecheck&lt;/p&gt;  &lt;p&gt;This is all very cool and something that I’ll be presenting in my TechEd session. Be sure to check out &lt;a href="http://sqlpsx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25394"&gt;SQLPSX&lt;/a&gt; and &lt;a href="http://chadwickmiller.spaces.live.com/default.aspx"&gt;Chad’s excellent blog&lt;/a&gt;.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5efd7f19-072e-4fe7-998f-08dd1e2851d4" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://technorati.com/tags/PowerShell" rel="tag"&gt;PowerShell&lt;/a&gt;,&lt;a href="http://technorati.com/tags/TechEd" rel="tag"&gt;TechEd&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9592649" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author></entry><entry><title>Transact-SQL Debugger for SQL Server 2008 – Part 3</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/12/transact-sql-debugger-for-sql-server-2008-part-3.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/12/transact-sql-debugger-for-sql-server-2008-part-3.aspx</id><published>2009-04-12T22:39:43Z</published><updated>2009-04-12T22:39:43Z</updated><content type="html">&lt;p&gt;In part 3 of working with the debugger, I’ll talk about how to set breakpoints and the trick to setting them in stored procedures and triggers.&lt;/p&gt;  &lt;p&gt;This 3 part series covers:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-1.aspx"&gt;Basic debugging&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-2.aspx"&gt;Configure remote debugging &amp;amp; best practices&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Debugging triggers and stored procedures with breakpoints &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The trick with setting breakpoints in called stored procedures and triggers is that they need to be set within the temporary file that the debugger creates for the object.&lt;/p&gt;  &lt;p&gt;In this scenario, I’m going to call the HumanResources.uspUpdateEmployeeHireInfo stored procedure in the 2005 version of AdventureWorks. This stored procedure updates two tables: Employee and EmployPayHistory both in the HumanResources schema.&amp;#160; The goal of the example is to set a breakpoint in the trigger for the Employee table and then show how the debugger catches it the next time through.&lt;/p&gt;  &lt;p&gt;The obvious thing that you would try is to Modify the trigger and then toggling the breakpoint [F9] on the line you want to stop at. The problem is that the debugger has no context. so the approach shown below won’t work.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging30%20-%20No%20good%20with%20Modify_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging30 - No good with Modify" border="0" alt="Debugging30 - No good with Modify" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging30%20-%20No%20good%20with%20Modify_thumb.jpg" width="418" height="297" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;What you need to do is step into the stored procedure or trigger you want to break on and set the breakpoint in the temp file the debugger creates.&lt;/p&gt;  &lt;p&gt;Let’s step through the example starting with the script to call the stored procedure.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging31%20-%20Start%20script_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging31 - Start script" border="0" alt="Debugging31 - Start script" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging31%20-%20Start%20script_thumb.jpg" width="448" height="420" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I’ve toggled the breakpoint to demonstrate how breakpoints can be set in a script of batch statements. When U press [ALT]+[F5] twice to start and continue debugging, you’ll see the debug stops at the break point in the script.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging32%20-%20Break%20in%20script_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging32 - Break in script" border="0" alt="Debugging32 - Break in script" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging32%20-%20Break%20in%20script_thumb.jpg" width="452" height="426" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You will now want to Step Into the stored procedure with [F11]. The debugger loads up the stored procedure into a new editor window and stops at the first executable line.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging33%20-%20Now%20in%20SP_4.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging33 - Now in SP" border="0" alt="Debugging33 - Now in SP" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging33%20-%20Now%20in%20SP_thumb_1.jpg" width="450" height="428" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Notice in the Call Stack window that procedure name is followed by (SQL1\SQL2K8.AdventureWorks) indicating the server instance and database name context for the debugging session. If you hover over the statement, you will see a tool top showing the parameters with values called and the current line.&lt;/p&gt;  &lt;p&gt;Step into [F11] again moves to the BEGIN TRY statement. [F11] again to the BEGIN TRANSACTION statement. One more [F11] positions you on the UPDATE statement for the Employee table.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging34%20-%20ready%20to%20go%20into%20update_4.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging34 - ready to go into update" border="0" alt="Debugging34 - ready to go into update" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging34%20-%20ready%20to%20go%20into%20update_thumb_1.jpg" width="447" height="416" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Step into [F11] the UPDATE statement causes the debugger to load the update trigger for the Employee table.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging34%20-%20In%20Update%20trigger_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging34 - In Update trigger" border="0" alt="Debugging34 - In Update trigger" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging34%20-%20In%20Update%20trigger_thumb.jpg" width="452" height="284" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;At this point, we can now set a breakpoint [F9] on the UPDATE statement for the trigger.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging36%20-%20Set%20bp%20in%20update%20trigger_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging36 - Set bp in update trigger" border="0" alt="Debugging36 - Set bp in update trigger" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging36%20-%20Set%20bp%20in%20update%20trigger_thumb.jpg" width="458" height="329" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In the breakpoint window for this example, you’ll notice something interesting.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging37%20-%20object%20id%20set_4.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging37 - object id set" border="0" alt="Debugging37 - object id set" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging37%20-%20object%20id%20set_thumb_1.jpg" width="457" height="223" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You’ll see that the debugger is actually showing the object_id for the trigger name. This way the the debugger can keep track of the breakpoint for future sessions. &lt;/p&gt;  &lt;p&gt;For now, lets press [ALT]+[F5] to let the debugger continue. Lets test out the breakpoint for the trigger.&lt;/p&gt;  &lt;p&gt;First toggle off the breakpoint [F9] in line 11 of the calling script. Then press [ALT]+[F5] to start the debugger. You’ll see that the breakpoint is still present in the Breakpoint Window.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging38%20-%20Start%20again%20to%20demo%20break_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging38 - Start again to demo break" border="0" alt="Debugging38 - Start again to demo break" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging38%20-%20Start%20again%20to%20demo%20break_thumb.jpg" width="454" height="418" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;One more continue [ALT]+[F5] stops right where you want!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging39%20-%20Stopped%20where%20we%20needed_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging39 - Stopped where we needed" border="0" alt="Debugging39 - Stopped where we needed" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part3_B1BE/Debugging39%20-%20Stopped%20where%20we%20needed_thumb.jpg" width="455" height="320" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Let’s finish the debug session with the Continue command [ALT]+[F5]. &lt;/p&gt;  &lt;p&gt;At this point, I should point out that breakpoints are persisted with the database solution/project. If you didn’t have solution, any breakpoints you defined will go away when you close SSMS. To learn more about solutions, you can refer to the help topic – &lt;a href="http://msdn.microsoft.com/en-us/library/ms173570.aspx"&gt;Using Solution Explorer&lt;/a&gt;.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1bdfb2d4-f61a-4f72-9d20-bec757957a4c" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Mangement+Studio" rel="tag"&gt;SQL Server Mangement Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2000" rel="tag"&gt;SQL Server 2000&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Transact-SQL+Debugger" rel="tag"&gt;Transact-SQL Debugger&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9546477" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /><category term="Debugger" scheme="http://blogs.msdn.com/billramo/archive/tags/Debugger/default.aspx" /></entry><entry><title>Transact-SQL Debugger for SQL Server 2008 – Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-2.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-2.aspx</id><published>2009-04-12T07:02:13Z</published><updated>2009-04-12T07:02:13Z</updated><content type="html">&lt;p&gt;This blog will go over what you need to know for setting up your environment for remote debugging along with best practices and other things to consider when using the debugger in SSMS.&lt;/p&gt;  &lt;p&gt;This 3 part series covers:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-1.aspx" target="_blank"&gt;Basic debugging&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Configure remote debugging &amp;amp; best practices &lt;/li&gt;    &lt;li&gt;Debugging triggers and stored procedures with breakpoints &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The debugger consists of 2 components. The server component is installed with the sqlservr.exe. The client component is installed as part of SSMS. When SSMS and the instance you want to debug are on the same system, there is nothing configure. You do however need to login to the instance as a member of the &lt;strong&gt;sysadmin&lt;/strong&gt; role.&lt;/p&gt;  &lt;p&gt;If you need to debug a remote instance, you need to enable the program and port exceptions using the Windows Firewall Control Panel application on both computers.&lt;/p&gt;  &lt;p&gt;On the computer that is running the instance of the Database Engine, in &lt;strong&gt;Windows Firewall&lt;/strong&gt;, specify the following information:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add TCP port 135 to the exceptions list.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging21%20-%20Firewall_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging21 - Firewall" border="0" alt="Debugging21 - Firewall" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging21%20-%20Firewall_thumb.jpg" width="389" height="464" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging22%20-%20Add%20Port_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging22 - Add Port" border="0" alt="Debugging22 - Add Port" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging22%20-%20Add%20Port_thumb.jpg" width="357" height="267" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add the program sqlservr.exe to the exceptions list. By default, sqlservr.exe is installed in C:\Program Files\Microsoft SQL Server\MSSQL10.&lt;em&gt;InstanceName&lt;/em&gt;\MSSQL\Binn, where &lt;em&gt;InstanceName&lt;/em&gt; is MSSQLSERVER for the default instance, and the instance name for any named instance.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging23%20-%20Add%20Program_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging23 - Add Program" border="0" alt="Debugging23 - Add Program" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging23%20-%20Add%20Program_thumb.jpg" width="339" height="348" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging24%20-%20Add%20Server_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging24 - Add Server" border="0" alt="Debugging24 - Add Server" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging24%20-%20Add%20Server_thumb.jpg" width="412" height="310" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;If the domain policy requires network communications to be done through IPsec, you must also add UDP port 4500 and UDP port 500 to the exception list.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging25%20-%20Done%20with%20server_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging25 - Done with server" border="0" alt="Debugging25 - Done with server" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part2_127B3/Debugging25%20-%20Done%20with%20server_thumb.jpg" width="355" height="423" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;With the server instance taken care of, you now need to take care of SSMS on the client.&lt;/p&gt;  &lt;p&gt;On the computer that is running SQL Server Management Studio, in &lt;strong&gt;Windows Firewall&lt;/strong&gt;, specify the following information:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add TCP port 135 to the exceptions list.&lt;/li&gt;    &lt;li&gt;Add program ssms.exe (SQL Server Management Studio) to the exceptions list. By default, ssms.exe is installed in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;You are now ready to launch SSMS for remote debugging.&lt;/p&gt;  &lt;p&gt;It is highly recommended that Transact-SQL code be debugged on a test server, not a production server, for the following reasons:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Debugging is a highly privileged operation. Therefore, only members of the &lt;strong&gt;sysadmin&lt;/strong&gt; fixed server role are allowed to debug in SQL Server.&lt;/li&gt;    &lt;li&gt;Debugging sessions often run for long periods of time while you investigate the operations of several Transact-SQL statements. Locks, such as update locks, that are acquired by the session might be held for extended periods, until the session is ended or the transaction committed or rolled back.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;That’s it for part 2.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:97906483-6067-405d-b230-3ef0bf212f6f" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+management+Studio" rel="tag"&gt;SQL Server management Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Transact-SQL+Debugger" rel="tag"&gt;Transact-SQL Debugger&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9546134" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /><category term="Debugger" scheme="http://blogs.msdn.com/billramo/archive/tags/Debugger/default.aspx" /></entry><entry><title>Transact-SQL Debugger for SQL Server 2008 – Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-1.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-1.aspx</id><published>2009-04-12T02:22:16Z</published><updated>2009-04-12T02:22:16Z</updated><content type="html">&lt;p&gt;In my next series of blog posts, I’ll explore the Transact-SQL Debugger for SQL Server 2008. This feature only works against database instances of SQL Server 2008. If you need to use a debugger for SQL Server 2005, you’ll have to use the Visual Studio Professional SKU or better. Please refer to the MSDN topic on &lt;a href="http://msdn.microsoft.com/en-us/library/s0fk6z6e(VS.80).aspx" target="_blank"&gt;How to: Enable SQL Server 2005 Debugging&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This series will cover:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Basic debugging &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-2.aspx" target="_blank"&gt;Configure remote debugging &amp;amp; best practices&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-3.aspx"&gt;Debugging triggers and stored procedures with breakpoints&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The Transact-SQL debugger in SQL Server Management Studio enables you to find errors in Transact-SQL scripts, stored procedures, triggers, and functions by observing their run-time behavior. You can start the debugger when you are using the Database Engine Query Editor window. By using the Transact-SQL debugger, you can do the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Step through the Transact-SQL statements in the editor line by line, or set breakpoints to stop at specific lines. &lt;/li&gt;    &lt;li&gt;Step into or over Transact-SQL stored procedures, functions, or triggers that are run by the code in the editor window. &lt;/li&gt;    &lt;li&gt;Watch the values that are assigned to variables, and observe system objects such as the call stack and threads. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The examples that I’m going to show are based on the SQL Server 2005 version of AdventureWorks that can be downloaded &lt;a href="http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004" target="_blank"&gt;here&lt;/a&gt;. My demo for this post assumes that SSMS in debugging and instance on the same machine. I’ll cover remote debugging in Part 2. If you need to deal with remote debugging and can’t wait – check out the help topic on &lt;a href="http://msdn.microsoft.com/en-us/library/cc646024.aspx" target="_blank"&gt;Configuring and Starting the Transact-SQL Debugger&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;To kick things off, open the script file that you want to debug and then click on the green debug toolbar button or press [ALT]-[F5].&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging01%20-%20Start%20debugging_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging01 - Start debugging" border="0" alt="Debugging01 - Start debugging" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging01%20-%20Start%20debugging_thumb.jpg" width="451" height="280" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;SSMS launches into a Debugging session by clearing aside may of your tool windows, opens the debugger specific tool windows and debugger toolbar, and displays a Yellow arrow indicating the next statement to execute.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging02%20-%20Debugger%20Launched_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging02 - Debugger Launched" border="0" alt="Debugging02 - Debugger Launched" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging02%20-%20Debugger%20Launched_thumb.jpg" width="455" height="344" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To step through statements like two set statements in this example, press the F11 key twice. You’ll notice that the Locals is now populated with the two variables.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging03%20-%20Variables%20in%20Locals%20window_4.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging03 - Variables in Locals window" border="0" alt="Debugging03 - Variables in Locals window" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging03%20-%20Variables%20in%20Locals%20window_thumb_1.jpg" width="454" height="342" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The next F11 action then steps into the stored procedure. If you press the Step-Over [F10], you would go right over the stored procedure and in this case – end the debugging session.&lt;/p&gt;  &lt;p&gt;The debugger opens a special editor window for the stored procedure that you just stepped into along with hints that you don’t really want to make edits to this file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging04%20-%20Stepping%20into%20an%20SP_6.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging04 - Stepping into an SP" border="0" alt="Debugging04 - Stepping into an SP" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging04%20-%20Stepping%20into%20an%20SP_thumb_2.jpg" width="453" height="281" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The other thing you’ll notice is the Locals window now shows the value for the SP parameters and the Call Stack window is updated to show that you are now in the SP.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging05%20-%20Locals%20and%20Call%20Stack_6.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging05 - Locals and Call Stack" border="0" alt="Debugging05 - Locals and Call Stack" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging05%20-%20Locals%20and%20Call%20Stack_thumb_2.jpg" width="455" height="278" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The Locals window allows you to edit values so that you can change scenarios inside of the debug session. You can use the mouse or the [CTRL]+[ALT]+[V], [L] command to navigate to the Locals window. This is a little different pattern of calling up debugger windows like [CTRL]+[ALT]+[C] for the Call Stack window because [CTRL]+[ALT]+[L] was already taken for displaying the Solution Explorer.&amp;#160; Back to the task – now double click on the value 819 for @StartProductId and then type in 820 and press [ENTER].&amp;#160; You’ll see that the value changes color to Red meaning it’s been modified.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging06%20-%20Changing%20a%20local%20value_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging06 - Changing a local value" border="0" alt="Debugging06 - Changing a local value" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging06%20-%20Changing%20a%20local%20value_thumb.jpg" width="456" height="238" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;We could continue to step thru the procedure, but since this procedure only has one more command, we can press the Step Out [SHIFT]+[F11] command to complete execution in the stored procedure. &lt;/p&gt;  &lt;p&gt;If you had additional statements in the original script DebugSPExample.sql script like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging07%20-%20More%20statements_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging07 - More statements" border="0" alt="Debugging07 - More statements" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging07%20-%20More%20statements_thumb.jpg" width="329" height="287" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The debugger would set focus to the editor window and indicate in the status bar “Debugging query” to remind you that you are still debugging.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging07%20-%20Still%20debugging_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugging07 - Still debugging" border="0" alt="Debugging07 - Still debugging" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/TransactSQLDebuggerforSQLServer2008Part1_E615/Debugging07%20-%20Still%20debugging_thumb.jpg" width="451" height="339" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you press [ALT]+[F5], you would complete the debugging session for this demo.&lt;/p&gt;  &lt;p&gt;Here are the keystrokes for the debugger with the Standard keyboard setting.&lt;/p&gt;  &lt;table border="1" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="bottom"&gt;         &lt;p&gt;&lt;b&gt;Action &lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="bottom"&gt;         &lt;p&gt;&lt;b&gt;Standard &lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Start or continue debugging&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;ALT+F5&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Stop debugging&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;SHIFT+F5&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Step into&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;F11&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Step over&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;F10&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Step out&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;SHIFT+F11&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Implement the &lt;b&gt;Run To Cursor&lt;/b&gt; command&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+F10&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;QuickWatch&lt;/b&gt; dialog box&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+Q&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Toggle breakpoint&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;F9&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Delete all breakpoints&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+SHIFT+F9&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Breakpoints&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+B&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Break all&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+BREAK&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Watch 1&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+W, 1&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Watch 2&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+W, 2&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Watch 3&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+W, 3&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Watch 4&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+W, 4&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Autos&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+V, A&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Locals&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+V, L&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Immediate&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+I&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Call Stack&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+C&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;Display the &lt;b&gt;Threads&lt;/b&gt; window&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;CTRL+ALT+H&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;That’s it for debugging basics for part 1.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6be00d86-742a-45ed-8f0b-6da1ad3d1625" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Management+Studio" rel="tag"&gt;SQL Server Management Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Transact-SQL+Debugger" rel="tag"&gt;Transact-SQL Debugger&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9545938" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /><category term="Debugger" scheme="http://blogs.msdn.com/billramo/archive/tags/Debugger/default.aspx" /></entry><entry><title>SQL Server Management Studio Tips – Part 4</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/10/sql-server-management-studio-tips-part-4.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/10/sql-server-management-studio-tips-part-4.aspx</id><published>2009-04-11T05:58:15Z</published><updated>2009-04-11T05:58:15Z</updated><content type="html">&lt;p&gt;This is the fourth in a series of posts highlighting &lt;a href="http://twitter.com/scottcate"&gt;Scott Cate&lt;/a&gt;’s video series of &lt;a href="http://scottcate.com/tricks/"&gt;Visual Studio tricks&lt;/a&gt; over the last few months from &lt;a href="http://blogs.msdn.com/saraford/default.aspx"&gt;Sara Ford’s blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;As I mentioned in &lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-1.aspx"&gt;Part 1&lt;/a&gt;, many of the commands are documented in the&amp;#160; SQL Server 2008 help topic – &lt;a href="http://msdn.microsoft.com/en-us/library/ms174205.aspx"&gt;SQL Server Management Studio Keyboard Shortcuts&lt;/a&gt;.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="448"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="262"&gt;Blog Post&lt;/td&gt;        &lt;td valign="top" width="184"&gt;Comments&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/057/" target="_blank"&gt;#57 [Ctrl]+[J] invokes statement completion&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;This works best when using aliases.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/059/" target="_blank"&gt;#59 Resize the Statement Completion Window&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;A handy way to see more items where vertical size is persisted.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/061/" target="_blank"&gt;#61 Presenters Must Read .. Increase the Editor Tooltip Font Size&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;This is something that I already have in my demo environment. It’s useful for people with old eyes as well.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/062/" target="_blank"&gt;#62 Display parameter info for a function&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;Using [CTRL]+[SHIFT]+[SPACE] is very handy if you missed the parameter info the first time.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/064/" target="_blank"&gt;#64 Keyboard Shortcut to Display Quick Info Tooltip&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;In SSMS, the command is a little different. You need to use &lt;em&gt;&lt;strong&gt;&lt;font face="Times New Roman"&gt;[CTRL]+[K], [CTRL]+[I]&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/065/" target="_blank"&gt;#65 Edit.WordComplete via Intellisense&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;This is handy typing in column names without having to display the drop down list.         &lt;br /&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[Space] or [ALT]+[RIGHT]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/066/" target="_blank"&gt;#66 Using Quick find in the Current Document&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;Calls out how you can also dock the Find tool window.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;&lt;a href="http://scottcate.com/Tricks/067/" target="_blank"&gt;#67 Search in hidden text in the editor&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="184"&gt;Something to remember if you get in the habit of collapsing statements.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;That’s all of Scott’s great tips that also apply to SSMS. &lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d8b5a47b-121a-4183-b181-36cb91eadfd4" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Management+Studio" rel="tag"&gt;SQL Server Management Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2005" rel="tag"&gt;SQL Server 2005&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9544530" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /></entry><entry><title>SQL Server Management Studio Tips – Part 3</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/09/sql-server-management-studio-tips-part-3.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/09/sql-server-management-studio-tips-part-3.aspx</id><published>2009-04-10T06:23:00Z</published><updated>2009-04-10T06:23:00Z</updated><content type="html">&lt;P&gt;This is the third in a series of posts highlighting &lt;A href="http://twitter.com/scottcate" mce_href="http://twitter.com/scottcate"&gt;Scott Cate&lt;/A&gt;’s video series of &lt;A href="http://scottcate.com/tricks/" mce_href="http://scottcate.com/tricks/"&gt;Visual Studio tricks&lt;/A&gt; over the last few months from &lt;A href="http://blogs.msdn.com/saraford/default.aspx" mce_href="http://blogs.msdn.com/saraford/default.aspx"&gt;Sara Ford’s blog&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;As I mentioned in &lt;A href="http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-1.aspx" mce_href="http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-1.aspx"&gt;Part 1&lt;/A&gt;, many of the commands are documented in the&amp;nbsp; SQL Server 2008 help topic – &lt;A href="http://msdn.microsoft.com/en-us/library/ms174205.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms174205.aspx"&gt;SQL Server Management Studio Keyboard Shortcuts&lt;/A&gt;.&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=449&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;Blog Post&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;Comments&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/033/" target=_blank mce_href="http://scottcate.com/Tricks/033/"&gt;#33 Drag and Drop techniques inside the Visual Studio Editor&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;This post shows how you can use the Ctrl key to make a copy of text you are dragging in the editor and how to drag text into a tabbed editor window.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/034/" target=_blank mce_href="http://scottcate.com/Tricks/034/"&gt;#34 Cut and Paste Collapsed code in Visual Studio&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;With SQL Server 2008 Intellisense, it’s important to know how hidden text is impacted by cut/copy/paste.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/039/" target=_blank mce_href="http://scottcate.com/Tricks/039/"&gt;#39 Middle button support in the Visual Studio Editor&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;I keep forgetting you can click on the wheel of the mouse to scroll.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/041/" target=_blank mce_href="http://scottcate.com/Tricks/041/"&gt;#41 Forward and Backward navigation in Visual Studio Editor&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;Only [CTRL] + [-] works for moving back, but it’s still a handy time saver. If you want to add the tool bar button to your query editor toolbar, you’ll find Navigate Backwards in the View section.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/043/" target=_blank mce_href="http://scottcate.com/Tricks/043/"&gt;#43 Select from Cursor to last “Go Back” marker in Visual Studio&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;This is real handy when you are moving the cursor and realize you want to select the text. &lt;BR&gt;&lt;STRONG&gt;&lt;EM&gt;[CTRL]+[=]&lt;/EM&gt;&lt;/STRONG&gt; = Select from current cursor position to last Go Back marker.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/044/" mce_href="http://scottcate.com/Tricks/044/"&gt;#44 Delete whole word (or whitespace) at a time forward and backwards&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;This is real handy for deleting columns in the project list. [CTRL]+[BACKSPACE] to delete the word to the left and [CTRL]+[DELETE] to delete words to the right.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/045/" mce_href="http://scottcate.com/Tricks/045/"&gt;#45 Move cursor to top or bottom of screen (without scrolling)&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;The use of [CTRL]+{UP ARROW] or [DOWN ARROW] keys to scroll without changing the cursor location is very handy.&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/047/" mce_href="http://scottcate.com/Tricks/047/"&gt;#47 Swapping Anchor points (THIS IS COOL!) in Visual Studio&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;When not getting the initial selection right – this is very handy. In SSMS, the keystroke is actually &lt;BR&gt;[CTRL]+[K], [A]&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=277&gt;&lt;A href="http://scottcate.com/Tricks/056/" mce_href="http://scottcate.com/Tricks/056/"&gt;#56 Show Shortcut Keys in Visual Studio Toolbar Tooltips&lt;/A&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=170&gt;Great aid to learn keyboard shortcuts for toolbar buttons.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;On to Part 4 for tomorrow.&lt;/P&gt;
&lt;DIV style="PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; DISPLAY: inline; FLOAT: none; PADDING-TOP: 0px" id=scid:0767317B-992E-4b12-91E0-4F059A8CECA8:63731791-b35c-43dd-ab8b-8fa2f413623a class=wlWriterEditableSmartContent&gt;Technorati Tags: &lt;A href="http://technorati.com/tags/SQL+Server+Management+Studio" rel=tag mce_href="http://technorati.com/tags/SQL+Server+Management+Studio"&gt;SQL Server Management Studio&lt;/A&gt;,&lt;A href="http://technorati.com/tags/SQL+Server+2008" rel=tag mce_href="http://technorati.com/tags/SQL+Server+2008"&gt;SQL Server 2008&lt;/A&gt;,&lt;A href="http://technorati.com/tags/SQL+Server+2005" rel=tag mce_href="http://technorati.com/tags/SQL+Server+2005"&gt;SQL Server 2005&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/events/TechEd2009/" mce_href="http://www.microsoft.com/events/TechEd2009/"&gt;&lt;IMG title=TENA_blgr3_seeme border=0 alt=TENA_blgr3_seeme src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width=120 height=90 mce_src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9542220" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /></entry><entry><title>SQL Server Management Studio Tips – Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-2.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-2.aspx</id><published>2009-04-09T08:14:08Z</published><updated>2009-04-09T08:14:08Z</updated><content type="html">&lt;p&gt;This is the second in a series of posts highlighting &lt;a href="http://twitter.com/scottcate"&gt;Scott Cate&lt;/a&gt;’s video series of &lt;a href="http://scottcate.com/tricks/"&gt;Visual Studio tricks&lt;/a&gt; over the last few months from &lt;a href="http://blogs.msdn.com/saraford/default.aspx"&gt;Sara Ford’s blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;As I mentioned in &lt;a href="http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-1.aspx" target="_blank"&gt;Part 1&lt;/a&gt;, many of the commands are documented in the&amp;#160; SQL Server 2008 help topic – &lt;a href="http://msdn.microsoft.com/en-us/library/ms174205.aspx"&gt;SQL Server Management Studio Keyboard Shortcuts&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="450"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="261"&gt;Blog Post&lt;/td&gt;        &lt;td valign="top" width="187"&gt;Comments&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="261"&gt;&lt;a href="http://scottcate.com/Tricks/014/" target="_blank"&gt;#14 Word Wrap, and Word Wrap Glyph&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="187"&gt;Toggling word wrap is handy in certain scenarios. You can also add the Toggle Word Wrap mode command to your toolbar.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="261"&gt;&lt;a href="http://scottcate.com/Tricks/017/" target="_blank"&gt;#17 Keyboard Shortcut to Comment and Uncomment Code&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="187"&gt;SSMS is slightly different. You need to do [CTRL]+[K] followed by [CTRL]+[C] to comment or [CTRL]+[U] to uncomment.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="261"&gt;&lt;a href="http://scottcate.com/Tricks/020/" target="_blank"&gt;#20 Create New Line; Above and Below your Current Line&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="187"&gt;This is handy because you can add the line without worrying about the current position in the line you are on.          &lt;br /&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[ENTER]&lt;/em&gt;&lt;/strong&gt; = Insert Line Above&lt;/p&gt;          &lt;ul&gt;           &lt;li&gt;(Same effect as &lt;strong&gt;&lt;em&gt;[HOME],[ENTER],[UP]&lt;/em&gt;&lt;/strong&gt;) &lt;/li&gt;         &lt;/ul&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[SHIFT]+[ENTER]&lt;/em&gt;&lt;/strong&gt; = Insert Line Below&lt;/p&gt;          &lt;ul&gt;           &lt;li&gt;(Same effect as &lt;strong&gt;&lt;em&gt;[END],[ENTER]&lt;/em&gt;&lt;/strong&gt;) &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="261"&gt;&lt;a href="http://scottcate.com/Tricks/021/" target="_blank"&gt;#21 Transpose Characters, words, and lines in the editor&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="187"&gt;This one doesn’t work completely SSMS.&amp;#160; Just these commands work:          &lt;br /&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[SHIFT]+T&lt;/em&gt;&lt;/strong&gt; = Transpose a word&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[ALT]+[SHIFT]+T&lt;/em&gt;&lt;/strong&gt; = Transpose a line&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="261"&gt;&lt;a href="http://scottcate.com/Tricks/022/" target="_blank"&gt;#22 Delete the beginning white space for selected line(s)&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="187"&gt;Very handy way to remove indented white space with [CTRL]+[K] followed by [CTRL]+[\]&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="261"&gt;&lt;a href="http://scottcate.com/Tricks/024/" target="_blank"&gt;#24 Uppercase and Lowercase Keyboard Shortcuts&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="187"&gt;SSMS is a little different on this post where:          &lt;br /&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[SHIFT]+U&lt;/em&gt;&lt;/strong&gt; = Make Uppercase           &lt;br /&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[SHIFT]+L&lt;/em&gt;&lt;/strong&gt; = Make Lowercase&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Tomorrow – Part 3&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c581c35d-647d-4f73-8d40-ea4366dd9189" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Management+Studio" rel="tag"&gt;SQL Server Management Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2005" rel="tag"&gt;SQL Server 2005&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/" target="_blank"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9539548" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /></entry><entry><title>SQL Server Management Studio Tips – Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-1.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/04/08/sql-server-management-studio-tips-part-1.aspx</id><published>2009-04-09T07:29:10Z</published><updated>2009-04-09T07:29:10Z</updated><content type="html">&lt;p&gt;&lt;a href="http://twitter.com/scottcate" target="_blank"&gt;Scott Cate&lt;/a&gt; has been publishing a video series of &lt;a href="http://scottcate.com/tricks/" target="_blank"&gt;Visual Studio tricks&lt;/a&gt; over the last few months from &lt;a href="http://blogs.msdn.com/saraford/default.aspx" target="_blank"&gt;Sara Ford’s blog&lt;/a&gt;. It turns out when you use the Standard keyboard scheme in SSMS under Tools | Options Keyboard, many of them work because SSMS is built on top of Visual Studio’s code base.&lt;/p&gt;  &lt;p&gt;Just about all of the commands listed in Scott’s tips can be found in the&amp;#160; SQL Server 2008 help topic – &lt;a href="http://msdn.microsoft.com/en-us/library/ms174205.aspx" target="_blank"&gt;SQL Server Management Studio Keyboard Shortcuts&lt;/a&gt;. Scott brings them to life in his series to reveal how these commands can make your day in SSMS just a little bit easier.&amp;#160; If you are using the SQL Server 2000 keyboard scheme, you’ll need to look up the keystrokes in the above help topic to see if there is a change.&lt;/p&gt;  &lt;p&gt;Here are some of the relevant video blog posts that I’ve verified in SSMS to get things going in part 1.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="447"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="266"&gt;Blog Post&lt;/td&gt;        &lt;td valign="top" width="179"&gt;Comments&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/tricks/001/" target="_blank"&gt;#1 Incremental Search [CTRL]+[I]&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;Press &lt;font face="Times New Roman"&gt;&lt;em&gt;[Ctrl]+[I]&lt;/em&gt;&lt;/font&gt; and start typing to search as you type.          &lt;br /&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font face="Times New Roman"&gt;[CTRL]+[I]&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt; = Incremental Search&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font face="Times New Roman"&gt;[CTRL]+[SHIFT]+[I]&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt; (Back Search)&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font face="Times New Roman"&gt;[F3]&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt; – Find Next&lt;/p&gt;          &lt;p&gt;&lt;em&gt;&lt;font face="Times New Roman"&gt;[SHIFT]+[F3]&lt;/font&gt;&lt;/em&gt; – Find Previous&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/002/" target="_blank"&gt;#2 Block or Column Select, Cut, Copy, Paste&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;Using [ALT] + Mouse drag for column highlighting was something I would have never thought of.         &lt;br /&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[SHIFT]+[Arrow Key]&lt;/em&gt;&lt;/strong&gt; = Select one letter or line (for up|down) at a time&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[SHIFT]+[CTRL]+[Arrow Key]&lt;/em&gt;&lt;/strong&gt; = Word Select&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[SHIFT]+[ALT] +[Arrow Key]&lt;/em&gt;&lt;/strong&gt; = Block Select&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[ALT]&lt;/em&gt;&lt;/strong&gt; + Mouse Drag = Column|Block Select from mouse X,Y to new X,Y coordinates.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/004/" target="_blank"&gt;#4 Window Splitting in Visual Studio&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;Being able to split a given editor window to see multiple parts of the same file is always handy. This video post also covers over splitting tabs into groups.         &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;&lt;em&gt;[MENU]&lt;/em&gt;&lt;/strong&gt; Window|Split&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/005" target="_blank"&gt;#5 Move Tool Windows Using the keyboard&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;Using [ALT]+[F6] is another keyboard gem for moving between docked tool windows like Object Explorer and Registered servers. The ability to move a window with [ALT] + [-] is handy.         &lt;br /&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[ALT]+[MINUS {-}]&lt;/em&gt;&lt;/strong&gt; = Show Tool Window Move Menu&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[ALT]+[F6]&lt;/em&gt;&lt;/strong&gt; = Toggle Forward through all open Tool Windows&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[PgDn]&lt;/em&gt;&lt;/strong&gt; = Move Right through tab groups in Tool Window&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[CTRL]+[PgUp]&lt;/em&gt;&lt;/strong&gt; = Move Left through tab groups in Tool Window&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;&lt;em&gt;[SHIFT]+[F6]&lt;/em&gt;&lt;/strong&gt; = Toggle Backwards through all open Tool Windows&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/006" target="_blank"&gt;#6 Resize Tool Windows Using the keyboard&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;This is a tricky one where you need to press [ALT] and release followed by [SPACE]&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/007/" target="_blank"&gt;#7 Keyboard Navigation to Tool Window Toolbars&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;I recently amazed a co-worker with this one using [SHIFT]+[ALT]. This is handy in Object Explorer’s tool window.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/008/" target="_blank"&gt;#8 Undocking and Redocking in and out of Floating Windows&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;For me, this is handy when I have Activity Monitor docked at the bottom of my screen and I want to see it in a larger window.         &lt;br /&gt;          &lt;br /&gt;Just Double-Click on the title bar for the docked window.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/009/" target="_blank"&gt;#9 Move Tool Windows to a Tabbed Document&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;This feature works with Tool Windows like Object Explorer Details and Activity Monitor which by default look like tabbed documents.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/010/" target="_blank"&gt;#10 Using and Avoiding Dock Targets&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;Holding down the [CTRL] key when moving dockable windows can avoid embarrassing cursing.&amp;#160; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="266"&gt;&lt;a href="http://scottcate.com/Tricks/011/" target="_blank"&gt;#11 Visual Studio Full Screen Options&lt;/a&gt;&lt;/td&gt;        &lt;td valign="top" width="179"&gt;[SHIFT]+[ALT]+[ENTER] to toggle full screen mode gives you maximum real estate for your T-SQL editor.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;More of Scott’s tips in Part 2.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:26524049-18c8-4b4e-af2c-d4ed92132106" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Management+Studio" rel="tag"&gt;SQL Server Management Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/" target="_blank"&gt;&lt;img title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9539485" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="SSMS" scheme="http://blogs.msdn.com/billramo/archive/tags/SSMS/default.aspx" /></entry><entry><title>SQL Server Agent and Database Mail – Better Together</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/03/30/sql-server-agent-and-database-mail-better-together.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/03/30/sql-server-agent-and-database-mail-better-together.aspx</id><published>2009-03-31T06:10:14Z</published><updated>2009-03-31T06:10:14Z</updated><content type="html">&lt;p&gt;This post is how to configure SQL Agent to use &lt;a href="http://msdn.microsoft.com/en-us/library/ms175887.aspx" target="_blank"&gt;Database Mail&lt;/a&gt; for sending an email to an operator in the event a job fails. I was hoping that there was a single MSDN topic on how to do this, but no such luck. The steps are fairly straight forward, but I managed to get hung up on one of the help topics that describes the process. So I’m writing this post so others don’t fall into the same trap.&lt;/p&gt;  &lt;p&gt;The steps that I’ll walk though to get you up and running include:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Configuring Database Mail&lt;/li&gt;    &lt;li&gt;Configuring SQL Server Agent Mail to use Database Mail&lt;/li&gt;    &lt;li&gt;Setting up an Operator&lt;/li&gt;    &lt;li&gt;Adding the a notification to a job&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Configuring Database Mail, you can refer to my previous post – &lt;a href="http://blogs.msdn.com/billramo/archive/2009/03/29/using-live-hotmail-msn-for-sql-server-2008-database-mail.aspx" target="_blank"&gt;Using Live/Hotmail/MSN for SQL Server 2008 Database Mail&lt;/a&gt; or SQL MVP &lt;a href="http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/" target="_blank"&gt;Pinal Dave’s post for general configuration of Database Mail&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; This is where I got a bit confused. There is an BOL topic on &lt;a href="http://msdn.microsoft.com/en-us/library/ms190606.aspx" target="_blank"&gt;Using Database Mail with SQL Server Agent&lt;/a&gt; on MSDN that’s a bit confusing. The first two steps in the instructions for configuring Database Mail are covered when you run through the wizard as described in Pinal Dave’s posting in step 1 above. The next two steps talk about configuring the profile and adding user permissions to a role DB role in msdb. You can skip these steps and go to step 5 – How to: &lt;a href="http://msdn.microsoft.com/en-us/library/ms186358.aspx" target="_blank"&gt;Configure SQL Server Agent Mail to Use Database Mail&lt;/a&gt;. It lays out:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;p&gt;In Object Explorer, expand a server.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;Right-click &lt;strong&gt;SQL Server Agent&lt;/strong&gt;, and then click &lt;strong&gt;Properties&lt;/strong&gt;.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;Click &lt;strong&gt;Alert System&lt;/strong&gt;.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;Select &lt;strong&gt;Enable Mail Profile&lt;/strong&gt;.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;In the &lt;strong&gt;Mail system&lt;/strong&gt; list, select &lt;strong&gt;Database Mail&lt;/strong&gt;.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;In the &lt;strong&gt;Mail profile list&lt;/strong&gt;, select a mail profile for Database Mail.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;strong&gt;Restart SQL Server Agent. &lt;/strong&gt;The critical step!&lt;/p&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Setting up an operator is fairly straight forward. You can use the UI to set the Name and the E-mail name to get going. Just right click on the Operators node under SQL Server Agent and issue the New Operator command.&amp;#160; You can also go the T-SQL route:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;USE [msdb]     &lt;br /&gt;GO      &lt;br /&gt;EXEC msdb.dbo.sp_add_operator @name=N'MyOperator',       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @enabled=1,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @pager_days=0,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @email_address=N'Notify.Email@MyCompany.com'      &lt;br /&gt;GO&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Step 4.&lt;/strong&gt; Finally, you then go to the job you want to be notified about, bring up the Properties page, and go to the Notifications page. Then complete the dialog as shown below with any additional options you would like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/image_thumb.png" width="448" height="402" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Again, the T-SQL would look like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;USE [msdb]     &lt;br /&gt;GO      &lt;br /&gt;EXEC msdb.dbo.sp_update_job @job_name=N'syspolicy_purge_history',       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @notify_level_email=2, – failed job      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; @notify_email_operator_name=N'billramo'      &lt;br /&gt;GO&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;SQL Agent is now configured to let you know when things don’t go right with your automated agent jobs.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b72a012a-61bd-4514-9764-b6b3a704401c" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Agent" rel="tag"&gt;SQL Server Agent&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Database+Mail" rel="tag"&gt;Database Mail&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/events/TechEd2009/" target="_blank"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="TENA_blgr3_seeme" border="0" alt="TENA_blgr3_seeme" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/SQLServerAgentandDatabaseMailBetterToget_11B9D/TENA_blgr3_seeme_3.gif" width="120" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9521241" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="Database Mail" scheme="http://blogs.msdn.com/billramo/archive/tags/Database+Mail/default.aspx" /><category term="SQL Agent" scheme="http://blogs.msdn.com/billramo/archive/tags/SQL+Agent/default.aspx" /></entry><entry><title>Using Live/Hotmail/MSN for SQL Server 2008 Database Mail</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/03/29/using-live-hotmail-msn-for-sql-server-2008-database-mail.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/03/29/using-live-hotmail-msn-for-sql-server-2008-database-mail.aspx</id><published>2009-03-30T06:14:27Z</published><updated>2009-03-30T06:14:27Z</updated><content type="html">&lt;p&gt;Over the weekend, I was playing around with trying to use my hotmail email account for SQL Server 2008 Database Mail. After searching, I found a promising post on the &lt;a href="http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/936210f4-9c09-4b81-b521-9cd0bf3de85d/" target="_blank"&gt;MSDN Forum under SQL Tools&lt;/a&gt;. In the forum posted, it was suggested that you need to use a premium account – this is not true. What you need to know is that on the account page, you need to leave the Display name and Reply e-mail fields blank for the DB Mail to successfully send emails and shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/UsingLiveHotmailMSNforSQLServer2008Datab_11C9F/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/billramo/WindowsLiveWriter/UsingLiveHotmailMSNforSQLServer2008Datab_11C9F/image_thumb.png" width="543" height="473" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;For some reason, adding the Display name or Reply e-mail causes email server to reject the email with an error message that looks like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2009-03-27T20:50:40). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.3 Requested action aborted; user not authenticated).&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Knowing the Server name for MSN,Live,Hotmail as smtp.live.com and the Port number as 25 are also helpful. With this information, you can follow the &lt;a href="http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/" target="_blank"&gt;step-by-step instructions configuring DB Mail that SQL MVP Pinal Dave posted on this blog&lt;/a&gt;.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4e7bb12f-fddb-41d7-b344-30020f88175a" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+Server+Management+Studio" rel="tag"&gt;SQL Server Management Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Database+Mail" rel="tag"&gt;Database Mail&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Hotmail" rel="tag"&gt;Hotmail&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9517836" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author><category term="Database Mail" scheme="http://blogs.msdn.com/billramo/archive/tags/Database+Mail/default.aspx" /></entry><entry><title>Database Manager for IIS 7 RC Preview</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/billramo/archive/2009/03/26/database-manager-for-iis-7-rc-preview.aspx" /><id>http://blogs.msdn.com/billramo/archive/2009/03/26/database-manager-for-iis-7-rc-preview.aspx</id><published>2009-03-27T06:16:39Z</published><updated>2009-03-27T06:16:39Z</updated><content type="html">&lt;p&gt;I recently had a chance to preview the Release Candidate of &lt;a href="http://www.iis.net/extensions/DatabaseManager" target="_blank"&gt;Database Manager 1.0 for IIS7&lt;/a&gt;. If you are looking for a very lightweight tool that is easy to install for doing basic operations against SQL Server used by your IIS applications, this tool is just for you. It’s much smaller than &lt;a href="http://blogs.msdn.com/billramo/archive/2009/02/20/sql-server-2008-management-studio-express-released-to-the-web.aspx" target="_blank"&gt;SQL Server 2008 Management Studio Express&lt;/a&gt; (SSMSE) – of course that means less features. &lt;/p&gt;  &lt;p&gt;In what Database Manager lacks in features, it makes up with a simple query editor that will run your statements in the window as a batch. The query editor has simple colorization to point out keywords to catch obvious mistakes.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://learn.iis.net/file.axd?i=1626"&gt;&lt;img border="0" alt="" src="http://learn.iis.net/file.axd?i=1626" width="445" height="178" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What makes Database Manager nice for developers is that it connects directly to your application’s database. This way you can focus on your project instead of seeing everything possible with the server like you get with SSMSE. You can connect to additional databases within their explorer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://learn.iis.net/file.axd?i=1624"&gt;&lt;img border="0" alt="" src="http://learn.iis.net/file.axd?i=1624" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see, the explorer only shows Tables, Stored Procedures, and Views. If you want to create other objects, you’ll need to use the query editor.&lt;/p&gt;  &lt;p&gt;Features include:&lt;/p&gt;  &lt;li&gt;Add, rename, drop, and edit tables &lt;/li&gt;  &lt;li&gt;View and manage primary keys, indexes and foreign keys &lt;/li&gt;  &lt;li&gt;Data editing &lt;/li&gt;  &lt;li&gt;Establish connections to multiple databases &lt;/li&gt;  &lt;li&gt;Create and execute queries &lt;/li&gt;  &lt;li&gt;Create, alter and delete stored procedures &lt;/li&gt;  &lt;li&gt;Create, alter and delete views &lt;/li&gt;  &lt;li&gt;Manage stored procedures &lt;/li&gt;  &lt;li&gt;Manage both local and remote database from your machine &lt;/li&gt;  &lt;li&gt;IIS 7.0 Manager provides remote management capabilities with a clean firewall-friendly option for managing a remote SQL Server &lt;/li&gt;  &lt;li&gt;Exposes a public extensibility platform that enables the development of providers to support other databases &lt;/li&gt;  &lt;li&gt;Compatible with SQL 2008 and 2005&lt;/li&gt;  &lt;p&gt;If you are using IIS 7.0, I recommend the Database Manager for those times you want to test out your queries for your application or make tweaks to existing objects.&lt;/p&gt;  &lt;p&gt;The IIS team has put together a nice set of tutorials and videos on their download site at &lt;a title="http://www.iis.net/extensions/DatabaseManager" href="http://www.iis.net/extensions/DatabaseManager"&gt;http://www.iis.net/extensions/DatabaseManager&lt;/a&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:32a2f931-b358-4aa0-b904-d29481919e34" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Database+Manager+IIS" rel="tag"&gt;Database Manager IIS&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL+Server+2008+Express" rel="tag"&gt;SQL Server 2008 Express&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9512824" width="1" height="1"&gt;</content><author><name>billramo</name><uri>http://blogs.msdn.com/members/billramo.aspx</uri></author></entry></feed>