Step 1: Connect to the AdventureWorks2000 Database

This topic explains how to define the XML for the LobSystem and LobSystemInstance objects to connect to the AdventureWorks2000 database. For simplicity, the sample XML provided in this topic uses PassThrough authentication. For a more complex sample using single sign-on (SSO), see Step 7 (Optional): Use Single Sign-On to Connect to the AdventureWorks2000 Database.

The LobSystem object is the top-level container for metadata that describes a particular business application. In XML terms, it is the root node that contains all other metadata objects. The LobSystemInstance object under the LobSystem object provides authentication and connection string information to the Business Data Catalog.

The Business Data Catalog supports the following database authentication modes:

  • PassThrough

  • RevertToSelf

  • RdbCredentials

  • WindowsCredentials

For more information, see Business Data Catalog Authentication.


Before you write metadata, you must set up your environment. This example assumes you have Microsoft Office SharePoint Server 2007 already set up and that you have installed the AdventureWorks2000 sample database.

The default installation of Microsoft SQL Server 2000 does not include the AdventureWorks2000 database. Download the AdventureWorks2000 sample database from the Microsoft Download Center. You should install the AdventureWorks2000 database on the same computer on which Office SharePoint Server 2007 is installed.

To connect to the AdventureWorks2000 database

  1. Create a text file and save it as AdventureWorks2000.XML. Location of the file does not matter.

  2. Open the text file for editing in your text editor.

  3. Insert the following XML:

    <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
    <!-- This metadata XML defines three entities: Product, Customer, 
    and SalesOrder from the AdventureWorks 2000 Sample database.-->
    <LobSystem xmlns:xsi="" 
    xsi:schemaLocation=" BDCMetadata.xsd" Type="Database" 
    Version="" Name="AdventureWorksSample" 
        <Property Name="WildcardCharacter" Type="System.String">%</Property>
        <LobSystemInstance Name="AdventureWorksSampleInstance">
            <Property Name="AuthenticationMode" 
            <!--AuthenticationMode can be set to PassThrough, 
            RevertToSelf, RdbCredentials, or WindowsCredentials. -->
            <Property Name="DatabaseAccessProvider" 
            <!-- Can be SqlServer, OleDb, Oracle, or Odbc for database 
            systems. -->
            <Property Name="RdbConnection Data Source" Type="System.String">EnterYourAdventureWorks2000ServerNameHere</Property>
            <!-- The name of your server hosting the AdventureWorks2000 
                 database or the name of the SQL Server instance in the 
                 format SQLServer\Instance. -->
            <Property Name="RdbConnection Initial Catalog" 
            <!-- The name of the database.> -->
            <Property Name="RdbConnection Integrated Security" 
            <Property Name="RdbConnection Pooling" 
        <!-- Enter your Entity XML here -->
  4. In the LobSystemInstance metadata, replace the name of the SQL Server that hosts the AdventureWorks2000 database in the RdbConnection Data Source property accordingly. If you use a SQL Server instance, use the format SQLServer\Instance.

  5. Save the XML file.

Next Steps

Step 2: Define Entities, Methods, and Filters.

See Also


AdventureWorks SQL Server 2000 Sample


Business Data Catalog: Metadata Model