<?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>SharePoint Memory Dump</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/taj/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/taj/feed.xml</link>
    <description>My Services Delivery and Management experiences, specially in Microsoft Collaboration Products</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:31:10 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Guidance on modifying pre-defined content types</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/guidance-on-modifying-pre-defined-content-types</link>
      <pubDate>Sat, 11 Aug 2012 08:27:24 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2012/08/11/guidance-on-modifying-pre-defined-content-types/</guid>
      <description><![CDATA[I recently worked with some of the best services guys inside Microsoft to develop this whitepaper on...]]></description>
      <content:encoded><![CDATA[<p>I recently worked with some of the best services guys inside Microsoft to develop this whitepaper on guidance around modifying pre-defined content types. We saw lack of such guidance and some customers facing issues because of going down wrong path. Please go through it and understand approaches to achieve the same functionality.</p>
<p>Here is the link: <a href="https://go.microsoft.com/fwlink/p/?LinkId=260923">https://go.microsoft.com/fwlink/p/?LinkId=260923</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Visual Studio Unit Tests and Code Coverage</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/sharepoint-visual-studio-unit-tests-and-code-coverage</link>
      <pubDate>Sat, 17 Sep 2011 13:04:00 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2011/09/17/sharepoint-visual-studio-unit-tests-and-code-coverage/</guid>
      <description><![CDATA[I spent almost 10 hours yesterday to figure out how to run SharePoint unit tests using VS 2010 and...]]></description>
      <content:encoded><![CDATA[<p>I spent almost 10 hours yesterday to figure out how to run SharePoint unit tests using VS 2010 and how to get code coverage reports. There is nothing new which I have invented in this process but I felt this information is right now scattered . I'm putting down the complete process here so that others don't struggle while implementing this.</p>
<p>As most of you have seen by now that Visual Studio has added capability to execute unit test cases for SharePoint 2010. The details of how it can be achieved are available in this nice video: <a href="https://channel9.msdn.com/Blogs/adebruyn/Visual-Studio-SP1-and-SharePoint-2010-Unit-Test">https://channel9.msdn.com/Blogs/adebruyn/Visual-Studio-SP1-and-SharePoint-2010-Unit-Test</a></p>
<p>Summary of steps:</p>
<ol>
<li>Install Visual Studio 2010 Service Pack 1. <strong>You can only write Unit Tests for SharePoint in VS after installing SP1</strong></li>
<li>Create a new C# unit test project</li>
<li>In Project Properties change Application -&gt;Target Framework to 3.5 and Build -&gt; Platform Target to x64</li>
<li>In Test - Edit Test Settings - local testsettings - Hosts tab : change run tests setting to "Run in 64 bit process on 64 bit machine"</li>
</ol>
<p>Making these settings changes helps us to run the 64-bit SharePoint code in unit tests created using VS 2010 SP1. Visual Studio 2010 SP1 enables the IntelliTrace debugging technology on 64-bit Microsoft SharePoint solutions.</p>
<p>Once you have written the unit test cases, next thing is to see how much code coverage we are getting by running these unit test cases.&nbsp; Enabling Data Adapters is not supported with tests that target .Net Framework 3.5 in Visual Studio. Therefore code coverage data adapter will not work from VS as SharePoint projects target .NET 3.5. Details available at VS Test team blog: <a href="https://blogs.msdn.com/b/vstsqualitytools/archive/2010/12/19/how-to-re-target-unit-tests-to-net-framework-3-5-in-vs-2010-sp1.aspx">https://blogs.msdn.com/b/vstsqualitytools/archive/2010/12/19/how-to-re-target-unit-tests-to-net-framework-3-5-in-vs-2010-sp1.aspx</a></p>
<p><strong>The only solution is to run the tests and coverage from command line tools</strong>. This involves instrumenting the libraries for which code coverage has to be checked. The details of this process has been nicely documented at <a href="https://blogs.microsoft.co.il/blogs/royrose/archive/2011/08/30/manually-configure-and-run-code-coverage.aspx">https://blogs.microsoft.co.il/blogs/royrose/archive/2011/08/30/manually-configure-and-run-code-coverage.aspx</a></p>
<p>I'm summarizing the steps here. <strong>Ensure you run 64 bit versions of these utilities</strong>. This is something which took me some time to figure out. These are available at&nbsp; <strong>&lt;VSDir&gt;\ Team Tools\Performance Tools \x64</strong></p>
<ul>
<li>Instrument the dll's containing code to be tested and for code coverage has to be calculated. You will have to re-sign your assembly if original assembly is signed</li>
</ul>
<pre class="scroll"><code class="cplusplus">VSInstr.exe "AssemlbyFile.dll" /coverage</code></pre>
<p></p>
<ul>
<li>
<div class="scroll"><code class="cplusplus"></code>Start the VSPerfCmd tool to start logging the coverage</div>
</li>
</ul>
<pre class="scroll"><code class="cplusplus">vsperfcmd /start:coverage /output=Custoomfileforcoverage.codecoverage</code></pre>
<ul>
<li>
<div class="scroll">&nbsp;Run the automated tests using MSTest utility</div>
</li>
</ul>
<pre class="scroll"><code class="cplusplus">mstest /testcontainer:UnitTests.dll</code></pre>
<ul>
<li>Stop logging coverage</li>
</ul>
<pre class="scroll"><code class="cplusplus">vsperfcmd /shutdown</code></pre>
<p>Now you can open this coverage file in VS and analyze the code coverage results.</p>
<p style="text-align: left;" class="scroll">Happy Coding !</p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2010 Best Practices on TechNet</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/sharepoint-2010-best-practices-on-technet</link>
      <pubDate>Sun, 26 Jun 2011 09:12:58 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2011/06/26/sharepoint-2010-best-practices-on-technet/</guid>
      <description><![CDATA[There are series of best practices articles published on TechNet. I got the privilege of working...]]></description>
      <content:encoded><![CDATA[<p>There are series of best practices articles published on TechNet. I got the privilege of working with some very smart folks while developing these. These articles talk about things under each workload which will help you to design and operate a enterprise level SharePoint environment. Please take time to go through them at <a href="https://technet.microsoft.com/en-us/library/cc850682.aspx">https://technet.microsoft.com/en-us/library/cc850682.aspx</a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Import-SPMetadataWebServicePartitionData error in multi server deployment</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/import-spmetadatawebservicepartitiondata-error-in-multi-server-deployment</link>
      <pubDate>Sat, 19 Mar 2011 23:56:00 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2011/03/19/import-spmetadatawebservicepartitiondata-error-in-multi-server-deployment/</guid>
      <description><![CDATA[Before reading this post I would request you to first read my following posts for moving TermStore...]]></description>
      <content:encoded><![CDATA[<p>Before reading this post I would request you to first read my following posts for moving TermStore from one environment to another and support available in Windows PowerShell commands. </p>
<p><a href="https://blogs.msdn.com/b/taj/archive/2011/01/11/site-collection-backup-restore-and-managed-metadata.aspx">https://blogs.msdn.com/b/taj/archive/2011/01/11/site-collection-backup-restore-and-managed-metadata.aspx</a></p>
<p><a href="https://blogs.msdn.com/b/taj/archive/2010/10/20/import-spmetadatawebservicepartitiondata-and-bulk-load-problem.aspx">https://blogs.msdn.com/b/taj/archive/2010/10/20/import-spmetadatawebservicepartitiondata-and-bulk-load-problem.aspx</a></p>
<p>When I posted that blog post, I did all my tests on a single server deployment. Recently my colleague was trying to run the same commands on a multi-server deployment. He was using following command to import TermStore:</p>
<p><strong>Import-SPMetadataWebServicePartitionData -Identity $mms2.Id -ServiceProxy $mms2proxy -path "C:\ mmsdev.bak" -OverwriteExisting;</strong></p>
<p>He got following error message on running the command:</p>
<p><code><span style="background-color: #ffffff;"><span style="color: #ff0000;">Import-SPMetadataWebServicePartitionData : Cannot bulk load because the file "C:\99f6833d2bac4c53af26b816afca1d55\ECMGroup.dat" could not be opened. <br /><br />Operating system error code 3(failed to retrieve text for this error. Reason: 15105).<br /><br />At line:1 char:41<br /><br />+ Import-SPMetadataWebServicePartitionData &lt;&lt;&lt;&lt;&nbsp; -Identity $mms2.Id -ServiceProxy $mms2proxy -path "C:\Veda\mmsdev.bak" -OverwriteExisting;<br />+ CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : InvalidData: (Microsoft.Share...cePartitionData:&nbsp;&nbsp; SPCmdletImportM...cePartitionData) [Import-SPMetadataWebServicePartitionData], FaultException'1 </span></span></code><code><span style="background-color: #ffffff;"><span style="color: #ff0000;">+ FullyQualifiedErrorId : Microsoft.SharePoint.Taxonomy.Cmdlet.SPCmdletImp&nbsp;&nbsp; ortMetadataWebServicePartitionData<br /></span></span></code></p>
<p>Operating system error code 3 means system is not able to locate the file at path mentioned in command. This command uses BULK UPLOAD functionality and it's not able to find the file at specified path when using BULK Upload from SQL Server database. I reached this conclusion as it was working fine on single box deployment. Thereafter I specified network path to the TermStore backup file instead of local path. I started getting a new error (Operating system error code 5). This is an error code for access denied which meant that code is not allowed to access the file location. Since BULK Upload command is run by SQL Server Service account, I tried to give access to that account. I kept getting the same error message even if I gave Everyone group access to the share. I'm still not able to find the reason why it's giving access denied.</p>
<p>To work around, instead of keeping file on Application Server, I kept it on SQL Server box and used the network path to the file in command. You have to give read write access to this share as PowerShell creates temporary files while importing TermStore. After this the command worked as expected and we were able to import TermStore succesfully. I hope this post will help you save some time. </p>]]></content:encoded>
    </item>
    <item>
      <title>Site Collection BackupRestore and Managed Metadata</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/site-collection-backuprestore-and-managed-metadata</link>
      <pubDate>Tue, 11 Jan 2011 07:05:00 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2011/01/11/site-collection-backuprestore-and-managed-metadata/</guid>
      <description><![CDATA[I recently saw an email on internal DL about things not working if you backup and restore site...]]></description>
      <content:encoded><![CDATA[<p>I recently saw an email on internal DL about things not working if you backup and restore site collection from one Farm to another. The team was using Managed Metadata in some list columns. These are scenarios where you want to move content from one environment to another and ensure your termsets are also available in target environment.In this post I will brief you about what needs to be done to make it work and reasons for same.</p>
<p>Wherever you restore the site collection, Managed Metadata Service should be available. Managed metadata columns consult the MMS service whenever we interact with data stored in these columns. If MMS is not there things can break and show unexpected behavior. The easiest option to make things work is to restore the termstore from source farm to target farm. </p>
<p>You can use <strong>Export-SPMetadataWebServicePartitionData</strong> to export term store from source application.<a href="https://technet.microsoft.com/en-us/library/ff607847.aspx">https://technet.microsoft.com/en-us/library/ff607847.aspx</a>. You can import&nbsp; the same in target MMS using <strong>Import-SPMetadataWebServicePartitionData</strong> <a href="https://technet.microsoft.com/en-us/library/ff607667.aspx">https://technet.microsoft.com/en-us/library/ff607667.aspx</a>. By using this technique the term store is available on the target. The sspId used internally by the Termstore and referred by Managed metadata columns in list is retained. </p>
<p>Go ahead and test restored site collection in target Farm. You should find things working properly. In my random testing everything seems to be working fine. Please report issues, if you see any.</p>
<p><span style="background-color: #ffffff;"><span style="color: #ff0000;">UPDATE</span></span></p>
<p>Hari requested me to put a sample as the API name is&nbsp;misleading. The&nbsp;service doesn't need to be partitioned for things to work. It works for un-partitioned &nbsp;service application also. Service Application Proxy ID has to be passed for <strong>-Identity</strong> parameter. Example given below and hope it helps.</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><code class="cplusplus">
<pre class="scroll"><code class="mysql">#Export
<br />$mmsApp = &ldquo;4a867ce5-d9ee-4051-8e73-c5eca4158bcd&rdquo;; #this sets the exporting MMS ID
<br />$mmsproxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "ExportTaxonomyProxyName"};
<br />Export-SPMetadataWebServicePartitionData -Identity $mmsApp -ServiceProxy $mmsproxy -Path \\location\exportfile.bak;
<br />
<br />#Import 
<br />$mms2 = "d045d3ce-e947-4465-b039-0dfbbe24fb22"   #this sets the importing MMS ID 
<br />$mms2proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "ImportTaxonomyProxyName"};
<br />Import-SPMetadataWebServicePartitionData -Identity $mms2 -ServiceProxy $mms2proxy -path \\location\exportfile.bak -OverwriteExisting;
<br /></code></pre>
<p><span style="font-family: Arial;"></span><br /></p>
</code></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Technet Radio SharePoint BCS Throttling</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/technet-radio-sharepoint-bcs-throttling</link>
      <pubDate>Fri, 19 Nov 2010 22:37:44 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2010/11/19/technet-radio-sharepoint-bcs-throttling/</guid>
      <description><![CDATA[I did a radio show last month with SharePoint Product Manager Bill Baer which went live yesterday....]]></description>
      <content:encoded><![CDATA[<p>I did a radio show last month with SharePoint Product Manager Bill Baer which went live yesterday. We talked about how BCS throtlling is different from large list throttling and what things one should be careful about. You can get the podcast at below given link. Hope you enjoy the show.</p>
<p><a href="https://technet.microsoft.com/en-us/edge/technet-radio-throttling-limits-and-business-connectivity-services-in-sharepoint-2010.aspx">https://technet.microsoft.com/en-us/edge/technet-radio-throttling-limits-and-business-connectivity-services-in-sharepoint-2010.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Import-SPMetadatawebservicePartitionData and BULK LOAD Problem</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/import-spmetadatawebservicepartitiondata-and-bulk-load-problem</link>
      <pubDate>Tue, 19 Oct 2010 21:35:35 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2010/10/19/import-spmetadatawebservicepartitiondata-and-bulk-load-problem/</guid>
      <description><![CDATA[Today I was doing some research and troubleshooting issue while using Content Deployment used with...]]></description>
      <content:encoded><![CDATA[<p>Today I was doing some research and troubleshooting issue while using Content Deployment used with Managed Metadata Service(MMS). I was moving MMS Term Store from Author to Production Farm using the Windows PowerShell command <strong>Import-SPMetadatawebservicePartitionData. </strong>This commands takes the export file generated by using <strong>Import-SPMetadatawebservicePartitionData </strong>and imports the term sets in the target MMS. </p>
<p>The commands failed with the following error message &ldquo;<strong><em><span style="color: #ff0000;">You do not have permission to use the bulk load statement</span>&rdquo;. </em></strong>This was kind of surprising as I was logged in as box admin who is SQL admin also. I was having the appropriate permissions and it should have just worked. There are few guys who used it and it just worked fine for them. The only difference in my environment is that I run my services with separate accounts and I try to mimic things as close to production with respect to security. I checked the error message and cause seem to be somewhere in SQL perms. I checked the permissions of my MMS service account and it was not having the SQL server BULK ADMIN role assigned to it. When I added my service account to this server role, things started working fine. Looks like the command uses bulk insert SQL command to import the terms in SQL DB. Since the service account was not having these permissions, it failed. I checked with a dev and this seems to be a known issue.&nbsp; </p>
<p>So the workaround is to add service account to BULK ADMIN role when you want to import the term store and remove it after operation is complete. </p>]]></content:encoded>
    </item>
    <item>
      <title>Issues with SharePoint 2010 Central Administration running on SSL</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/issues-with-sharepoint-2010-central-administration-running-on-ssl</link>
      <pubDate>Wed, 15 Sep 2010 09:26:00 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2010/09/15/issues-with-sharepoint-2010-central-administration-running-on-ssl/</guid>
      <description><![CDATA[I configured my Farm with Central Administration running on SSL port 443. There are couple of issues...]]></description>
      <content:encoded><![CDATA[<p>I configured my Farm with Central Administration running on SSL port 443. There are couple of issues I have run into with this configuration and want to share with community. My SP build version is <strong>14.0.4762.1000</strong>. </p>
<ol>
<li><strong>Problem while running User Profile Import Job </strong>- This was the first issue I ran into and had to go back and manually edit the url connection for my central administration site. Todd Klindt has blogged about the problem and solution in his blog at&nbsp; <a href="https://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=223">https://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=223</a>. This solution works but I'm not sure if it's the supported way to make things work. I haven't seen this as a bug in any KB. Since User Profile SA is a fragile thing, I always feel nervous while making such changes :-). But it has been working fine for me till now. <span style="color: #ff0000;">Check with Microsoft support and get it verified.</span></li>
<li><strong>Setting up Content Deployment Job Paths</strong> - This was little tough to figure out. I was getting error while setting up job path using the traget CA running on SSL. This was the configuration of my farm 
<ul>
<li>It's a single box SharePoint Server 2010 install</li>
<li>My Central Admin is running on SSL, port 443. I have used IIS to generate self SSL and used it for the CA. CA is opening fine with no certificate security error message </li>
<li>My authoring site is at <a href="https://author/">https://author</a> and prod site is <a href="https://prod/">https://prod</a></li>
</ul>
<p>&nbsp;When creating the Content Deployment path, after specifying the source CA url and credentials to connect, while testing the connection I get the following error message - <span style="color: #ff0000;">'The remote Web service request failed with this message : 'The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.'. </span></p>
</li>
</ol>
<p style="padding-left: 30px;"><span style="color: #ff0000;"></span>The error indicates that there is some problem with cert. I checked that Issuer cert is there in the&nbsp;local trusted CA store. Since CA is opening fine, it means system is trusting the cert properly and there should not be an issue.&nbsp;When I added the Issuer cert to SharePoint trust relationship by using <strong>Manage Trust</strong> options under <strong>Security </strong>in CA, everything started working fine and the connection to the CA was succesfully setup. This was surprising as I always thought Manage trust option was to setup cross farm trust but in this case even in single Farm setup I had to do that. </p>
<p style="padding-left: 30px;">I searched on the web and found a KB which was similar to my problem and seem to be the culprit for this issue also <a href="https://support.microsoft.com/kb/982982">https://support.microsoft.com/kb/982982</a>. I din't try the first option in KB which I believe should also work. </p>]]></content:encoded>
    </item>
    <item>
      <title>Using SharePoint Tagging features with Content Deployment deployed production sites</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/using-sharepoint-tagging-features-with-content-deployment-deployed-production-sites</link>
      <pubDate>Mon, 13 Sep 2010 04:31:00 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2010/09/13/using-sharepoint-tagging-features-with-content-deployment-deployed-production-sites/</guid>
      <description><![CDATA[In this scenario we will evaluate implementing tags and note boards on a site which is target of...]]></description>
      <content:encoded><![CDATA[<h1 style="MARGIN: auto 0cm"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: black; FONT-SIZE: 12pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">In this scenario we will evaluate implementing tags and note boards on a site which is target of content deployment, i.e. where content is deployed by content deployment job. </span></h1>
<h1 style="margin: 0cm 0cm 10pt;"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 18pt">Problem Statement<o:p></o:p></span></h1>
<p><u1:p></u1:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Many organizations have requirement to implement publishing environment such that production site is not edited by the end user. They want to implement staging-production pattern in which first the content is created on staging environment, reviewed and approved. Once approved, this content is moved to production environment where it&rsquo;s visible to end users in read only mode. Neither content creators, nor viewers should be able to change content. Content Deployment feature in SharePoint 2010 helps achieve this objective of moving content from authoring site to production site.<u2:p></u2:p></span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Times New Roman','serif'; COLOR: black; FONT-SIZE: 12pt"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">One of the new features in SharePoint in social space is tagging and note boards. This let people tag the pages, collaborate and discuss about content of sites. One of the requirements of Content Deployment is that you can&rsquo;t change the target of deployment. It&rsquo;s only 1-way. Content can only be created on authoring site and no edits should be done on production. If you try to change content on production, it can lead to unexpected results including deployment job failure. The problem now becomes is how to let people tag on production site without any issues. </span>I tried to mpelmet this setup and analyze the behavior of SharePoint2010. <span style="COLOR: black"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="COLOR: red; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="color: #ff0000;">*This is not a formal guidance from SharePoint team or Microsoft Corporation*.&nbsp;I personally feel its a valid implementation and you should check with Microsoft Support before using it in production.</span><span style="COLOR: black"><o:p></o:p></span></span></span></p>
<h1 style="margin: 0cm 0cm 10pt;"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 18pt">Pre-requisites<o:p></o:p></span><u2:p></u2:p></h1>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Following is the setup of my SharePoint farm</span></span></span></p>
<ol>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: Arial"><span style="mso-list: Ignore"><span style="FONT: 7pt 'Times New Roman'">&nbsp;</span></span></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Central Administration running on </span></span><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt"><a href="https://moss02.taj.local/"><span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt"><span style="color: #0000ff;">https://moss02.taj.local</span></span></a></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">. It&rsquo;s on SSL</span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Single Farm with both the authoring and production farm</span></span></span></div>
<ol>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Authoring Farm Url: <span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt"><a href="https://author/"><span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt"><span style="color: #0000ff;">https://author</span></span></a></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">. Publishing Site template</span></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Production Farm Url: <span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt"><a href="https://prod/"><span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt"><span style="color: #0000ff;">https://prod</span></span></a></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">. Empty Site, no template applied to the site</span></span></span></span></div>
</li>
</ol></li>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">User profile Application configured and profile synchronization working</span></span></span></div>
<ol>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Profile Database: <b style="mso-bidi-font-weight: normal;">UserProfile</b></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Profile Sync Database: <b style="mso-bidi-font-weight: normal;">UserProfileSync</b></span></span></span></div>
</li>
<li>
<div class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">Social Database: <b style="mso-bidi-font-weight: normal;">SocialTagging</b></span></span></span></span>&nbsp;</div>
</li>
</ol></li>
</ol>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: Arial"><span style="mso-list: Ignore"></span></span></p>
<h1 style="MARGIN: 0cm 0cm 10pt"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 18pt">Setting up Content Deployment<o:p></o:p></span></h1>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">You can follow the steps provided in following link to set up the content deployment<u2:p></u2:p></span><span style="COLOR: black"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="COLOR: black"><a href="https://technet.microsoft.com/en-us/library/cc627268.aspx"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-family: Calibri; font-size: small;">https://technet.microsoft.com/en-us/library/cc627268.aspx</span></span></a></span><span style="COLOR: black"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></span></p>
<h1 style="MARGIN: 0cm 0cm 10pt"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 18pt">Setting up User Profile Application and Synchronization<u2:p></u2:p><o:p></o:p></span></h1>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">There is information available on TechNet to do this but it&rsquo;s little spread across and confusing to understand. My fellow MCM Spence Harbar has done good job of documenting the whole process. I will recommend you use his article to setup profile synchronization </span><span style="COLOR: black"><a href="https://www.harbar.net/articles/sp2010ups.aspx"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">https://www.harbar.net/articles/sp2010ups.aspx</span></a><o:p></o:p></span><u2:p></u2:p></span></span></p>
<h1 style="MARGIN: 0cm 0cm 10pt"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 18pt">Read-Only Behavior<u2:p></u2:p><o:p></o:p></span></h1>
<p class="MsoNormal"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-size: small;"><span style="font-family: Calibri;">In this step we tested how tagging doesn&rsquo;t affect the content database. Tags go into social database and should not affect the DB. <o:p></o:p></span></span></span><span style="COLOR: black"><a href="https://author/"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-family: Calibri; color: #0000ff; font-size: small;">https://author</span></span></a></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"> to </span><span style="COLOR: black"><a href="https://prod/"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="color: #0000ff;">https://prod</span></span></a></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"> , go to the prod database in management studio. Go to the content database for your prod site. In my case it is WSS_CONTENT_PROD. <u2:p></u2:p></span>Go to database properties, options, State and set the Database read-only property equal to true.<u2:p></u2:p></span></span></p>
<p class="MsoNormal"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-family: Calibri; font-size: small;">After running the content deployment successfully once from </span></span></p>
<p>&nbsp;</p>
<p class="MsoNormal"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-family: Calibri; font-size: small;">What this will do is mark your content database as read only. Now one can&rsquo;t add/edit content to the database. One of the new improvements in SharePoint is that it can make out when the database is in read-only mode and accordingly trim the UI so that actions only show options for read-only operations. This is cool stuff and when we refresh the </span><a href="https://prod/"><span style="font-family: Calibri; color: #0000ff; font-size: small;">https://prod</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> <span style="mso-spacerun: yes">&nbsp;</span>site, we will see the UI trimmed. Now our content deployment should be working fine and the site is in read only mode. <u2:p></u2:p></span></span></span><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Times New Roman','serif'; COLOR: black; FONT-SIZE: 12pt"><o:p></o:p></span></p>
<p>&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">The next thing to check is the tagging control on top of page. Interesting thing is that it still shows up enabled. That means you can tag stuff on the page. This control connects to the Social DB and figures out that since it&rsquo;s not in edit mode, it should be shown as enabled. Try to tag this page with a tag. I was successfully able to tag content. <b style="mso-bidi-font-weight: normal">This demonstrates that there is no write operation performed on the content database when you use this feature.</b> <u2:p></u2:p></span><span style="COLOR: black"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">The next thing to test was how content deployment will behave after this tagging on page. To test this, I made changes on the page in my </span><span style="COLOR: black"><a href="https://author/"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="color: #0000ff;">https://author</span></span></a></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"> site. Approved the page and published it. <u2:p></u2:p></span><span style="COLOR: black"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">I went back to my WSS_CONTENT_PROD database and marked read-only attribute to false. This will again light up the edit actions on the </span><span style="COLOR: black"><a href="https://prod/"><span style="mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="color: #0000ff;">https://prod</span></span></a></span><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"> site<u2:p></u2:p></span><span style="COLOR: black"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">After this I ran content deployment job to move the updated page to production. The job ran successfully. I ran multiple cycles with edits and this thing worked well. <u2:p></u2:p></span><span style="COLOR: black"><o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-size: small;"><span style="font-family: Calibri;">Now if we go back to the production site, all works well and I can see the edits done in author on my prod site. And yes I was able to see my tags also on the page on top. <span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-size: small;"><span style="font-family: Calibri;">This thing really works like a charm. <u2:p></u2:p></span></span></span>These are same tags which were created after first run of content deployment. </span></span></span></p>
<p class="MsoNormal"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-size: small;"><span style="font-family: Calibri;"><o:p></o:p></span></span></span><span style="font-family: Calibri; font-size: small;">Test in your environment and give your comments. </span><span style="font-family: Calibri; font-size: small;">I hope SharePoint team will officially support it.</span></p>
<p class="MsoNormal"><span style="COLOR: black; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"><span style="font-size: small;"><span style="font-family: Calibri;"><u2:p></u2:p></span></span></span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Searching External Systems using SharePoint 2010 Business Connectivity Services (BCS) within throttling limits</title>
      <link>https://docs.microsoft.com/archive/blogs/taj/searching-external-systems-using-sharepoint-2010-business-connectivity-services-bcs-within-throttling-limits</link>
      <pubDate>Tue, 24 Aug 2010 08:14:00 GMT</pubDate>
      <dc:creator><![CDATA[tajeshwar singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/taj/2010/08/24/searching-external-systems-using-sharepoint-2010-business-connectivity-services-bcs-within-throttling-limits/</guid>
      <description><![CDATA[Searching External Systems using SharePoint 2010 Business Connectivity Services (BCS) within...]]></description>
      <content:encoded><![CDATA[<h1>Searching External Systems using SharePoint 2010 Business Connectivity Services (BCS) within throttling limits</h1>
<p><strong>Summary:</strong> Learn how to use SharePoint Server 2010 Business Connectivity Services (BCS) feature to search content in external system when the number of records in system are more than throttling limits defined for the system.</p>
<h2>Introduction</h2>
<p>Searching external systems with large number of records is a complex problem because on one end the BCS is trying to avoid bringing down the external system/SharePoint by limiting number of records which can be fetched but on other end it will not be able to crawl the system due to throttling. In this walkthrough, you will see you how properties can be configured on metadatamodel to chunk the calls for crawling the external system. The article will also show the changes in requirements for implementing search for External Systems.</p>
<p><strong>Applies to:</strong> Microsoft SharePoint Server 2010</p>
<p><strong>Contents</strong></p>
<p>Overview</p>
<p>Search In BCS</p>
<p>Setup Server Environment</p>
<p>Setup BCS in Farm</p>
<p>Create Metadata Model</p>
<p>Setup Crawl</p>
<p>Test Search</p>
<p>Conclusion</p>
<p>Additional Resources</p>
<h2>Overview</h2>
<p>In this scenario, AdventureWorks database hosted in SQL Server 2008 is used as an External System containing the records to be crawled. A metadata model file is created with IdEnumerator and a SpecificFinder stereotypes implemented to retrieve the data for an External Content Type(ECT). Properties are configured in model to help BCS get the ids for external items to be crawled in batches while staying under the throttling limits. </p>
<h2>Search In BCS</h2>
<p>Changes have been made in the search functionality in BCS and IdEnumerator is no a requirement for implementing the crawl. BCS uses one of the following stereotypes for crawling the external system:</p>
<ul>
<li><strong>Finder Method</strong>: If this stereotype is implemented and it has <strong>RootFinder</strong> property applied to it, then search will use it to crawl the external source. </li>
</ul>
<p>&lt;Method Name="ReadList"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Properties&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;Property Name="RootFinder" Type="System.String"&gt;&lt;/Property&gt;&lt;/Properties&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameters&gt;</p>
<p>...</p>
<ul>
<li><strong>IdEnumerator</strong>:If no Finder method is found with RootFinder property applied to it, IdEnumerator is used to crawl the system. </li>
</ul>
<p>In addition to above, SpecificFinder stereotype is used if the columns returned by it are more than what's returned by Finder/IdEnumerator.</p>
<p>There are other properties shown in Table 1 which affect the behavior of search on UI and how data gets crawled</p>
<table cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr>
<td width="168" valign="top">
<p>Property</p>
</td>
<td width="423" valign="top">
<p>Descritpion</p>
</td>
</tr>
<tr>
<td width="168" valign="top">
<p>ShowInSearchUI</p>
</td>
<td width="423" valign="top">
<p>This property is applied on Model Metadata object. This specifies that a LobSystemInstance in the model file should be displayed in the search user interface. For e.g. dispalyed on page for defining the Line of Business search content source</p>
</td>
</tr>
<tr>
<td width="168" valign="top">
<p>RootFinder</p>
<p>&nbsp;</p>
</td>
<td width="423" valign="top">
<p>Specifies the Finder method that will be used to enumerate the items to crawl</p>
</td>
</tr>
<tr>
<td width="168" valign="top">
<p>UseClientCachingForSearch</p>
<p>&nbsp;</p>
</td>
<td width="423" valign="top">
<p>If set on the Finder or Idenumerator method instance, will cache the values returned and not call the SpecificFinder unless there is a cache miss.</p>
</td>
</tr>
</tbody>
</table>
<p>Table 1-Metadata model properties for search</p>
<h2>Set up Server Environment</h2>
<h3>Software Requirements</h3>
<p>The list of software required to run this scenario is as follows:</p>
<ul>
<li>1. Microsoft SQL Server 2008 x64</li>
<li>2. Microsoft SharePoint Server 2010</li>
</ul>
<h3>Create AdventureWorks Database</h3>
<p>AdventureWorks sample database available on Codeplex is used in this scenario to represent the external system.</p>
<h2>Setup BCS in Farm</h2>
<p>First step in this scenario is to setup the BCS infrastructure in the farm. It inlcudes setting up BCS Service Application and Profile pages for the ECT.</p>
<p>Follow the following steps to setup the infrastructure:</p>
<ul>
<li>1. Start the Business Data Connectivity Service in the farm</li>
<li>2. Create a Business Data Connectivity Service Application </li>
<li>3. Create a Web Application <a href="https://bcs.contoso.com/">https://bcs.contoso.com</a> and create a site collection on root site</li>
<li>4. Create a subsite with url <a href="https://bcs.contoso.com/profile">https://bcs.contoso.com/profile</a>. This will be used for hosting the profile pages for all ECTs. </li>
<li>5. Give rights on the AdventureWorks database and table <strong>Sales.SalesOrderHeader </strong>to the account used for accessing ECT</li>
</ul>
<h2>Create Metadata Model </h2>
<p>SharePoint Designer 2010 (SPD) provides functionality to create ECTs and save or export them in a metadata model file but the IdEnumerator stereotypes cannot be modelled using SPD. Therefore this stereotype has to be modelled manually. To make things easier and get the basic metadata ready, it's&nbsp; recommended to create the initial metadata model using SPD. This can be further edited using any xml editor/notepad to add the IdEnumerator or other methods types (which cannot be created using SPD).</p>
<p>In this scenario we will be using IdEnumerator to crawl the system. After getting the list of Id's identifying the external items, search will call SpecificFinder on each Id returned by the enumerator to index the content as the fields in SpecificFinder are more than what gets returned by IdEnuemrator.</p>
<p><strong>LastIdSeen</strong> filter type is used to batch the calls to external system. LastIdSeen filter is used by SharePoint Search to pass the identifier of the last external item seen as part of call to IdEnumerator method. It passes this as the filter value while calling the IdEnumerator in a loop. The external system should implement the logic to return the records under the throttling limits by using the filter value as the point from where next set of items needs to be fetched. In this scenario, we are using the value <strong>43658</strong> as default value for filter. This gets used when IdEnumerator is called for first time and Search has yet not seen any Id(LastSeenId).</p>
<p>Snippet below shows method definition for a LastIdSeen Filter.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;FilterDescriptors&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;FilterDescriptor Type="LastId" Name="LastIdSeen"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Properties&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property Name="UsedForDisambiguation" Type="System.Boolean"&gt;false&lt;/Property&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property Name="IsDefault" Type="System.Boolean"&gt;false&lt;/Property&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property Name="CaseSensitive" Type="System.Boolean"&gt;false&lt;/Property&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Properties&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/FilterDescriptor&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/FilterDescriptors&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameters&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Parameter Direction="In" Name="@SalesOrderId"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TypeDescriptor TypeName="System.Int32" IdentifierName="SalesOrderID" AssociatedFilter="LastIdSeen" Name="SalesOrderID"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DefaultValues&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DefaultValue MethodInstanceName="SalesOrderHeaderReadIds" Type="System.Int32"&gt;43658&lt;/DefaultValue&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/DefaultValues&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/TypeDescriptor&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Parameter&gt;</p>
<p>Metadata snippet below shows IdEnumerator method. If no default value is passed, this gets the top 1000 rows else gets the records starting from the LastIdSeen parameter(SalesOrderId) passed to this method.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;Method IsStatic="false" Name="SalesOrderHeaderReadListIds"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Properties&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;Text&lt;/Property&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property Name="RdbCommandText" Type="System.String"&gt;IF (@SalesOrderId &amp;lt; 43658) BEGIN</p>
<p>SELECT TOP 1000 SalesOrderId, ModifiedDate FROM [Sales].[SalesOrderHeader] ORDER BY SalesOrderId ASC </p>
<p>END</p>
<p>ELSE</p>
<p>SELECT SalesOrderId, ModifiedDate FROM [Sales].[SalesOrderHeader] WHERE SalesOrderId BETWEEN @SalesOrderId AND (@SalesOrderId+1000) ORDER BY [SalesOrderId] ASC</p>
<p>&nbsp;&lt;/Property&gt;</p>
<p><em>File containing the metadata is available at the end of article as an attachment.</em></p>
<h2>Setup Crawl</h2>
<p>Once ECT has been defined, external data can be crawled and the items can be indexed by SharePoint search. Pre-requisites to enable crawling are:</p>
<ul>
<li>ECT created with Finder or IdEnumerator defined</li>
<li>A SpecificFinder defined if the fields to be crawled are not available as part of Finder/Enumerator</li>
<li>SharePoint Search Service started and Service Application created for search</li>
<li>Content Source of type <strong>Line of Business Data</strong> defined with AdventureWorksForSearch model as external data source to be crawled</li>
<li>Profile page created for <strong>SalesOrder</strong> ECT at <a href="https://bcs.contoso.com/profile">https://bcs.contoso.com/profile</a></li>
<li>Ensure that the crawl account has rights to connect to AdventureWorks database and read permissions for content of site <a href="https://bcs.contoso.com/profile">https://bcs.contoso.com/profile</a></li>
</ul>
<h2>Test Search</h2>
<p>Once all of above is done, start a full crawl of the content source and ensure that content is crawled succesfully by verifying into the crawl log. </p>
<p>Search for any SalesOrder which is in present in the system document and verify if the results are returned for that. In our example, search for term "SO43659" and you will get one result from external system as shown. The result item url is the profile page used to show the ECT profile. On selecting the link in search result, system navigates you to the profile page and show details of the external item. </p>
<h2>Conclusion</h2>
<p>BCS Search has been simplified and now items can be easily crawled by using SpecificFinder stereotypes. In addition using throttling features, governance can be imposed to ensure that external system and SharePoint doesn't get overhauled by users requests.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/55/29/8831.AdventureworksForSearchModel.xml" original-url="https://blogs.msdn.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-55-29/8831.AdventureworksForSearchModel.xml" title="Model File">Model File</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>