Vous êtes sur la page 1sur 10

Oracle to SharePoint Integration

Contents
Brief Description......................................................................................................... 2
System Requirements................................................................................................. 2
Linked server Integration............................................................................................ 2
SQL Server.............................................................................................................. 2
TNS and SQLNet...................................................................................................... 2
Create the linked server.......................................................................................... 3
Linked server to New SQL Database...........................................................................6
Create a new database and create a view..............................................................6
SQL to SharePoint List................................................................................................ 7
Create a Secure Store Service ID............................................................................ 7
Create an external list on SharePoint Designer.......................................................8

Brief Description
This article describes a no-code solution on how to create an external content type from Oracle. The
article will briefly describe the existing table in Oracle 11gR2, the SQL Linked connection and then
creating the Business Connectivity Service in SharePoint 2013 on-premises.

System Requirements
i) SharePoint 2013 with SP1 on a Windows 2012 server.
ii) SQL 2012 with SP1 on a Windows 2012 R2 server.
iii) Oracle 11g R2 on a Windows 2012 R2 server.

Linked server Integration


This section will primarily cover creating the new Linked Server to the Oracle
database on SQL, creating a new database with a custom view from the Linked
Server and finally creating the external list.

SQL Server
Setup the TNSName and the SQLNet files and add environment variables
In order to create a successful linked server on SQL you will need to have the TNSname and SQLNet
files updated or in some cases added or built. We will also check and confirm if the registry settings is
pointing to the correct ODBC client, add the environment variables and finally create the ODBC
connection.

TNS and SQLNet


It is best practice to first open your command prompt and run tnsping <Oracle Server name> to see
which client is being used. In this scenario we have both 32 and 64 bit Oracle client installed hence
after running tnsping oracle11gr2, below is the result.

The above screenshot shows several important settings. We see that the location of the SQLNet.ora
file's location, a 64-bit TNS ping utility is being used, we are currently using the client 2 oracle client
and that the connection was OK i.e. successful.
Go to the SQLNet.ora file location which is show above. In this case the file location is
C:or D:\app\administrator\product\11.2.0\client_1\network\admin and below is what I have.

Here we need to add the TNS entry and save it.

Create the linked server


This section covers the steps to add the oracle database as the linked server to your SQL database.
a) Open SQL Server Management Studio (SSMS) and connect to your SQL database instance. Go to
Server Objects>Linked Servers>Providers and confirm that you have OraOLEDB.ORACLE available
there. Below is a screenshot.

b) Right-click on OraOLEDB.Oracle and choose Properties. Enable Dynamic parameter and Allow
inprocess. Below is a screenshot.

c)

Right-click on linked server and select New Linked Server


Below is a screenshot of the General settings. You can give the linked server a name that
makes sense to you in this case I used SELFSERVICE.

d) Below is as screenshot of the Security settings. We are using the same service account.

e) Click Ok and confirm that your linked server has been setup. Once it has then go to the
server and confirm that you can see the tables and views. Below is a screenshot.

Linked server to New SQL Database


Create a new database and create a view
SharePoint Designer 2010 or 2013 does not give us the option to pick linked servers from SQL,
however, there is a workaround. Create a new database and in it create views to pull data from the
linked server. In this scenario we have created a new database called OracleIntegrationSelfservice.
Below is a screenshot.

Now, go back to the any table in the SELFSERVICE linked server, right-click on it. Go to Script Table as
> SELECT To> New Query Editor Window. Below is a screenshot.

Now go back to the OracleIntegrationSelfservice database that we just created, right-click on Views
and select New View.

You will receive an Add Table window as shown below, click Close.

Execute the query and confirm that you have received data from the Linked Server and save with the
proper name.

SQL to SharePoint List


This section involves adding a new secure store service (SSS) ID and then creating an external list
using SharePoint Designer 2013

Create a Secure Store Service ID


Go to SharePoint Central Administration>Application Management>Manage Service Applications and
click on Secure Store Service Application

Below are screenshots of the new ID oracleLinkedServer.

As shown above, oracleLinkedServer is the service account for the SSS ID hence goes to the SQL
server and gives this account access to the OracleIntegrationSelfservice database.

Create an external list on SharePoint Designer


a) Finally, go to SharePoint Designer>External Content Types and click on External Content Type

b) Give the content type a name that makes sense, in this scenario the name is . Next, click on
the link for External Systems as shown below

c) Click on the Add Connection button, and then select SQL Server as the data source type

d) You can now see the connection made to the OracleIntegrationSelfservice database as shown
below

e) Right-click on the SelfServiceOracledata view and select Create all Operations as shown below

f) Based on our requirement we need to select columns and finish.

g) Now you can go to any of your SharePoint site and select the External List app, give it a name
and select the external content type that was just created.
h) And finally you get to view the external list!

Vous aimerez peut-être aussi