<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'SSMS' and 'CTEs'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SSMS,CTEs&amp;orTags=0</link><description>Search results matching tags 'SSMS' and 'CTEs'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Connect Digest : 2011-08-08</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2011/08/08/connect-digest-2011-07-05.aspx</link><pubDate>Mon, 08 Aug 2011 12:30:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:36489</guid><dc:creator>AaronBertrand</dc:creator><description>&lt;p&gt;This week I reported a few bugs - one with sp_helptext, one with Activity Monitor in Management Studio, and one in the new sys.dm_server_services DMV.&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/683234/sp-helptext-treats-non-system-objects-as-system-objects" title="http://connect.microsoft.com/SQLServer/feedback/details/683234/sp-helptext-treats-non-system-objects-as-system-objects" target="_blank"&gt;#683234 : sp_helptext treats non-system objects as system objects&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;For this one there is at least one weird case where running sp_helptext against on object prefixed with dbo ignores the dbo and tries to retrieve text for its sys counterpart (in this case, you can't run sp_helptext against a procedure you can create and execute called dbo.sp_hexadecimal; instead, you get error 15197, because the system thinks your object is a system object). I &lt;a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2011/08/06/sys-sp-hexadecimal-a-quasi-system-object.aspx" title="http://sqlblog.com/blogs/aaron_bertrand/archive/2011/08/06/sys-sp-hexadecimal-a-quasi-system-object.aspx" target="_blank"&gt;blogged about this situation&lt;/a&gt; over the weekend as well.&lt;br&gt; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/683031/ssms-activity-monitor-execution-plan-implies-that-sqlplan-file-is-saved" title="http://connect.microsoft.com/SQLServer/feedback/details/683031/ssms-activity-monitor-execution-plan-implies-that-sqlplan-file-is-saved" target="_blank"&gt;#683031 : SSMS : Activity Monitor, execution plan implies that .sqlplan file is saved&lt;/a&gt; &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;In testing the new Management Studio add-in we created for &lt;a href="http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp" title="http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp" target="_blank"&gt;SQL Sentry Plan Explorer&lt;/a&gt;, it was discovered that the file handle SSMS associates with execution plans launched from within Activity Monitor is not valid - it says the file is in %USERPROFILE%\Documents, but the file is not actually there until you manually save it. &lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/683275/sys-dm-server-services-has-two-rows-for-sql-server-agent-in-ctp3" title="http://connect.microsoft.com/SQLServer/feedback/details/683275/sys-dm-server-services-has-two-rows-for-sql-server-agent-in-ctp3" target="_blank"&gt;#683275 : sys.dm_server_services has two rows for SQL Server Agent in CTP3&lt;/a&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt; This DMV is new in Denali and 2008 R2 SP1 (though the bug I've reported seems to only affect Denali CTP3). I had previously reported that &lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/664557/sys-dm-server-services-last-startup-time-is-always-null-for-sql-agent" title="https://connect.microsoft.com/SQLServer/feedback/details/664557/sys-dm-server-services-last-startup-time-is-always-null-for-sql-agent" target="_blank"&gt;last_startup_time is always NULL for SQL Server Agent&lt;/a&gt;; that bug does affect both 2008 R2 and Denali.&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br&gt;Then I have five others I'd like to highlight, only because they crossed my path for one reason or another. In no particular order:&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/668871/tsql-stop-the-stuff-function-treating-null-as-the-empty-string" title="http://connect.microsoft.com/SQLServer/feedback/details/668871/tsql-stop-the-stuff-function-treating-null-as-the-empty-string" target="_blank"&gt;#668871 : TSQL - Stop the STUFF function treating NULL as the empty string&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;While they've confirmed that they are not going to fix STUFF, the key here is to put in some comments suggesting why the ANSI-standard OVERLAY function would be a useful addition to T-SQL. (Or maybe create a new suggestion.)&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/256665/extend-object-definition-to-include-more-objects" title="http://connect.microsoft.com/SQLServer/feedback/details/256665/extend-object-definition-to-include-more-objects" target="_blank"&gt;#256665 : Extend OBJECT_DEFINITION to include more objects&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;I would love to be able to call a function that gives me the script for that object - be it CREATE TABLE, CREATE VIEW, CREATE SYNONYM, what have you. Currently this function only works for "script" objects, such as functions, procedures and views. If you've ever tried to manually/programmatically re-create the type of script Management Studio spits out for a table, you should have no problems voting this one up.&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/640236/the-optimizer-should-considering-materialising-results-of-ctes" title="http://connect.microsoft.com/SQLServer/feedback/details/640236/the-optimizer-should-considering-materialising-results-of-ctes" target="_blank"&gt;#640236 : The optimizer should considering materialising results of CTEs&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;Erland filed this one that properly suggests that a CTE *should* be able to be materialized by the optimizer only once, instead of up to (and sometimes more than) as many times as it is referenced in the rest of the query. For some insight into how much performance can be affected when the CTE is materialized only once, see &lt;a href="http://sqlcat.com/msdnmirror/archive/2011/04/28/optimize-recursive-cte-query.aspx" title="http://sqlcat.com/msdnmirror/archive/2011/04/28/optimize-recursive-cte-query.aspx" target="_blank"&gt;this blog post from SQLCAT&lt;/a&gt;. For more viewpoints on the problem, see &lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/218968/" title="http://connect.microsoft.com/SQLServer/feedback/details/218968/" target="_blank"&gt;Connect #218968&lt;/a&gt;, &lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/377976/non-recursive-ctes-inefficiently-recompute-self-joins-and-row-number-instead-of-using-worktable" title="http://connect.microsoft.com/SQLServer/feedback/details/377976/non-recursive-ctes-inefficiently-recompute-self-joins-and-row-number-instead-of-using-worktable" target="_blank"&gt;Connect #377976&lt;/a&gt; and &lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/483181/additional-query-hint-option-materialize-cte-name-n" title="http://connect.microsoft.com/SQLServer/feedback/details/483181/additional-query-hint-option-materialize-cte-name-n" target="_blank"&gt;Connect #483181&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/640863/please-allow-creation-of-temporary-views" title="http://connect.microsoft.com/SQLServer/feedback/details/640863/please-allow-creation-of-temporary-views" target="_blank"&gt;#640863 : Please allow creation of temporary views&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;I don't think I would have very many uses for this one, but I can see the use case that is being presented. The workaround suggested by Microsoft (to create a view in tempdb, then drop it) is no more useful than creating a permanent view in the current database and then dropping it - the problem is that only one user could do this at a time. &lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/127219/create-or-replace" title="http://connect.microsoft.com/SQLServer/feedback/details/127219/create-or-replace" target="_blank"&gt;#127219 : CREATE OR REPLACE&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;I've probably talked about this one before. Because of the complications with checking for existence of a stored procedure, for example, and the fact that a CREATE or ALTER PROCEDURE command must be the only statement in a batch, it is very difficult to determine the correct action without building the procedure body in dynamic SQL. On top of those, if you just blindly DROP and CREATE each time, you lose permissions, dependencies, etc. So the ability to say CREATE OR REPLACE or CREATE OR ALTER instead of performing these checks and executing one script or the other, would be welcome indeed.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;</description></item><item><title>Connect Digest : 2011-05-23</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2011/05/23/connect-digest-2011-05-23.aspx</link><pubDate>Mon, 23 May 2011 12:28:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:35396</guid><dc:creator>AaronBertrand</dc:creator><description>&lt;p&gt;Next week I'll be up in Alaska for &lt;a href="http://www.sqlcruise.com/" title="http://www.sqlcruise.com/" target="_blank"&gt;SQL Cruise&lt;/a&gt;, so I'll be skipping at least one digest. This week I gathered a few engine-related issues, two involving what the engine does while an index is being created. The most important one, though, at least IMHO, is the first one listed, involving a hashing algorithm fix that is in SQL Server 2008 R2 - but with no plans to fix it for SQL Server 2008. I wonder if someone should file a separate, 2008-specific bug?&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/458091/change-lock-resource-hashing-algorithm-to-reduce-likelihood-of-collisions" title="http://connect.microsoft.com/SQLServer/feedback/details/458091/change-lock-resource-hashing-algorithm-to-reduce-likelihood-of-collisions" target="_blank"&gt;#458091 : Change Lock Resource Hashing Algorithm to Reduce Likelihood of Collisions&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/581056/indexed-view-creation-causes-queries-on-the-base-table-to-block" title="http://connect.microsoft.com/SQLServer/feedback/details/581056/indexed-view-creation-causes-queries-on-the-base-table-to-block" target="_blank"&gt;#581056 : Indexed view creation causes queries on the base table to block&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/478568/ssms-gets-blocked-and-locks-up-during-index-creation" title="http://connect.microsoft.com/SQLServer/feedback/details/478568/ssms-gets-blocked-and-locks-up-during-index-creation" target="_blank"&gt;#478568 : SSMS Gets Blocked and Locks Up During Index Creation&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/125549/poor-execution-plan-with-cte" title="http://connect.microsoft.com/SQLServer/feedback/details/125549/poor-execution-plan-with-cte" target="_blank"&gt;#125549 : Poor execution plan with CTE&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;And finally, this issue ("&lt;span&gt;high degrees of parallelism cause incorrect results to be observed more frequently" according to &lt;a href="http://support.microsoft.com/kb/981502" title="http://support.microsoft.com/kb/981502" target="_blank"&gt;KB #981502&lt;/a&gt;)&lt;/span&gt; is one that has been fixed in SP1 for SQL Server 2008 R2, but it requires a trace flag (in Denali, it will be on by default, so you won't need a trace flag). I'm not telling you about this so you'll go and vote for this issue, but rather just to make you aware of it. The KB article states that the fix is in various CUs for 2005, 2008 and 2008 R2, but as the Connect item implies, the fix may not actually work in all cases, and requires the trace flag for others.&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/642790" title="http://connect.microsoft.com/SQLServer/feedback/details/642790" target="_blank"&gt;#642790 : Parallel query plan returns different results every time that you run the query&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Connect Digest : 2010-02-16</title><link>http://sqlblog.com/blogs/aaron_bertrand/archive/2010/02/15/connect-digest-2010-02-16.aspx</link><pubDate>Tue, 16 Feb 2010 04:52:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22327</guid><dc:creator>AaronBertrand</dc:creator><description>&lt;p&gt;Simon Sabin has asked for better usability in the SQL Server Agent log viewer: specifically, to allow you to get to job / step properties directly from the history viewer. &lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/531889/allow-access-to-job-details-from-the-log-file-viewer-to-improve-manageability" title="https://connect.microsoft.com/SQLServer/feedback/details/531889/allow-access-to-job-details-from-the-log-file-viewer-to-improve-manageability" target="_blank"&gt;#531889 : Allow
 access to job details from the log file viewer to improve manageability&lt;/a&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br&gt;Guru Itzik Ben-Gan asks for a more powerful QUALIFY() option to allow filtering on the same kind of query elements that you can currently achieve with ROW_NUMBER().&amp;nbsp; This one already has over 80 votes! &lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/532474/qualify-request-for-a-new-filtering-clause" title="https://connect.microsoft.com/SQLServer/feedback/details/532474/qualify-request-for-a-new-filtering-clause" target="_blank"&gt;#532474 : QUALIFY
 - Request for a New Filtering Clause&lt;/a&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br&gt;Chris Howarth points out even more problems with the custom connection coloring feature in SSMS (all the more reason to use Mladen's &lt;a href="http://www.ssmstoolspack.com" title="http://www.ssmstoolspack.com" target="_blank"&gt;SSMSToolsPack&lt;/a&gt;).&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/533667/ssms-connection-colouring-not-implemented-sensibly" title="https://connect.microsoft.com/SQLServer/feedback/details/533667/ssms-connection-colouring-not-implemented-sensibly" target="_blank"&gt;#533667 : SSMS Connection Colouring Not Implemented Sensibly&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;br&gt;MauriD asks for the ability to include a NOEXPAND hint for CTEs.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/533766/make-noexpand-hint-usable-also-with-cte" title="https://connect.microsoft.com/SQLServer/feedback/details/533766/make-noexpand-hint-usable-also-with-cte" target="_blank"&gt;#533766 : Make NOEXPAND hint usable also with CTE&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;br&gt;And last but not least, user "7gartner" asks for the ability to store tempdb on local storage in a cluster.&lt;br&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/details/532759/support-local-disk-location-for-tempdb-in-failover-cluster-installation" title="https://connect.microsoft.com/SQLServer/feedback/details/532759/support-local-disk-location-for-tempdb-in-failover-cluster-installation" target="_blank"&gt;#532759 : Support
 local disk location for TempDB in failover cluster installation&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;When
 I read the title of this item, I thought, "oh, he must expect that 
someone with an active batch that is using a #temp table, might be able 
to continue working in the event of a failover."&amp;nbsp; Which doesn't make 
sense because their connection would be severed anyway.&amp;nbsp; But when I 
investigated the body, the want is much more simple than that: allow a 
system to avoid having to use shared storage for TempDB.&amp;nbsp; This means not
 using valuable SAN space and using local hard disks, possibly SSDs.&amp;nbsp; A 
light bulb went on when I saw that, because I know that outfitting SAN-based SSDs 
at reasonable capacity can get quite expensive, but an SSD dumped into a 
server - at a capacity to handle the typical sizing requirements of 
TempDB disks - would be a much more affordable option.&amp;nbsp; (Paul Nielsen just wrote about &lt;a href="http://sqlblog.com/blogs/paul_nielsen/archive/2010/02/15/tempdb-in-ram.aspx" title="http://sqlblog.com/blogs/paul_nielsen/archive/2010/02/15/tempdb-in-ram.aspx" target="_blank"&gt;using tempdb in RAM&lt;/a&gt;, and the implication on using this in a cluster resonates again.)&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>