<?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>MPSIT SQL Team</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mpsit_sql_team/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mpsit_sql_team/feed.xml</link>
    <description>Blog by SQL enthusiasts in MPSIT Team at Microsoft Corporation, Redmond</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:10:39 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Team Foundation Server (TFS) Replication Error for TFS Attachments</title>
      <link>https://docs.microsoft.com/archive/blogs/mpsit_sql_team/team-foundation-server-tfs-replication-error-for-tfs-attachments</link>
      <pubDate>Tue, 13 Nov 2012 13:58:32 GMT</pubDate>
      <dc:creator><![CDATA[MPSIT SQL Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mpsit_sql_team/2012/11/13/team-foundation-server-tfs-replication-error-for-tfs-attachments/</guid>
      <description><![CDATA[Problem: 
Team Foundation Server (TFS) failure attempting to addan attachment when replication is...]]></description>
      <content:encoded><![CDATA[<p><strong>Problem: </strong></p>
<p>Team Foundation Server (TFS) failure attempting to add<br />an attachment when replication is configured on&nbsp;SQL&nbsp;backend&nbsp;version 2008 R2 (RTM) - 10.50.1617.0 (X64) Enterprise<br />Edition (64-bit) on Windows NT 6.1 &lt;X64&gt; (Build 7601: Service Pack 1).</p>
<p><strong>Error: </strong></p>
<p><span style="color: #ff0000;">TF237082: The attachment could not be uploaded. Verify that</span><br /><span style="color: #ff0000;">you have a network connection and that Team Foundation Server is available.</span></p>
<p><span style="color: #ff0000;">HTTP Status</span><br /><span style="color: #ff0000;">Code: InternalServerError &ndash; TFS51334: An unknown Web service error occurred:</span><br /><span style="color: #ff0000;">UPDATETEXT is not allowed because the column is being processed by a concurrent</span><br /><span style="color: #ff0000;">snapshot or is being replicated to a non-SQL Server Subscriber or Published in</span><br /><span style="color: #ff0000;">a publication allowing Data Transformation Services (DTS) or tracked by Change</span><br /><span style="color: #ff0000;">Data Capture.</span></p>
<p><strong>Solution: </strong></p>
<p><strong>Step 1</strong> ~ Root cause could be size restriction on the publisher. Verify that SQL replication<br />is configured to handle the maximum text size.</p>
<p><span style="color: #339966;">exec sp_configure 'max text repl size', '2147483647'</span></p>
<p><span style="color: #339966;">reconfigure with</span><br /><span style="color: #339966;">override</span></p>
<p>&nbsp;</p>
<p><strong>Step 2</strong> ~ Root cause could be incorrect or lingering old metadata<br />related to the publication. In our case there was a column in the TFS database<br />having a value &gt; 0 in its &nbsp;is_non_sql_subscribed<br />column.</p>
<p>&nbsp;</p>
<p><span style="color: #339966;">select @@SERVERNAME</span></p>
<p><span style="color: #339966;">go</span></p>
<p><span style="color: #339966;">use Tfs_Production</span></p>
<p><span style="color: #339966;">go</span></p>
<p><span style="color: #339966;">select object_id,name,</span><br /><span style="color: #339966;">is_dts_replicated, is_column_set, is_merge_published,</span><br /><span style="color: #339966;">is_non_sql_subscribed, is_replicated, *</span></p>
<p><span style="color: #339966;">from sys.columns</span></p>
<p><span style="color: #339966;">where object_id</span><br /><span style="color: #339966;">= object_id('Attachments')</span></p>
<p><span style="color: #339966;">go</span></p>
<p><span style="color: #339966;">select id,</span><br /><span style="color: #339966;">name, colstat</span></p>
<p><span style="color: #339966;">from sys.syscolumns</span></p>
<p><span style="color: #339966;">where id =</span><br /><span style="color: #339966;">object_id('Attachments')</span></p>
<p><span style="color: #339966;">go</span></p>
<p><span style="color: #339966;"></span></p>
<p>&nbsp;The quickest way we could reset the column and resolve the problem was to do the following:</p>
<p>1)&nbsp;&nbsp;&nbsp;Drop all replication components (subscriptions, publications, and distribution database)</p>
<p>2)&nbsp;&nbsp;&nbsp;&nbsp;Setup a small dummy database having 1 small table with a primary key</p>
<p>3)&nbsp;&nbsp;&nbsp;Recreate distribution and publish the dummy table</p>
<p>4)&nbsp;&nbsp;&nbsp;Create subscription for dummy publication</p>
<p>5)&nbsp;&nbsp;&nbsp;Create publication on TFS database</p>
<p>6)&nbsp;&nbsp;&nbsp;Create TFS subscription</p>
<p>7)&nbsp;&nbsp;&nbsp;Drop dummy subscription, publication, and database</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL 2012 Split Partition Problem: A severe error occurred on the current command. The results, if any, should be discarded</title>
      <link>https://docs.microsoft.com/archive/blogs/mpsit_sql_team/sql-2012-split-partition-problem-a-severe-error-occurred-on-the-current-command-the-results-if-any-should-be-discarded</link>
      <pubDate>Thu, 08 Nov 2012 08:18:00 GMT</pubDate>
      <dc:creator><![CDATA[MPSIT SQL Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mpsit_sql_team/2012/11/08/sql-2012-split-partition-problem-a-severe-error-occurred-on-the-current-command-the-results-if-any-should-be-discarded/</guid>
      <description><![CDATA[We encountered an unexpected exception error a few months ago while attempting to split an existing...]]></description>
      <content:encoded><![CDATA[<p>We encountered an unexpected exception error a few months ago while attempting to split an existing partition for the next future month. All the details of the problem, troubleshooting, and solution&nbsp;are provided below, but the root cause was determined to be a product limitation in SQL2K12 RTM to which a CU is expected by Feb/Mar 2013. Until then the only workaround is to drop all existing partitioned indexed views, split the partition, then re-create the partitioned indexed views.</p>
<p><br /><strong>Problem:</strong> 16TB data warehouse partitioned by month on a datetime key column. A new file group, data file, and partition are created for the next month during the last week of the current month. This monthly maintenance task occurred without issue while DW was hosted in SQL2K8 R2, however, it failed after the DW was migrated to a new server running SQL2K12 RTM. The FG and file created successfully and the NEXT USED command completed successfully. The exact failure point&nbsp;occured at&nbsp;the following command:</p>
<p style="padding-left: 30px;">ALTER PARTITION FUNCTION&nbsp;PFEventDateTimeRangeByMonth ()</p>
<p style="padding-left: 30px;">SPLIT RANGE (N'2012-10-01T00:00:00.000')&nbsp;</p>
<p>The command would run for several seconds before generating a stack dump in the SQL log and returning the error "A severe error occurred on the current command. The results, if any, should be discarded" in the results pane.</p>
<p>&nbsp;</p>
<p><strong>Troubleshooting: </strong>Attempted all of the following to try and resolve ~</p>
<p>0) Verified that all other monthly partition operations in 11 other DW's on the same server were working just fine.</p>
<p>1) Tried splitting the partition using a variety of date ranges, file group, and data file configurations.</p>
<p>2) Thought maybe a recent partition switch/merge operation for old data might have precipitated the problem. Restored the last 2K8 full backup before the switch/merge had occurred&nbsp;and&nbsp;tried split again unsuccessfully&nbsp;(BTW - <em>customers loved having the DW offline for&nbsp;6 days while I restored the db and reloaded the delta data for no reason)</em></p>
<p>3) Restored same full backup to Test server and ran full CHECKDB. It surprisingly finished within a faster than anticipated 48 hours, but no corruption was found.</p>
<p>4) Escalated the issue to&nbsp;the product team where they confirmed a product limitation that would need to be resolved via CU. In the meantime, they worked diligently to find a workaround.</p>
<p>&nbsp;</p>
<p><strong>Resolution:</strong>&nbsp;The product team&nbsp;explained that the bug was related to how the indexed view metadata was unexpectedly blocking the split operation. Not sure that means the metadata was corrupted, but rather it did not change to an expected state as part of the&nbsp;split operation.&nbsp;We see similar issues from time-to-time with&nbsp;trans. replication publication metadata&nbsp;in SQL2K8. &nbsp;</p>
<p>The workaround identified required us to drop the 2 indexed views, split the partition, then rebuild the indexed views. Not knowing for sure when the CU would be released, we opted to&nbsp;limit risk&nbsp;by creating new partitions for the next 8 months. When recreating the last indexed view (and the largest one) the operation failed and returned the same severe error from the original issue, however, no stack dump or exception was generated in the SQL log. Because the production maintenance window was closing fast, I decided to reduce the number of records in the indexed view by 50% by adjusting the WHERE filter.&nbsp;We were fairly confident the new range would satisfy most business use case scenarios. Thankfully the 2nd attempt with the adjusted filter worked after a few hours build time.</p>
<p>- Jonathan Foster</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Welcome to our blog</title>
      <link>https://docs.microsoft.com/archive/blogs/mpsit_sql_team/welcome-to-our-blog</link>
      <pubDate>Tue, 09 Oct 2012 15:18:00 GMT</pubDate>
      <dc:creator><![CDATA[MPSIT SQL Team]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mpsit_sql_team/2012/10/09/welcome-to-our-blog/</guid>
      <description><![CDATA[Hello,
We are SQL enthusiasts in the MPSIT group within Microsoft IT. Though we are Microsoft...]]></description>
      <content:encoded><![CDATA[<p>Hello,</p>
<p>We are SQL enthusiasts in the MPSIT group within Microsoft IT. Though we are Microsoft employees, we are also faced with many of the same challenges as end users. What differentiates us is the availability of internal resources like SQL product teams, SQLCAT team, SQL internal discussion alias etc.,. Our purpose for this blog is to share our experience solving problems faced by enterprise operations personnel where documentation is insufficient or nonexistent.&nbsp; We want to help fill this unique knowledge gap in the SQL community to further advance SQL Server as the preferred database solution across the globe.</p>
<p>Please share your feedback and comments, we're listening!</p>
<p>Thanks,<br />MPSIT Operations - SQL Team</p>
<p><a href="https://i.s-microsoft.com/global/ImageStore/PublishingImages/logos/hp/logo-lg-1x.png"><img style="max-width: 550px;" border="0" alt="" src="https://i.s-microsoft.com/global/ImageStore/PublishingImages/logos/hp/logo-lg-1x.png" /></a></p>]]></content:encoded>
    </item>
  </channel>
</rss>