How to: Adapt the Samples to Connect to Oracle and Other Databases

The Business Data Catalog can connect to and provide business data from the following databases:

  • Microsoft SQL Server

  • Oracle

  • OLE DB

  • ODBC

The AdventureWorks2000 sample explains the basic way to work with the Business Data Catalog to show business data from a SQL Server database. When you work with other databases such as Oracle, OLE DB, and ODBC you follow exactly the same steps, and we recommend that you start with the AdventureWorks 2000 sample metadata and adapt it for these systems. However, when you adapt the AdventureWorks metadata or write new metadata for these systems, you should remember the following things:

  • The wildcard character may differ in these systems. SQL Server uses the asterisk (*). In Oracle and other systems, the wildcard character is usually the percent sign (%). Determine the wildcard character used by your system and change it in the WildcardCharacter property of the <LobSystem> tag.

  • The Oracle SQL syntax requires you to specify parameters in your query by prefixing them with a colon (:) rather than the at sign (@). Be sure to set these correctly in the SQL statements in your metadata.

  • Oracle requires explicit user id and password parameters in the connection string, which means:

    • You have to set up an enterprise definition in SSO with the Oracle credentials.

    • Use AuthenticationMode of RdbCredentials.

    • Make sure the Microsoft SSO service is started on all farm servers and set to automatic startup.

    • You cannot use the "RdbConnection User ID" and "RdbConnection Password" properties, as these values are supplied by SSO. If you specify them, they are simply ignored. You must use SSO to supply the Oracle credentials.

    • SSO requires RPC connectivity between servers. Make sure the necessary ports (135, etc.) are open. You can use KB 167260 as a guide on how to verify RPC connectivity using the rpings.exe and rpingc.exe utilities which are in the Microsoft Windows 2003 Server resource kit.


This example shows you how to set the LobSystemInstance properties for an Oracle database that is connecting by using single sign-on (SSO). FEEDSTORE must match the TNS net service name. OracleDb must match the name of the enterprise application definition you set up in SSO.

<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
<LobSystem xmlns:xsi="" xsi:schemaLocation=" BDCMetadata.xsd" Type="Database" Version="" Name="Oracle" xmlns="">
  <Property Name="WildcardCharacter" Type="System.String">%</Property> 
<LobSystemInstance Name="Oracle Sys Instance">
  <Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode">RdbCredentials</Property> 
  <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider">Oracle</Property> 
  <Property Name="RdbConnection Data Source" Type="System.String">FEEDSTORE</Property> 
  <Property Name="RdbConnection Pooling" Type="System.String">false</Property> 
  <Property Name="SsoApplicationId" Type="System.String">OracleDb</Property> 
  <Property Name="WildcardCharacter" Type="System.String">%</Property> 
<Entity EstimatedInstanceCount="10000" Name="Employee">
  <Property Name="Title" Type="System.String">EName</Property> 
  <Identifier TypeName="System.String" Name="EmployeeName" /> 
<Method Name="EmployeeFinder">
  <Property Name="RdbCommandText" Type="System.String">SELECT * FROM EMP WHERE ENAME LIKE :Name ORDER BY EMPNO</Property> 
  <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property> 
  <FilterDescriptor Type="Wildcard" Name="EmployeeName" /> 
<Parameter Direction="In" Name=":Name">
<TypeDescriptor TypeName="System.String" IdentifierName="EmployeeName" AssociatedFilter="EmployeeName" Name="EmployeeName">
  <DefaultValue MethodInstanceName="IdEnumeratorInstance" Type="System.String">%</DefaultValue> 
<Parameter Direction="Return" Name="Employees">
<TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="Employees">
<TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="Employee">
  <TypeDescriptor TypeName="System.Decimal" Name="EmpNO" /> 
  <TypeDescriptor TypeName="System.String" IdentifierName="EmployeeName" Name="EName" /> 
  <TypeDescriptor TypeName="System.String" Name="JOB" /> 
  <TypeDescriptor TypeName="System.String" Name="MGR" /> 
  <TypeDescriptor TypeName="System.String" Name="Job" /> 
  <TypeDescriptor TypeName="System.DateTime" Name="HireDate" /> 
  <TypeDescriptor TypeName="System.Decimal" Name="SAL" /> 
  <TypeDescriptor TypeName="System.Decimal" Name="COMM" /> 
  <TypeDescriptor TypeName="System.Decimal" Name="DEPTNo" /> 
  <MethodInstance Type="Finder" ReturnParameterName="Employees" ReturnTypeDescriptorName="Employees" ReturnTypeDescriptorLevel="0" Name="EmployeeFinderInstance" /> 
  <MethodInstance Type="SpecificFinder" ReturnParameterName="Employees" ReturnTypeDescriptorName="Employees" ReturnTypeDescriptorLevel="0" Name="EmployeeSpecificFinderInstance" /> 
  <MethodInstance Type="IdEnumerator" ReturnParameterName="Employees" ReturnTypeDescriptorName="Employees" ReturnTypeDescriptorLevel="0" Name="IdEnumeratorInstance" />