<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SQL Server Manageability Team Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/managingsql/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/managingsql/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 04:00:47 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Connection Loss Errors in SSMS Query Editor</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/connection-loss-errors-in-ssms-query-editor</link>
      <pubDate>Mon, 25 Jul 2011 11:18:00 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/07/25/connection-loss-errors-in-ssms-query-editor/</guid>
      <description><![CDATA[Connection Loss Errors in SSMS query editor
Under various situations, connection loss errors in...]]></description>
      <content:encoded><![CDATA[<h3>Connection Loss Errors in SSMS query editor</h3>
<p>Under various situations, connection loss errors in Query editor can cause SQL Server to drop the connection with the Client. Details regarding connection drop errors when working with on-premise server instances and SQL Azure instances are described <a href="https://msdn.microsoft.com/en-us/library/aa937483(v=SQL.80).aspx">here</a> and <a href="https://msdn.microsoft.com/en-us/library/ff394106.aspx#bkmk_throt_errors">here</a> respectively.</p>
<p>Until recently, the idle connection time-out period in SQL Azure was 5 minutes. This implied if a user opened an Query Editor window in SSMS (connected to SQL Azure) and left it idle for 5 minutes and then went back to Editor to execute a Query, he would hit Idle Connection Timeout error and the execution would fail with the following error &ndash;</p>
<p><span style="font-family: Courier New; font-size: x-small;" size="2" face="Courier New">A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.)</span></p>
<p></p>
<h3>Behavior in SSMS SQL Server 2008 R2</h3>
<p>In order to have the user not see the effect of frequent timeouts from a remote Azure host, we added logic to catch the Connection Loss exceptions, reconnect and re-execute in SQL Server 2008 R2. Hence the end user would not see any idle connection timeout exceptions while doing Query Execution in SSMS in SQL Server 2008 R2 (and Denali CTP1/CTP2). However, we implemented this fix for all kinds of connection loss errors and for all Server versions (Azure and Single Instance).</p>
<p>This fix introduced a bug related to wrong database context switching during re-connection in some scenarios (see <a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=634777">here</a> and <a href="https://connect.microsoft.com/SQLServer/feedback/details/632894/ssms-of-sql-denali-switches-database-context-when-it-should-not">here</a>).</p>
<p>While fixing this bug during Denali CTP3, multiple reasons caused us to reconsider our decision to auto-connect disconnected SSMS editor windows.</p>
<ul>
<li>The Idle Connection timeout period had increased to 30 minutes in SQL Azure. Hence the idle connection timeout is not as frequent (as every 5 minutes) anymore.</li>
<li>We got feedback around doing reconnection/re-execution under the covers. Some users had the feedback that surfacing connection drops errors is more realistic and informed than doing under the covers re-execution (especially for high severity errors).&nbsp; If they lose connection due to any reason, they should see the error in the Results/Message pane, and they can click Execute again to try re-execution.&nbsp; Also, they are used to that behavior for on-premise servers, and it existed before 2008 R2.</li>
</ul>
<h3>Change in SQL Server Code Named &ldquo;Denali&rdquo; CTP3</h3>
<p>Considering all the feedback mentioned above, we have removed the re-connection/re-execution logic altogether from the SSMS Editor in SQL Server Code Named &ldquo;Denali&rdquo; CTP3. This means SSMS users will see the idle connection timeout exception if they try to execute a query in an editor window whose connection has remained idle for more than 30 minutes. The Editor status bar would also show &ldquo;Disconnected&rdquo;. Afterwards, user can hit &ldquo;Execute&rdquo; again to re-execute and re-connect. The behavior will be similar for all other connection loss errors in SQL Azure. This behavior is same as what existed before 2008 R2 for On-premise Database.</p>
<p>The ask for re-connecting to the correct database context, before the time-out occurred, is still valid, and will be considered in a future SQL Server Release.</p>
<p><strong>Update: </strong>We have removed the re-connection/re-execution logic for SSMS editor in SQL Server 2008 R2 in the Service Pack 1 release.</p>
<p>---</p>
<p>The author Nitika Nathani, is a developer in the SQL Server Manageability Group. She can be reached at <a href="mailto:nnathani@microsoft.com">nnathani@microsoft.com</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Recovery Advisor: Using SSMS to create/restore split backups</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/recovery-advisor-using-ssms-to-createrestore-split-backups</link>
      <pubDate>Tue, 12 Jul 2011 21:01:25 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/07/12/recovery-advisor-using-ssms-to-createrestore-split-backups/</guid>
      <description><![CDATA[This is part 2 of a two part blog series that my colleague Vatsalya Agrawal wrote up on the new tool...]]></description>
      <content:encoded><![CDATA[<p>This is part 2 of a two part blog series that my colleague Vatsalya Agrawal wrote up on the new tool called Recovery Advisor. Recovery Advisor is a new tool, that we have introduced to make restoring databases easier for users.</p>  <p>--</p>  <p>MS SQL Server has capability to split a backup file into multiple files. This is known as “Split File Backup”. In this blog I am going to discuss the support provided in SSMS for creating/restoring split file backups. Split file backups provide the following advantages over single file backups:</p>  <p>1. Split file backups can be taken faster than single file backups as different backup files can be written on different disks in parallel.</p>  <p>2. Split file backups help reduce the backup file size to more manageable/desired sizes. These sizes can be tailor made to fit the capacity of available media.</p>  <p>Let’s now checkout how SSMS can be used to create/restore split file backups.</p>  <p><b>Creating split file backups</b></p>  <p>To create a split file backup add multiple destination files while creating the database backup. To add multiple destination files, click &quot;Add&quot; and enter the name of additional output files. For example in Figure 1, the full backup of AdventureWorks database is going to be split across 2 files, namely “AdventureWorks1.bak” and “AdventureWorks2.bak”.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/6888.clip_image002_71D216CB.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/6888.clip_5F00_image002_5F00_71D216CB.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/3833.clip_image002_thumb_2F12CB93.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/3833.clip_5F00_image002_5F00_thumb_5F00_2F12CB93.jpg" width="994" height="772" /></a></p>  <p><a name="_Ref292622229">Figure </a>1: Creating Split File Backup.</p>  <p>Some points to note about split file backups are:</p>  <p>1. A file created as a part of n-way splitting can only be used for n-way split backup. It cannot be used for m-way split. For example, in the example above both files “AdventureWorks1.bak” and “AdventureWorks2.bak” can now only be used in 2-way split backups. These files cannot be used for single file backups or for 3-way split backups.</p>  <p>2. Backups of multiple databases can be taken in a single set of files.</p>  <p>3. Different types of backups (Full, Differential and Transaction Log) can be taken in a single set of files.</p>  <p>4. If a database backup file of size 2G, needs to be broken into files no bigger than 700M each. Then the database backup should be split into 3 files, thus each file would be ~700M each.</p>  <p><b>Restoring Split File Backups</b></p>  <p>To restore a database from a split file backup, go to the devices option (Figure 2) in the restore database dialog and open the file browse window to select files.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2262.clip_image004_6BE74D65.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/2262.clip_5F00_image004_5F00_6BE74D65.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/8130.clip_image004_thumb_30473EA5.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/8130.clip_5F00_image004_5F00_thumb_5F00_30473EA5.jpg" width="738" height="772" /></a></p>  <p><a name="_Ref292622259">Figure </a>2: Device option to add multiple backup files during database restore.</p>  <p>When all the required files are added, the recovery advisor goes thru the file headers, the LSNs, etc and creates a restore plan seamlessly as shown in Figure 3.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5315.clip_image006_0DA3002A.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/5315.clip_5F00_image006_5F00_0DA3002A.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/3833.clip_image006_thumb_31E7E4AC.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/3833.clip_5F00_image006_5F00_thumb_5F00_31E7E4AC.jpg" width="692" height="772" /></a></p>  <p><a name="_Ref292622296">Figure </a>3: Restore plan from split file backup.</p>  <p>A natural question now is: “how would I know if I have added all the files that constitute a split file backup” OR more specifically “how would I know which file I have missed”. Well, when all the required files are not provided, recovery advisor throws an error reporting the missing file. That is, if in our example only the first file is added recovery advisor would throw an error saying that file sequence number 2 is missing from the files provided (Figure 4). This information is very helpful in pin-pointing the missing file.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/3821.clip_image008_679D2A06.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/3821.clip_5F00_image008_5F00_679D2A06.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7633.clip_image008_thumb_72E63E43.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/7633.clip_5F00_image008_5F00_thumb_5F00_72E63E43.jpg" width="749" height="772" /></a></p>  <p><a name="_Ref292622312">Figure </a>4: Recovery advisor reporting the missing split backup file.</p>  <p>In summary, splitting backup files can make taking backups faster and backup files smaller. SSMS helps in seamlessly creating a split file backup and in creating a restore sequence from split file backups. Happy splitting.</p>  <p>&#160;</p>  <p>Vatsalya Agrawal can be reached at <a href="mailto:vaagrawa@microsoft.com">vaagrawa@microsoft.com</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Recovery Advisor: An Introduction</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/recovery-advisor-an-introduction</link>
      <pubDate>Tue, 12 Jul 2011 20:58:02 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/07/12/recovery-advisor-an-introduction/</guid>
      <description><![CDATA[Vatsalya Agrawal is a colleague of mine, in the test team at SQL Server Manageability. This is part...]]></description>
      <content:encoded><![CDATA[<p>Vatsalya Agrawal is a colleague of mine, in the test team at SQL Server Manageability. This is part 1 of a two part series that he has written, on Recovery Advisor. This is a new tool, that we have introduced to make restoring databases easier for users. Read part 1 <a href="https://blogs.msdn.com/b/sqlrem/archive/2011/07/13/recovery-advisor-an-introduction.aspx">here</a>. </p>  <p>--</p>  <p>Backup Restore is an essential database maintenance tasks. Having a good backup plan in place helps DBAs to restore from any failure in a very efficient way. In order to recover from a failure, DBAs have to restore a set of backups in a logically correct and meaningful sequence. As the SQL server provides a bunch of backup types (wherein each has a different set of properties), creating a correct recovery sequence for a given point in time is a tricky business. Add to this the complexity of multiple fork scenarios and the fact that there can be multiple correct recovery plans with vastly different runtime costs and the task of creating an optimal and correct recovery sequence get very complicated.</p>  <p>In order to address this problem, SSMS has designed a tool “Recovery Advisor”. Recovery Advisor helps DBAs in creating a correct and optimal restore sequence. In this blog I will highlight the features of recovery advisor that are going to make life of DBA easier during database restores.</p>  <p>In order to play around with recovery advisor, let us first create a database and take some backups on the same. The following script creates a database and then takes a full backup, then a differential backup and then a transaction log backup. It then restores the database to differential backup and then takes a transaction log backup again.</p>  <table border="1" cellspacing="2" cellpadding="2" width="800"><tbody>     <tr>       <td valign="top" width="794">         <p><font size="2" face="Courier New">create database fork_scenario</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">use fork_scenario</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">create table t (c int)</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">BACKUP DATABASE [fork_scenario] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\fork_scenario.bak' WITH NOFORMAT, NOINIT, NAME = N'fork_scenario-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">insert into t values (1)</font></p>          <p><font size="2" face="Courier New">BACKUP DATABASE [fork_scenario] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\fork_scenario.bak' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N'fork_scenario-Differential Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">insert into t values (2)</font></p>          <p><font size="2" face="Courier New">--wait for a minute</font></p>          <p><font size="2" face="Courier New">BACKUP LOG [fork_scenario] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\fork_scenario.bak' WITH NOFORMAT, NOINIT, NAME = N'backup_fork-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">--Recover to the differential backup.</font></p>          <p><font size="2" face="Courier New">USE [master]</font></p>          <p><font size="2" face="Courier New">ALTER DATABASE [fork_scenario] SET SINGLE_USER WITH ROLLBACK IMMEDIATE</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">RESTORE DATABASE [fork_scenario] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\fork_scenario.bak' WITH FILE = 1, NORECOVERY, NOUNLOAD, REPLACE, STATS = 5</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">RESTORE DATABASE [fork_scenario] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\fork_scenario.bak' WITH FILE = 2, NOUNLOAD, STATS = 5</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">ALTER DATABASE [fork_scenario] SET MULTI_USER</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">use fork_scenario</font></p>          <p><font size="2" face="Courier New">GO</font></p>          <p><font size="2" face="Courier New">insert into t values (3)</font></p>          <p><font size="2" face="Courier New">BACKUP LOG [fork_scenario] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\fork_scenario.bak' WITH NOFORMAT, NOINIT, NAME = N'fork_scenario-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10</font></p>          <p><font size="2" face="Courier New">GO</font></p>       </td>     </tr>   </tbody></table>  <p>There are now 4 backups (1 Full, 1 Differential and 2 Log backups) for ‘fork_scenario’. These backups form a basic fork configuration (Figure 1).</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/4403.clip_image0016_54BDAA93.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/4403.clip_5F00_image0016_5F00_54BDAA93.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image001[6]" border="0" alt="clip_image001[6]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5315.clip_image0016_thumb_686A9427.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/5315.clip_5F00_image0016_5F00_thumb_5F00_686A9427.png" width="210" height="93" /></a></p>  <p>Figure 1: Basic Fork Scenario.</p>  <p>To open recovery advisor, go to the database node ‘fork_scenario’ in the Object Explorer, right click and go to tasks, and further on to restore. Click database. This should open the dialog in Figure 2.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1777.clip_image0039_47772180.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/1777.clip_5F00_image0039_5F00_47772180.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image003[9]" border="0" alt="clip_image003[9]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/6545.clip_image0039_thumb_176CCFFF.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/6545.clip_5F00_image0039_5F00_thumb_5F00_176CCFFF.jpg" width="1028" height="580" /></a></p>  <p>Figure 2: Default restore plan to restore to last backup taken.</p>  <p>By default, recovery advisor tries to restore the database to the last backup taken. In this case it’s the second log backup. Look closely to the restore plan generated, the plan is to restore full backup then differential backup and finally a log backup. Observe that the position of log backup is 4, i.e. this is the second log backup (L<sub>2</sub>, the last backup taken) as the first log backup (L<sub>1</sub>) will have position 3. Thus, when we want to restore ‘fork_scenario’ recovery advisor is by default is giving us a correct restore sequence to the last backup taken (taking into consideration the restore that we had performed earlier).</p>  <p>So far so good, but want if we do not want to restore to the last backup taken, but want to do a point in time restore? Well that’s exactly what ‘Timeline’ feature does. Let’s see how. Suppose I want to restore to a point in time just after the differential backup (before any of the log backups).</p>  <p>Click the timeline button of the restore dialog. This opens up the backup timeline dialog (Figure 3). The time line in here shows different backup taken so far. In order to, give a specific time for database restore, check the ‘Specific date and time’ radio button. This enables date and time input boxes along with the slider given below the timeline. We can either directly enter the date/time we want, or we can use the slider to choose a location relative to the backups taken. Drag the slider to a point just after the differential backup (but before the log backup L<sub>1</sub>). Click OK.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7127.clip_image0058_74C89183.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/7127.clip_5F00_image0058_5F00_74C89183.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image005[8]" border="0" alt="clip_image005[8]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1754.clip_image0058_thumb_4047BF3B.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/1754.clip_5F00_image0058_5F00_thumb_5F00_4047BF3B.jpg" width="1028" height="580" /></a></p>  <p>Figure 3: Point in time restore, backup timeline dialog.</p>  <p>As a new restore time is now entered, recovery advisor again looks up available database backups and reconstructs a new restore sequence for us (Figure 4). This new restore plan again restores a full backup then a differential backup and finally a log backup, but look closely at the positions, the position of the log backup is now 3. That is, it’s the first log backup L<sub>1</sub>. Recovery advisor has correctly picked up the different recovery path corresponding to the new restore time given.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/3324.clip_image0078_7669378A.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/3324.clip_5F00_image0078_5F00_7669378A.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image007[8]" border="0" alt="clip_image007[8]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1323.clip_image0078_thumb_34161F47.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/1323.clip_5F00_image0078_5F00_thumb_5F00_34161F47.jpg" width="1028" height="580" /></a></p>  <p>Figure 4: Restore plan for given point in time.</p>  <p>We have seen that recovery advisor does create a correct restore plan, but what about optimality of the plan? Notice that, recovery plan with a full backup and then only a log backup (positions 1 and 3) would also have been a correct plan. This plan would have been more expensive then the plan created by the recovery advisor, because restoring a set of transactions from a differential backup is cheaper than restoring them from a log backup. In this case, the transactions already covered as a part of differential backup recovery will be ignored (if they are also covered by the log backup) when the log backup is restored.</p>  <p>All in all, recovery advisor is a handy tool able to create optimal recovery plans for a given point in time. It makes the task of restoring a database less painful. Happy restoring.</p>  <p>Vatsalya Agrawal can be reached at <a href="mailto:vaagrawa@microsoft.com">vaagrawa@microsoft.com</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Deleting Old server names from "Connect to Server" dialog in SSMS</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/deleting-old-server-names-from-connect-to-server-dialog-in-ssms</link>
      <pubDate>Tue, 12 Jul 2011 20:45:24 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/07/12/deleting-old-server-names-from-connect-to-server-dialog-in-ssms/</guid>
      <description><![CDATA[In an earlier Denali CTP, we had introduced a mechanism for customers to delete the un-used/not...]]></description>
      <content:encoded><![CDATA[<p>In an earlier Denali CTP, we had introduced a mechanism for customers to delete the un-used/not required server names from the drop down in connection box in SSMS. There has been a big customer ask for helping them remove the redundant server names from the MRU list. </p>  <p>Here is a blog post from Devesh Nagpal, a developer in the SQL Server Manageability Team describing this new feature in SQL Server Code Named “Denali” CTP3.</p>  <p>--</p>  <p>There are a few undocumented ways on doing this as mentioned here,</p>  <p><a href="https://stackoverflow.com/questions/1059105/how-to-remove-server-name-items-from-history-of-sql-server-management-studio">https://stackoverflow.com/questions/1059105/how-to-remove-server-name-items-from-history-of-sql-server-management-studio</a></p>  <p><a href="https://sqlblog.com/blogs/aaron_bertrand/archive/2009/03/18/managing-the-mru-list-for-the-connect-to-server-dialog-in-ssms.aspx">https://sqlblog.com/blogs/aaron_bertrand/archive/2009/03/18/managing-the-mru-list-for-the-connect-to-server-dialog-in-ssms.aspx</a></p>  <p>The problem with using undocumented feature were</p>  <p>1) There were side effects of doing it like losing SSMS specific Tools | Options settings, OE Details List View Customizations, the MRU list for OE Details Search, and MRU for Reports.</p>  <p>2) There was no official support from Microsoft.</p>  <p>We will now be supporting Deleting the server name from MRU list officially. This will help customers remove any Server name from the drop down list they do not wish to see. With regard to addition of servers to this list, there is no change to the earlier behavior – the server name will get appended to the list once you connect to it.</p>  <p>Here is a simple demonstration of how you can now easily remove the Server names from MRU list from CTP2 Denali.</p>  <p>As shown in the picture below there might be multiple machines you have connected to in SSMS. All will be shown in history sorted by when you have last used them.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0207.clip_image001_2477DB99.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/0207.clip_5F00_image001_5F00_2477DB99.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/4011.clip_image001_thumb_56FB390B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/4011.clip_5F00_image001_5F00_thumb_5F00_56FB390B.png" width="244" height="185" /></a></p>  <p>To delete the dead servers from the list, select the name you want to delete either via mouse or via keyboard. As shown in the image below.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5078.clip_image002_0DF51745.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/5078.clip_5F00_image002_5F00_0DF51745.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2043.clip_image002_thumb_44EEF57E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/2043.clip_5F00_image002_5F00_thumb_5F00_44EEF57E.png" width="244" height="185" /></a></p>  <p>Now press the delete key on the keyboard, the item will be deleted from the list.You can delete as many items as you want. Note that the text in the box will remain to your last selection even after delete.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5076.clip_image003_30892FF3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/5076.clip_5F00_image003_5F00_30892FF3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image003" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2364.clip_image003_thumb_007EDE72.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/2364.clip_5F00_image003_5F00_thumb_5F00_007EDE72.png" width="244" height="185" /></a></p>  <p>Current Limitations</p>  <p>1) No multiple select and delete, the delete has to be one by one for server names. There is no multiple select and delete option.</p>  <p>2) You will have to rely on keyboard for actually deleting the item, right click on item and then deleting it is not supported. </p>  <p>3) There is no global list to keep track of the server names users have deleted and not to add them in the list again. The list will be re-populated once the user connects to a new server name (which is not present in the list).</p>  <p>Devesh Nagpal can be reached at <a href="mailto:devnag@microsoft.com">devnag@microsoft.com</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Enhanced Keyboard Shortcuts in SSMS in Denali</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/enhanced-keyboard-shortcuts-in-ssms-in-denali</link>
      <pubDate>Tue, 12 Jul 2011 20:37:00 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/07/12/enhanced-keyboard-shortcuts-in-ssms-in-denali/</guid>
      <description><![CDATA[In SQL Server Code Named &ldquo;Denali&rdquo; CTP3, we introduced some enhancements in the way we...]]></description>
      <content:encoded><![CDATA[<p>In SQL Server Code Named &ldquo;Denali&rdquo; CTP3, we introduced some enhancements in the way we handled keyboard shortcuts in SSMS. My colleague Prachi Bora, a PM in the SQL Server Manageability team, has a crisp blog write-up on what&rsquo;s new and what makes this cool.</p>
<p>--</p>
<p>SSMS veterans out there can tell you in their sleep that Ctrl+E is the keyboard shortcut to have the T-SQL editor execute queries. The Visual Studio users on the other hand swear by the IDE and want a similar environment in SSMS and want to use Ctrl+Shift+E to execute their T-SQL scripts, just like they do in Visual Studio. The good news is that both set of users will be happy with the enhancements in keyboard shortcuts in Denali-SSMS.</p>
<p>You can choose between two settings that get installed with SSMS, you can import keyboard shortcut settings of your choice and, if you like, you can customize shortcuts further. In addition, you can save your settings and share them with your team. Here&rsquo;s how:</p>
<p><b>Switching between Keyboard Settings</b><b> </b></p>
<p>SSMS now comes with 2 keyboard settings:</p>
<p>1. SQL Server Denali Settings &ndash; for those who are already used to the keyboard shortcuts that came in SSMS in 2008 R2. These settings are also applied by default when you install Denali SSMS.</p>
<p>2. Visual Studio 2010 Compatible Settings &ndash; for those who want similar keyboard shortcuts in SSMS and database projects in Visual Studio 2010.</p>
<p>If you want to change from the SSMS Denali Settings to the Visual Studio 2010 Compatible Settings, go to &ldquo;Tools&rdquo; menu and choose &ldquo;Import and Export Settings&rdquo;. The following wizard screen will appear:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5226.clip_image002_7F8530CE.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/5226.clip_5F00_image002_5F00_7F8530CE.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2480.clip_image002_thumb_24364846.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/2480.clip_5F00_image002_5F00_thumb_5F00_24364846.jpg" width="244" height="241" /></a></p>
<p>Choose &ldquo;Reset all Settings&rdquo; and click through the wizard. The wizard gives you the options to save your current settings or simply reset settings by overwriting. Choose the option you prefer and the following screen will appear where you can select the between the two settings that got installed with SSMS.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0334.clip_image004_3057C26D.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/0334.clip_5F00_image004_5F00_3057C26D.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5621.clip_image004_thumb_0E8BE9DC.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-62-51-metablogapi/5621.clip_5F00_image004_5F00_thumb_5F00_0E8BE9DC.jpg" width="244" height="241" /></a></p>
<p>Choose the &ldquo;Visual Studio 2010 Compatible Settings&rdquo; and click &ldquo;Finish&rdquo;.</p>
<p>Your keyboard shortcuts will now be similar to Visual Studio and you can use, for e.g., Ctrl+Shift+E to execute queries.</p>
<p><b>Customize Keyboard Shortcuts and share with your team</b></p>
<p>SSMS in Denali uses the <a href="https://msdn.microsoft.com/en-us/library/bb685691.aspx">Visual Studio 2010 Isolated Shell</a>. Amongst all the benefits that using the Visual Studio 2010 Shell brings, the ones I would like to highlight in this post are the abilities to customize keyboard shortcuts, determining the shortcut key assigned to a command and the ability to share your settings with your team. <a href="https://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&amp;l=EN-US&amp;k=k(VS.TOOLSOPTIONSPAGES.ENVIRONMENT.KEYBOARD);k(DevLang-TSQL)&amp;rd=true">This article</a> on MSDN walks through how to perform each of these actions in Visual Studio. Follow exactly the same steps using the Tools menu in SSMS and you should be good to go!</p>
<p>The ability to import and export settings also lets you share your keyboard settings file between SSMS, Visual Studio 2010 and <a href="https://msdn.microsoft.com/en-us/data/gg427686">SQL Server Developer Tools codenamed &ldquo;Juneau&rdquo;</a>. If you use two or all of these products together and want same shortcuts in all cases, you can do so now.</p>
<p>One point to note is that there is currently no way to export any keyboard shortcut customizations you might have made in, for e.g., SSMS 2008 R2 and import them into SSMS in Denali. However, when you upgrade from 2008 R2 to Denali the manageability tools are installed side-by-side and you can continue to use both the versions of tools.</p>
<p><b>Assign shortcuts to frequently used stored procedures</b></p>
<p>If you have used SSMS in Denali CTP1, you may have noticed the absence of the ability to assign shortcuts to frequently used stored procedures. This feature was available in SSMS in 2008 R2 and went hiding in Denali CTP1, because of a bug. I am happy to tell you that the feature is now back in Denali CTP3 and you can use it as mentioned in <a href="https://msdn.microsoft.com/en-us/library/ms174178.aspx">this MSDN article</a>, under the section &ldquo;Creating a Keyboard Accelerator for a Stored Procedure&rdquo;.</p>
<p>Happy keyboarding!</p>
<p><b>Update: </b>Several users have reported problems with keyboard short-cuts not working quite right, when they uninstalled SQL Server Denali CTP1 and installed SQL Server Denali CTP3 on their machines. The way to work around the problem is to reset their settings (as shown above). Things should get back to normal after that.</p>
<p>&nbsp;</p>
<p>Prachi Bora can be reached at <a href="mailto:pbora@microsoft.com">pbora@microsoft.com</a></p>]]></content:encoded>
    </item>
    <item>
      <title>A day of Releases</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/a-day-of-releases</link>
      <pubDate>Tue, 12 Jul 2011 20:34:43 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/07/12/a-day-of-releases/</guid>
      <description><![CDATA[Today we announced the next public CTP of Microsoft SQL Server Code Name “Denali&quot;. Download...]]></description>
      <content:encoded><![CDATA[<p>Today we announced the next public CTP of Microsoft SQL Server Code Name “Denali&quot;. Download links are <a href="https://www.microsoft.com/betaexperience/pd/SQLDCTP3CTA/enus/default.aspx">here</a>. </p>  <p>We are also excited to release SQL Server 2008 R2 SP1. Download links are <a href="https://go.microsoft.com/fwlink/?LinkId=214356">here</a>.     <br /></p>  <p>You can gather a quick overview of what's new in these two releases in the SQL Server Release Services Blog <a href="https://blogs.msdn.com/b/sqlreleaseservices/archive/2011/07/12/sql-server-code-name-denali-ctp3-and-sql-server-2008-r2-sp1-are-here.aspx">here</a>. </p>  <p>As always, play around with the bits, and we would love your feedback.</p>]]></content:encoded>
    </item>
    <item>
      <title>T-SQL IntelliSense enhancements in SSMS –Denali</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/t-sql-intellisense-enhancements-in-ssms-denali</link>
      <pubDate>Tue, 04 Jan 2011 08:25:53 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/01/04/t-sql-intellisense-enhancements-in-ssms-denali/</guid>
      <description><![CDATA[&#160;  Kamal Bhatt (kbhatt@microsoft.com), a colleague of mine in the SQL Server Manageability...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>Kamal Bhatt (<a href="mailto:kbhatt@microsoft.com">kbhatt@microsoft.com</a>), a colleague of mine in the SQL Server Manageability Team, wrote up this useful blog post on some of the new Intellisense enhancements in SQL Server Code Name “Denali”.</p>  <hr />  <p>In this blog post, I will go over three IntelliSense enhancements that have been introduced in SSMS-Denali. They are as follows:</p>  <p>a.) SUPPORT OF CODE SNIPPETS</p>  <p>b.) SUBSTRING MATCHING IN COMPLETION LIST</p>  <p>c.) VALIDATING BREAKPOINTS</p>  <p>&#160;</p>  <p><strong>a.) <u>SUPPORT OF CODE SNIPPETS</u></strong></p>  <p>Code Snippet is a valuable tool that provides better editing experience of TSQL Code for Database Developers/DBAs. The snippet itself is an XML-based template that describes various fields having default values. These fields are highlighted after the snippet is inserted and user can tab through each of these fields and edit default values assigned to them. Heavily used TSQL constructs can be provided through Code Snippets functionality thereby increasing productivity. </p>  <p>There are two types of Snippets: <b>Expansion Snippets</b> (Snippets of code you can quickly insert into your code e.g. Create Table DDL) and <b>Surround –With Snippets</b> (Snippets of code that envelope your code e.g. Begin End construct)</p>  <p><b>How to invoke Code Snippets functionality?</b></p>  <p>There are three ways of invoking the Code Snippets functionality:</p>  <p>a) Right Click Context Menu on TSQL Editor.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/8468.image_63BF6D68.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/8468.image_5F00_63BF6D68.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0844.image_thumb_189C4CD9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/0844.image_5F00_thumb_5F00_189C4CD9.png" width="453" height="359" /></a></p>  <p>b) Open TSQL Query Editor and go to Edit Menu =&gt; IntelliSense option</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2514.image_626AAEBC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/2514.image_5F00_626AAEBC.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/4657.image_thumb_6C02F725.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/4657.image_5F00_thumb_5F00_6C02F725.png" width="445" height="390" /></a></p>  <p>&#160;</p>  <p>c.) Keyboard Shortcuts on TSQL Editor ( Ctrl K + Ctrl X =&gt; Insert Snippets, Ctrl K + Ctrl S =&gt; Surround With Snippets)</p>  <p>By choosing any one of the methods listed above, Code Snippet Inserter gets invoked on TSQL Query Editor. Various Snippets have been organized under categories. User can select a particular category to see list of various snippets under it and select one of them e.g. Below Screen shot shows that user has selected Scalar function under “Function” category. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/3175.image_5A52C0C0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/3175.image_5F00_5A52C0C0.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5734.image_thumb_29700955.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/5734.image_5F00_thumb_5F00_29700955.png" width="564" height="107" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7875.image_6D63C79F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7875.image_5F00_6D63C79F.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2021.image_thumb_6A6E62EC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/2021.image_5F00_thumb_5F00_6A6E62EC.png" width="356" height="234" /></a></p>  <p><u>Note</u>: If you observe that when first instance of “param1” is highlighted, the second instance of “param1” is also recognized. It is surrounded by a dotted line which means that if you change the name of param1 at first place, automatically second “param1” also gets changed. </p>  <p>Currently SSMS comes with small set of pre-defined snippets. We have enabled the ability for the users to add user-defined code snippets easily.</p>  <p><b>How to create your own Snippets?</b></p>  <p>Let us create code snippet that contains basic code for TRY…CATCH construct. We will call this snippet as “try-catch” snippet. </p>  <p>As describe above, Snippets is an XML file, basic outline of Snippet looks like this:</p>  <blockquote>   <p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;     <br />&lt;CodeSnippets xmlns=&quot;https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet&quot;&gt;</p>    <p>&lt;CodeSnippet Format=&quot;1.0.0&quot;&gt;     <br />&lt;Header&gt;</p>    <p>…</p>    <p>&lt;/Header&gt;     <br />&lt;Snippet&gt;</p>    <p>…     <br />&lt;/Snippet&gt;      <br />&lt;/CodeSnippet&gt;</p>    <p>&lt;/CodeSnippets&gt;</p> </blockquote>  <p>Let us create code snippet that contains following basic code for TRY…CATCH construct:</p>  <blockquote>   <p>BEGIN TRY</p>    <p>-- Try Block Statements</p>    <p>END TRY</p>    <p>BEGIN CATCH</p>    <p>-- Logic for Error Handling</p>    <p>END CATCH</p> </blockquote>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/4263.image_6059C1C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/4263.image_5F00_6059C1C1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7823.image_thumb_2DE5C875.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7823.image_5F00_thumb_5F00_2DE5C875.png" width="640" height="488" /></a></p>  <p><strong>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Code Snippet for TryCatch </strong></p>  <p><u>Important Step</u>: Create a new folder say “CustomSnippets “ and save above XML code as try.xml file inside it.</p>  <p><b>How to add Code Snippets in SSMS after you have created it?</b></p>  <p>Now we would want to add the newly created custom snippet folder (created above) as one of the folders for SSMS to search for custom code snippets. This can be achieved through Code Snippets Manager which can be invoked from Tools menu:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/3187.image_228C8E6B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/3187.image_5F00_228C8E6B.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1033.image_thumb_785CE082.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/1033.image_5F00_thumb_5F00_785CE082.png" width="604" height="249" /></a></p>  <p>It will launch Code Snippets Manager (If you are familiar with Visual Studio IDE – This is standard Snippets Manager which provides various functionalities like Adding/Removing/Importing Code Snippets). Using “Add” button of Snippets manager we register code snippets inside it, in SSMS.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7823.image_422B4266.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7823.image_5F00_422B4266.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7317.image_thumb_1EAE9E01.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7317.image_5F00_thumb_5F00_1EAE9E01.png" width="599" height="347" /></a>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1462.image_46256A6B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/1462.image_5F00_46256A6B.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/5165.image_thumb_36C1E28F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/5165.image_5F00_thumb_5F00_36C1E28F.png" width="599" height="359" /></a></p>  <p>On invoking Code Snippet Inserter, you will observe that CustomSnippets becomes one of the category and under it try-catch snippet exists which can be inserted.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0572.image_23DD3918.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/0572.image_5F00_23DD3918.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0385.image_thumb_618A20D4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/0385.image_5F00_thumb_5F00_618A20D4.png" width="590" height="111" /></a></p>  <p>Above steps, clearly shows how to create a code snippet and register it with SSMS, you can create complex code snippets of various regular TSQL tasks and make your life really easy.</p>  <p><strong>b.) <u>SUBSTRING MATCHING IN COMPLETION LIST</u></strong></p>  <p>If you have used IntelliSense in SQL Server 2008/2008 R2 Management studio, you must be aware of completion list (drop down list) , which provides a listing of available objects to use in SELECT statements, DML statements, and stored procedure / function calls, along with numerous other operations. </p>  <p>E.g. On connected TSQL Query Editor if we type “exec master.sys.” we will get following completion list. It contains all the functions/stored procedures that are present inside sys schema of master database.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/6330.image_0C820EDA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/6330.image_5F00_0C820EDA.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7713.image_thumb_625260F1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7713.image_5F00_thumb_5F00_625260F1.png" width="585" height="263" /></a></p>  <p>In previous releases as user goes on typing after “<b>exec master.sys.</b>” we used to do prefix matching and if such a prefix exists in the list, we scroll down the list to that position and highlight the entry. However in several scenarios, this is not much helpful to the user incase he remembers only a substring of the object he wants to select. This enhancement implements Completion List Filtering, which filters the original list based on substring matching, as user goes on typing.</p>  <p>Let us take an example to make it clear:</p>  <p>Suppose user wants to create a new login, he only remembers that there is some “addlogin” stored procedure inside sys schema of master database. So as he types “addlog” after “<b>exec master.sys.” </b>he will observe that dropdown list keeps getting refreshed after each character having only those entries which contain the substring that user has typed so far. This is really helpful to the user since he does not have to go through the entire list to figure out the desired stored procedure; instead completion list is getting shortened with relevant items. Below are two screenshots which will illustrate this completion list filtering.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0550.image_0C71E90D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/0550.image_5F00_0C71E90D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/6232.image_thumb_436BC746.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/6232.image_5F00_thumb_5F00_436BC746.png" width="435" height="185" /></a>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/0474.image_3237E9A3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/0474.image_5F00_3237E9A3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1067.image_thumb_1E3E570D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/1067.image_5F00_thumb_5F00_1E3E570D.png" width="379" height="121" /></a></p>  <p>DBA’s/developers working on databases having thousands of objects will love the magic of Completion List Filtering !! </p>  <p><strong>c.) <u>VALIDATING BREAKPOINTS</u></strong></p>  <p>A breakpoint is a marker which indicates that program execution should stop at a particular point while running the program in a debugger. This enhancement aims at validating breakpoint locations and providing immediate feedback to the user when he places a breakpoint. Since TSQL Language Service has a fairly intimate knowledge of the source code being displayed, it can readily determine what constitutes a valid breakpoint location. Some of the highlights of this feature are as follows:</p>  <p>a.) Whenever user places a breakpoint on a construct if it is a valid location, the entire statement (whether defined in single line or multiple lines) gets highlighted, there by clearly showing the breakpoint location. ( In previous releases we don’t highlight the entire construct ,only red circle in-front of line was shown and hence it was difficult for user’s to identify exact statement on which breakpoint is placed)</p>                  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7318.image_1B48F25A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7318.image_5F00_1B48F25A.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/2548.image_thumb_38DACD59.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/2548.image_5F00_thumb_5F00_38DACD59.png" width="422" height="196" /></a></p>  <p>a.) If multiple statements are defined in a single line, user can now place a breakpoint on individual statement also (In previous releases it was not possible to place multiple breakpoints on a single line)</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/6354.image_47C1FC73.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/6354.image_5F00_47C1FC73.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/1057.image_thumb_73261D6D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/1057.image_5F00_thumb_5F00_73261D6D.png" width="414" height="160" /></a></p>  <p>a.) If a breakpoint is placed on a location that is not considered as valid, user will get immediate feedback on the status bar. For example, if a breakpoint is placed on a comment, the breakpoint is not considered valid because there is no code at that location in the source code. (In Previous releases user was able to place breakpoint on line which contains comments and it was validated during debugging time at which debugger disables that breakpoint.)</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/7356.image_01A11993.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/7356.image_5F00_01A11993.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/metablogapi/6114.image_thumb_70F8F8D7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51-metablogapi/6114.image_5F00_thumb_5F00_70F8F8D7.png" width="664" height="317" /></a></p>  <p>&#160;</p>          <p>Kamal Bhatt (<a href="mailto:kamalbh@microsoft.com">kamalbh@microsoft.com</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server Code-Named “Denali” - T-SQL Debugger Enhancements in CTP1</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/sql-server-code-named-denali-t-sql-debugger-enhancements-in-ctp1</link>
      <pubDate>Mon, 03 Jan 2011 23:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Nitika N]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2011/01/03/sql-server-code-named-denali-t-sql-debugger-enhancements-in-ctp1/</guid>
      <description><![CDATA[The debugger feature in SQL Server Management Studio gives us tools to debug T-SQL scripts, stored...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The debugger feature in SQL Server Management Studio gives us tools to debug T-SQL scripts, stored procedures, functions and triggers. <span style="mso-spacerun: yes">&nbsp;</span>In this article, I am going to discuss some of the newly added&nbsp;functionalities in T-SQL debugger in SQL 11 CTP1. These enhancements are mainly aimed at bridging the gap between T-SQL and C# debugging experience with features like Conditional Breakpoint, T-SQL expression evaluation in Watch &amp; Immediate Window and DataTips. If you are experienced with the Visual Studio debugger features, you would find these techniques familiar.</span></span></p>
<p class="MsoNormal">
<h1 class="MsoNormal" style="line-height: normal; margin: 24pt 0in 0pt; mso-outline-level: 1;"><span style="font-family: 'Cambria','serif'; color: #365f91; font-size: 18pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-font-kerning: 18.0pt;"></span></h1>
</p>
<h1 class="MsoNormal" style="line-height: normal; margin: 24pt 0in 0pt; mso-outline-level: 1;"><span style="font-family: 'Cambria','serif'; color: #365f91; font-size: 18pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-font-kerning: 18.0pt;">
<p>Conditional Breakpoint</p>
</span></h1>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">As the name suggests, Conditional Breakpoint functionality allows you to associate conditions with breakpoints. The debugger breaks on the conditional breakpoint only when the associated condition goes true in the execution cycle. Conditional Breakpoints are typically useful while debugging loops and when one wants to break inside the loop only when certain condition goes true or some variable value changes.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Let me explain the steps to create and use Conditional Breakpoint -<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span>&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Assume that you have the following code in your T-SQL script:</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">USE</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: teal;">[AdventureWorks]</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">GO</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">DECLARE</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: teal;">@return_value</span> <span style="color: blue;">INT</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">DECLARE </span><span style="font-family: Consolas; color: teal; font-size: 9.5pt;">@manager_id</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">INT</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">SET</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: teal;">@manager_id</span> <span style="color: gray;">=</span> 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">WHILE </span><span style="font-family: Consolas; color: gray; font-size: 9.5pt;">(</span><span style="font-family: Consolas; color: teal; font-size: 9.5pt;">@manager_id</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: gray;">&lt;</span> 100<span style="color: gray;">)</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">BEGIN</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">EXEC</span> <span style="color: teal;">@return_value</span> <span style="color: gray;">=</span> <span style="color: teal;">[dbo]</span><span style="color: gray;">.</span><span style="color: teal;">[uspGetManagerEmployees]</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; color: teal; font-size: 9.5pt;">@ManagerID</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: gray;">=</span> <span style="color: teal;">@manager_id</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">SELECT</span> <span style="color: red;">'Return Value'</span> <span style="color: gray;">=</span> <span style="color: teal;">@return_value</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">SET</span> <span style="color: teal;">@manager_id</span> <span style="color: gray;">=</span> <span style="color: teal;">@manager_id</span> <span style="color: gray;">+</span> 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">END<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">GO</span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Here we are executing a stored procedure in a loop with different parameter being passed to the stored procedure each time. By analyzing the results of execution, we have found out that we are getting unexpected results when @manager_id<span style="mso-spacerun: yes">&nbsp; </span>= 55. So we want to debug the stored procedure when &ldquo;manager_id = 55&rdquo; is being passed as the parameter. To do this, first put a breakpoint on the exec statement. On starting the debugger, execution will stop every time on that exec statement. <span style="mso-spacerun: yes">&nbsp;</span><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Now if we want the code to break only when @manage_id= 55, we need to associate a condition like &ldquo;if (@manager_id == 55)&rdquo; with the Breakpoint. Following are the steps to do this -</span></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><strong>1. "Right Click&rdquo; on the Red Breakpoint icon and go to &ldquo;Condition&rdquo;</strong></span></span></p>
<p class="MsoListParagraph"><b style="mso-bidi-font-weight: normal;"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></b></p>
<p class="MsoNormal"><span style="mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f" id="_x0000_t75"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></v:path><o:lock v:ext="edit" aspectratio="t"></o:lock></v:shapetype></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/0284.111.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/0284.111.png" border="0" /></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"></span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Figure: Right Click Breakpoint -&gt; Condition&hellip;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoListParagraphCxSpFirst"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoListParagraphCxSpLast"><strong><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">2.</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Set Condition in the following dialog</span></span></strong></p>
<p>
<p>&nbsp;&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/0572.222.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/0572.222.png" border="0" /></p>
</p>
<p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Figure: Breakpoint Condition Settings<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Note: Check the Breakpoint Symbol. It should look like a plus (+) symbol inside the breakpoint circle which indicates conditional breakpoints.</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">
<p>After setup of the conditional breakpoint, if you run the script to debug it, you will see that the execution of script is only paused when the given condition with breakpoint is satisfied (in this case when <i style="mso-bidi-font-style: normal;">@manager_id = 55</i>).</p>
</span></span></p>
<p class="MsoNormal">&nbsp;&nbsp;</p>
<p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/3250.333.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/3250.333.png" border="0" /></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Additionally, there are two options for the condition that you can set: <o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">1.</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri; font-size: small;">"<b style="mso-bidi-font-weight: normal;">Is true</b>" is used for T-SQL expressions that evaluate to true or false.&nbsp; If you select &ldquo;Is True&rdquo; kind of Condition, then the expression specified in Condition Text box should be a valid </span><a href="https://msdn.microsoft.com/en-us/library/ms188074.aspx"><span style="font-family: Calibri; font-size: small;">Boolean T-SQL expression</span></a><o:p></o:p></p>
<p class="MsoListParagraphCxSpLast"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;">2.</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri; font-size: small;">"<b style="mso-bidi-font-weight: normal;">Has changed</b>" means if the expression specified in the condition box changes, then the execution stops. If you select &ldquo;Has Changed&rdquo;, then the expression needs to be a valid </span><a href="https://msdn.microsoft.com/en-us/library/ms190286.aspx"><span style="font-family: Calibri; font-size: small;">T-SQL expression</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> that evaluates to a single data value<o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;<o:p><span style="font-family: Calibri; font-size: small;">&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/8664.444.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/8664.444.png" border="0" /></span></o:p></span></o:p> </p>
<p class="MsoNormal">&nbsp;</p>
</p>
<h1><span style="color: #365f91;"><span style="font-family: Cambria;">Expression Evaluation in Watch Window<o:p></o:p></span></span></h1>
<p class="MsoNormal"><span style="font-family: Calibri; font-size: small;">The Watch Window, Quick Watch, and Immediate Window can now evaluate any </span><a href="https://msdn.microsoft.com/en-us/library/ms190286.aspx"><span style="font-family: Calibri; font-size: small;">T-SQL expression</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> that results in a single data value. You can do arithmetic operations on variables, execute SQL sub-queries, watch a particular grid of a table and so on in the Watch/Immediate Window.</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span>&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/1464.666.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/1464.666.png" border="0" /></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Figure: Arithmetic Operations on variables in Watch Window<o:p></o:p></span></span></p>
<p><o:p></o:p></p>
<p>&nbsp;</p>
<p>&nbsp;<span style="font-size: small;"><span style="font-family: Calibri;"><o:p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/2656.777.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/2656.777.png" border="0" /></o:p></span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Figure: Watch Top most value of a column in a Table in Watch Window</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
<h1 style="margin: 24pt 0in 0pt;"><span style="color: #365f91;"><span style="font-family: Cambria;">DataTips<o:p></o:p></span></span></h1>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Datatips has been enhanced with the new Visual Studio 2010 shell, and we have also fixed the Datatips to work with StoredProcedure and Triggers debugging. Pinned Datatips is one such enhancement described below.</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="text-decoration: underline;"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span></b></p>
<p><b style="mso-bidi-font-weight: normal;"><span style="text-decoration: underline;"><span style="font-size: small;"><span style="font-family: Calibri;">
<p>Pinned DataTips</p>
</span></span></span></b></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The new &ldquo;DataTip pinning&rdquo; feature enables you to better see and track variable and expression values when in the debugger.&nbsp;To pin a datatip, simply hover over a variable or expression within the debugger to expose its DataTip and then click the &ldquo;pin&rdquo; button on it to make the DataTip always visible. One more advantage with pinned Datatips is that they are saved across debug sessions. This means that if you stop the debugger, make changes in your script and start debugging again, any Datatip pinned in the previous sessions will still be there.</span></span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/5504.888.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/5504.888.png" border="0" /></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal">Figure: Datatip when hover mouse over the var @manager_id</p>
<p>&nbsp;&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/3326.899.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/3326.899.png" border="0" /></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Figure: Pin DataTips to source code<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"></span></p>
<p class="MsoNormal"><b><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Cambria','serif'; COLOR: #365f91; FONT-SIZE: 14pt; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: accent1; mso-themeshade: 191"><o:p></o:p></span></b></p>
<h1 class="MsoNormal" style="MARGIN: 24pt 0in 0pt"><span style="color: #365f91;"><span style="font-family: Cambria;"></span></span></h1>
<h1 class="MsoNormal" style="MARGIN: 24pt 0in 0pt">
<p><span style="color: #365f91;"><span style="font-family: Cambria;"></span></span></p>
<p><span style="color: #365f91;"><span style="font-family: Cambria;">Debug SQL Server 2005 instances from Denali SSMS </span></span></p>
</h1>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Till now, we supported debugging SQL 2008 and above servers from SSMS. But sometimes customers have old SQL 2005&nbsp;instances which need to be debugged. The only way to do that currently is to use Visual Studio. To help with this, we have enabled debugging support for 2005 servers as well from SSMS.<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">From SQL11 SSMS, you can simply connect to SQL Server 2005 and avail all the debugging functionalities on 2005 servers. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Note: The 2005 server must have SQL Server 2005 <b style="mso-bidi-font-weight: normal">SP2</b> installed. Otherwise debugging will fail.</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Before you install Denali CTP1 …</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/before-you-install-denali-ctp1</link>
      <pubDate>Fri, 03 Dec 2010 01:19:10 GMT</pubDate>
      <dc:creator><![CDATA[gcmouli]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2010/12/03/before-you-install-denali-ctp1/</guid>
      <description><![CDATA[&#160;  SQL PASS 2010 is over, and the first CTP of Denali is out. Lots of interesting stuff got...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>SQL PASS 2010 is over, and the first CTP of Denali is out. Lots of interesting stuff got announced and Demo’d at PASS. If you were part of the insider sessions, you probably got demos of some of the CTP1 features as well. </p>  <p>But, before you install CTP1 from that DVD in your hand, there is one pre-requisite you might want to satisfy, to make your life easier. This pre-requisite is required if you are on a machine which is earlier than Windows Server 2008 SP1 or Windows 7. We made the No-reboot package of the .Net framework as a mandatory requirement for SQL Server Installation. Yeah, we know, that this requires a one-time reboot (quite contrary to the name of the package), but this one investment will save time for later. The reboot is due to the patching of .NET 3.5 to .NET 3.5 SP1, which requires a reboot. If you regularly apply patches using Windows Update, this reboot would not be required.</p>  <p>Steps to achieve this with minimum hassle:</p>  <p>1. Go to <a href="https://support.microsoft.com/?kbid=958488">KB Article 958488</a> (for Windows Server 2008R2 / Windows 7) or <a href="https://support.microsoft.com/?kbid=956250">KB Article 956250</a> (for Windows Server 2008/Vista)</p>  <p>2. Download your architecture specific patch and run it</p>  <p>3. It will require one reboot</p>  <p>4. Start your SQL Server Denali CTP1 Installation</p>  <p>And one more thing, in the corner case scenario that you do not have PowerShell Installed, you may want to install that as well. SQL Server Denali CTP1 does not package that as part of the Install anymore. </p>  <p>Do play around with the CTP1 bits, and give us your feedback. We would love to hear back from you.</p>  <p>Go <a href="https://sqlserver-qa.net/blogs/sql2008/archive/2010/11/14/9715.aspx">here</a> and <a href="https://sqlblog.com/blogs/aaron_bertrand/archive/2010/11/09/sql-server-11-denali-setup-walk-through.aspx">here</a> for some user first installation experiences.</p>]]></content:encoded>
    </item>
    <item>
      <title>Cumulative Update 3 for SQL Server Management Studio 2008 R2: What’s in it for managing SQL Azure Databases?</title>
      <link>https://docs.microsoft.com/archive/blogs/managingsql/cumulative-update-3-for-sql-server-management-studio-2008-r2-whats-in-it-for-managing-sql-azure-databases</link>
      <pubDate>Fri, 03 Dec 2010 01:08:00 GMT</pubDate>
      <dc:creator><![CDATA[Sumesh Dutt Sharma]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/managingsql/2010/12/03/cumulative-update-3-for-sql-server-management-studio-2008-r2-whats-in-it-for-managing-sql-azure-databases/</guid>
      <description><![CDATA[Microsoft SQL Azure Database periodically adds new features to its existing service offerings. A few...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Microsoft SQL Azure Database periodically adds new features to its existing service offerings. A few months back, via the Service Update 2 and Service Update 3, the following features were made available to users of SQL Azure Databases:</span></span></span></p>
<ol>
<li>
<div class="MsoNormal"><span lang="EN-IN"><span style="font-family: Calibri; font-size: small;">&ldquo;ALTER DATABASE MODIFY NAME&rdquo; T-SQL. This now allows users to change the names of their database hosted in SQL Azure. (More details can be found </span><a href="https://msdn.microsoft.com/en-us/library/ff394109.aspx"><span style="font-family: Calibri; color: #0000ff; font-size: small;">here</span></a><span style="font-size: small;"><span style="font-family: Calibri;"><span class="MsoHyperlink"><span style="text-decoration: underline;"><span style="color: #0000ff;">)</span></span></span>.</span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><span style="font-family: Calibri; font-size: small;">Support for the Hierarchyid, Geometry and Geography data types(More details can be found </span><a href="https://msdn.microsoft.com/en-us/library/ee336233.aspx"><span style="font-family: Calibri; color: #0000ff; font-size: small;">here</span></a><span style="font-size: small;"><span style="font-family: Calibri;"><span class="MsoHyperlink"><span style="text-decoration: underline;"><span style="color: #0000ff;">)</span></span></span>.</span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><span style="font-family: Calibri; font-size: small;">Creation of spatial index (CREATE SPATIAL INDEX) (More details can be found </span><a href="https://msdn.microsoft.com/en-us/library/ff759530.aspx"><span style="font-family: Calibri; color: #0000ff; font-size: small;">here</span></a><span style="font-size: small;"><span style="font-family: Calibri;"><span class="MsoHyperlink"><span style="text-decoration: underline;"><span style="color: #0000ff;">).</span></span></span></span></span></span></div>
</li>
</ol>
<p class="MsoNormal"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"><span class="MsoHyperlink"><span style="text-decoration: underline;"><span style="color: #0000ff;"></span></span></span></span></span></span><span lang="EN-IN"><span style="font-family: Calibri; font-size: small;">In order to enable users to work with these features when connected to SQL Azure, SQL Server Management Studio 2008 R2 was updated via the </span><a href="https://support.microsoft.com/kb/2261464"><span style="font-family: Calibri; color: #0000ff; font-size: small;">Cumulative Update 3 (CU3)</span></a><span style="font-size: small;"><span style="font-family: Calibri;">. The list of SSMS enhancements that happened for SQL Azure in SSMS 2008 R2 CU3 is as follows (please note that these capabilities are already present in SSMS 2008 R2 for users connected to their on-premise database servers):</span></span></span></p>
<p class="MsoNormal"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span></p>
<p class="MsoNormal"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></span></p>
<p class="MsoListParagraphCxSpFirst"><i style="mso-bidi-font-style: normal"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">1.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></i><i style="mso-bidi-font-style: normal"><span style="text-decoration: underline;"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Database Rename support in Object Explorer (OE).<o:p></o:p></span></span></span></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">You can now rename a SQL Azure Database from OE itself. Steps for achieving the purpose are:<o:p></o:p></span></span></span></p>
<ol>
<li>
<div class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Connect to &ldquo;master&rdquo; database on SQL Azure.</span></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Expand the &ldquo;Databases&rdquo; node in OE.</span></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Select required database node.</span></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Either press &ldquo;F2&rdquo; or right click on the node and select &ldquo;Rename&rdquo; from the context menu.</span></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">When the database node text has become editable, type the new name of the database and press &ldquo;Enter&rdquo;.</span></span></span></div>
</li>
</ol>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span></span><span lang="EN-IN"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/62/51/6712.SSMS-CU3-Updates_PboraFeedback.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-62-51/6712.SSMS_2D00_CU3_2D00_Updates_5F00_PboraFeedback.png" border="0" /></span></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle"><i style="mso-bidi-font-style: normal"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;"></span></span></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><i style="mso-bidi-font-style: normal"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">2.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></i><i style="mso-bidi-font-style: normal"><span style="text-decoration: underline;"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Tables having columns with Spatial data types (Geometry, Geography) and Hierarchyid data type can now be scripted for SQL Azure database using SSMS. <o:p></o:p></span></span></span></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Before CU3 of SSMS 2008 R2, SSMS throws exception when we script a table, having columns with these data types, for SQL Azure database. We have fixed this issue in CU3 by adding support of these data types for SQL Azure database.</span></span></span><span lang="EN-IN"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<p class="MsoListParagraphCxSpMiddle"><i style="mso-bidi-font-style: normal"><span lang="EN-IN" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">3.</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></i><i style="mso-bidi-font-style: normal"><span style="text-decoration: underline;"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Spatial Index support in SSMS for SQL Azure.<o:p></o:p></span></span></span></span></i></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: Calibri;">Spatial Index scripting support for SQL Azure is also added as part of CU3 for SSMS 2008 R2.</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;"><b style="mso-bidi-font-weight: normal"><span lang="EN-IN">Note:</span></b></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;"><span lang="EN-IN"><em><span style="text-decoration: underline;">One part of Spatial Index support that we have not addressed yet is the creation of Spatial Index for SQL Azure from SSMS.</span></em> We have plans to address this by adding a new template to the </span></span></span><a href="https://msdn.microsoft.com/en-us/library/ms179334.aspx"><span style="mso-comment-continuation: 1"><span lang="EN-IN"><span style="font-family: Calibri; color: #0000ff; font-size: small;">Template Explorer</span></span></span></a><span style="mso-comment-continuation: 1"><span lang="EN-IN"><span style="font-family: Calibri; font-size: small;"> for creating Spatial Index on a table in SQL Azure database. But that will happen in a Public CU release only. Till then, in case you find this useful, you can add the given template to the </span></span></span><a href="https://msdn.microsoft.com/en-us/library/ms179334.aspx"><span style="mso-comment-continuation: 1"><span lang="EN-IN"><span style="font-family: Calibri; color: #0000ff; font-size: small;">Template Explorer</span></span></span></a><span style="font-family: Calibri;"><span style="mso-comment-continuation: 1"><span lang="EN-IN"><span style="font-size: small;"> in your SSMS 2008 R2<span style="font-family: courier new,courier;">.</span></span></span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-family: Calibri;"><span style="mso-comment-continuation: 1"><span lang="EN-IN"><span style="font-size: small;"><span style="font-family: courier new,courier;"></span></span></span></span></span><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;">-- ====================================================</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">-- </span></span></span><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;">Create Spatial Index template for SQL Azure Database</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">-- ====================================================</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">CREATE SPATIAL INDEX &lt;index_name, sysname, spatial_index&gt;</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">ON &lt;schema_name, sysname, dbo&gt;.&lt;table_name, sysname, spatial_table&gt;</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">(</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">&lt;column_name, sysname, geometry_col&gt;</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">)</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">USING&nbsp; &lt;grid_tessellation, identifier, GEOMETRY_GRID&gt;</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">WITH</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">(</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">BOUNDING_BOX = (</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">&lt;x_min, float, 0&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">&lt;y_min, float, 0&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">&lt;x_max, float, 100&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">&lt;y_max, float, 100&gt;),</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">GRIDS =(</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">LEVEL_1 = &lt;level_1_density, identifier, HIGH&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">LEVEL_2 = &lt;level_2_density, identifier, LOW&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">LEVEL_3 = &lt;level_3_density, identifier, MEDIUM&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">LEVEL_4 = &lt;level_4_density, identifier, MEDIUM&gt;),</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">CELLS_PER_OBJECT = &lt;cells_per_object, int, 10&gt;,</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">DROP_EXISTING = OFF</span></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="color: #000000;"></span><span style="color: #000000;">)</span></span></span></p>]]></content:encoded>
    </item>
  </channel>
</rss>