Tag Archives: bcs

Creating a BCS Content Source using PowerShell

You can use the following command to create a content source to crawl a Business Data Connectivity Service (BDCS).

$lobSystems = @("LOBSystemName1","LOBSystemNameInstance1") 
New-SPEnterpriseSearchCrawlContentSource -name "My Content Source Name" -searchapplication "My Search Service Application Name" -Type Business -LOBSystemSet $lobSystems

If the LOBSystemName is not correct the content source gets created but the model you want to search is not checked.

To figure out the right values for the LOBSystemName and LOBSystemInstanceName look no further than the bdcm file in your solution. Open the .bdcm file in notepad and use the Name attributes of the LobSystem and LobSystemInstance nodes.

 


					

Tips for working with BCS and FAST Search

When building a FAST search solution to crawl external entities through BCS it can get very frustrating if you deploy a change and it doesn’t get updated in all the right places.

After much trial and error I have come up with the following checklist to keep your sanity.

Rule #1: If you change the BCS model manually (i.e. using a text editor instead of Visual Studio) you need to change the Version attribute of the Entity node in the entity that you make the change in. If you don’t do this any update you make will not be applied. This can lead to very confusing behaviour since the change you made will get reflected at some point down the line.

Apart from that here goes the checklist

  1. Delete the BCS content source
  2. Restart the SharePoint Server Search service
  3. Using Task Manager kill off any mssdmn.exe that are running
  4. Deploy your updated solution
  5. Recreate the content source and run a full crawl.

If your working in a multi-farm scenario where the Search service is in a different farm to that of the BCS service then you need to do steps #2 & #3 in the server running the Search crawls. This is important because any assemblies that you have built for the entity are dynamically copied into that server and loaded into Server Search & mssdmn.exe.

If you don’t do steps #2 & #3 Search will end up using the older version of your assembly and not the one that you just deployed.