Thursday, 23 October 2014

SharePoint 2013:BCS Connect To Oracle DB No Code

There are many posts describes how to connect to Oracle DB database using .NET assembly Type of BCS, it requires writing codes and install the Oracle Client or OLEDB on every App and WFE server.

I was going through the same road when it hits me , I can use Database Link to connect to the remote oracle table by installing OLEDB client on the SQL server only. Afterwards, I can easily create the BCS model by using SharePoint Designer.


  1. After creating the database link create a view to use it when creating the BCS let's name it MyTestView
  2. Open SharePoint Designers and connect to your site collection
  3. Click on create new External content type
  4. Name the external content type and click on the "Click here to discover external data sources and define operations" link
  5. Click on Add connection then Choose SQL server and click ok
  6. Enter the server details and database name
  7. Browse to the views and expand them you will see the view which we created (retrieve records from remote oracle DB)
  8. right click the view and generate both ReadItem and ReadList operations
  9. Make sure to map the identifier in both operations
  10. Save the External Content Type
  11. Create External List

Additional Information: 
In order to impersonate the user identity you need to create a secure store application and update the External Content type External System 

following this blog steps you can connect to remote oracle DB without writing a single line of Code.
Happy SharePointing

Wednesday, 8 October 2014

SharePoint 2013 Managed Properties not automatically created

According to TechNet article at http://technet.microsoft.com/en-us/library/jj613136(v=office.15).aspx SharePoint 2013 automatically generated crawled and managed properties given that the site column will have information stored and a full crawling has been completed successfully.

However, I encountered a case in which the Search service application failed to managed properties and create a invalid crawled properties. In my custom site columns definition elements.xml file I have a field called HTMLComments and the field schema was as below :

I notice that only crawled property has been created with a name HTMLCommentsOWS which not following the naming convention mentioned in the above link. as the field is HTML Field I expected to have automatically created crawled property named "ows_r_HTML_HTMLComments". I was clueless for a while and then I end up viewing the Schema for an OTB Field PublishingPageContent and it was as below


I notice that the SourceID  attribute is missing from my Field definition,I added the source Id attribute as below:


and run full crawling and I notice that the  crawling properties and managed properties has been created successfully.