Bagikan melalui


Manage BDC models (SharePoint Foundation 2010)

 

Applies to: SharePoint Foundation 2010

A BDC model is an XML file that contains sets of descriptions of one or more external content types, their related external systems, and information that is specific to the environment, such as authentication properties. The metadata in a model defines the fields of data in each external content type, the operations that are supported on the external system (to support tasks such as reading, writing, and querying the external system), and connectivity information.

The Business Data Connectivity service provides a set of operations that support importing and exporting models, setting permissions on them, and viewing the external content types that they contain. For example, you can export a BDC model to deploy it from a development environment to a production environment.

A resource file contains the localized names, properties, and permissions for one or more external content types. You can use the same techniques that you use for BDC models to import and export resource files. For example, you can import a resource file to provide a new set of localized strings for an additional language in which a solution will be used.

In this article:

  • Import a BDC model

  • Export a BDC model or resource file

  • Set permissions on a BDC model

  • View all models

  • Delete a BDC model

  • View a model’s external content types

Import a BDC model

Importing a model is a primary way to add it, and its related external content types and external systems, into a metadata store. All external content types in a model are automatically activated when you import the model.

Each external content type has a name, namespace and version number, which are used to identify the external content type. Multiple versions of an external content type can exist in the metadata store at any given time. As you import models, add or delete models, activate or deactivate external content types, and add or delete external content types, you can end up with many versions of an external content type. If multiple versions of an external content type exist in the metadata store, the Business Data Connectivity runtime uses the version of the external content type that is active, regardless of the version number of the external content type. The active external content type can be the last imported version of the external content type or the version of the external content type that was activated by using the Enable-SPBusinessDataCatalogEntity cmdlet.

Warning

If the model does not specify an authentication mode, then PassThrough authentication mode is used. PassThrough authentication may not be suitable for all scenarios. It is meant to be used primarily in a testing environment with a "single-box" configuration (that is, the database server and SharePoint Foundation are running on the same computer). For more information about authentication modes, see Business Connectivity Services authentication overview.

Tip

You can also import a model or resource file by using Windows PowerShell. See Import-SPBusinessDataCatalogModel for details.

To import a BDC model or resource file

  1. Verify that you have one of the following administrative credentials:

    • You must be a farm administrator.

    • You must be an administrator of the Business Data Connectivity service application and have Edit permission on the metadata store.

  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

  4. In the BDC models group of the ribbon, click Import.

  5. On the Import BDC model page, in the BDC Model File field, click Browse to find the BDC model or resource file.

    Important

    A BDC model cannot have any of the following characters in its name: ~"#%&*:<>?{|} or the character 0x7f.

  6. In the File Type section, select the type of BDC model file to import: Model or Resource.

  7. In the Advanced Settings section, select one or more types of resource to import:

    • Click Localized names to import localized names for the external content types in a particular locale.

      Imported localized names are merged with the existing localized names in the Business Data Connectivity service database.

    • Click Properties to import properties for external content types.

      Imported properties are merged with the existing property descriptions in the Business Data Connectivity service database.

    • Click Permissions to import permissions for external content types and other securable objects in the model.

      Warning

      Permissions are stored together with the existing permissions information in the Business Data Connectivity service. If an entry for an object already exists in the access control list, its value is overwritten with the permissions information from the imported file. For example, suppose that the permissions for an external content type X provide access to that external content type to User A. If you import permissions that specify that only User B has access to external content type X, the previous permissions for external content type X will be deleted and new permissions will be stored that only contain the permissions for User B.

  8. To save the group of imported resource settings in a file that can later be exported for use in a particular environment, in the Use Custom Environment Settings field, type a unique name for the set of environment-specific settings.

Export a BDC model or resource file

After a BDC model or resource file has been exported, you can use the exported file to deploy the BDC model on a different system. You can use any of the following methods to export a BDC model or resource file:

  • Use Central Administration to export a BDC model or resource file.

  • Use the Export-SPBusinessDataCatalogModel cmdlet to export a BDC model or resource file.

  • Use Microsoft SharePoint Designer 2010 to export a BDC model.

    Note

    If a BDC model was created by using SharePoint Designer 2010, you must use SharePoint Designer to export the BDC model. If a model that was created by using SharePoint Designer is exported by using Central Administration or the Export-SPBusinessDataCatalogModel cmdlet, the exported model file includes only placeholders for the external content types. For more information about SharePoint Designer, see SharePoint Designer Help and How-to (https://go.microsoft.com/fwlink/p/?LinkID=198249).

To export a BDC model or resource file

  1. Verify that you have one of the following administrative credentials:

    • You must be a farm administrator.

    • You must be an administrator of the Business Data Connectivity service application and have Edit permission on the model and on all external systems that are contained in the model.

  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

  4. In the View group of the ribbon, click BDC Models.

  5. On the BDC Models page, select the model or resource file to export.

  6. In the BDC Models group, click Export.

  7. On the Export page, in the File Type field, select the type of file that you are exporting (Model or Resource) and, in the Advanced Settings area, select one or more types of resource to export:

    • Click Localized names to export localized names for the external content types in a particular locale.

    • Click Properties to export properties for external content types.

    • Click Permissions to export permissions for external content types.

    • Click Proxies to export an implementation-specific proxy that is used to connect to the external system.

  8. If you saved a set of resources that can later be exported for use in a particular environment, in the Use Custom Environment Settings field, type the unique name associated with the environment-specific settings to export.

  9. Click Export.

    Your computer’s interface for saving the BDC model or resource file to a location on your network will be displayed.

Set permissions on a BDC model

You set permissions on a BDC model to specify who can edit it and who can set permissions on it.

We recommend that you give specific permissions to each user or group that needs them, in such a way that the credentials provide the least privilege necessary to perform the needed tasks. For more information about setting permissions, see Business Connectivity Service permissions overview in "Business Connectivity Services security overview (SharePoint Foundation 2010)."

To set permissions on a BDC model

  1. Verify that you have one of the following administrative credentials:

    • You must be a farm administrator.

    • You must be an administrator of the Business Data Connectivity service application and have Set Permissions permission on the model.

  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

  4. In the View group of the ribbon, click BDC Models.

  5. Select the check box of each BDC model for which you want to set permissions.

  6. In the Permissions group, click Set Object Permissions.

  7. In the box, type the user accounts, groups, or claims for which permissions will be granted, and then click Add.

    Note

    The user account, group, or claim cannot have a vertical bar (|) in its name.

  8. Set the permissions for the account, group, or claim.

    Note

    At least one user, group or claim in the metadata object's access control list must have the Set Permissions permission.

    • Click Edit to allow the user, group, or claim to edit the BDC model.

      securitySecurity Note
      The Edit permission should be considered highly privileged. With the Edit permission, a malicious user can steal credentials or corrupt a server farm. To help ensure a secure solution, we recommend using a test environment where the Edit permission can be assigned freely to developers and solution designers. When you deploy the tested solution to a production environment, remove the Edit permissions.
    • Click Set Permissions to allow the user, group, or claim to set permissions on the BDC model.

      securitySecurity Note
      The Set Permissions permission should be considered highly privileged. With the Set Permissions permission, a user can grant Edit permission to the BDC model.

      Important

      The other two listed permissions, Selectable In Clients and Execute, are not applicable to BDC models.

View all models

You can view all the models in a Business Data Connectivity service application.

To view all models

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

  4. In the View group of the ribbon, click BDC Models.

Delete a BDC model

When you delete a BDC model, all external content types and external systems that are contained in the model and that are not also contained in another model are deleted along with it.

To delete a BDC model

  1. Verify that you have one of the following administrative credentials:

    • You must be a farm administrator.

    • You must be an administrator of the Business Data Connectivity service application and have Edit permission on the model.

  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

  4. In the View group of the ribbon, click BDC Models.

  5. On the BDC Models page, select the model to delete.

  6. In the BDC models group, click Delete and, when you are prompted, click OK.

View a model’s external content types

View a model’s external content types to learn about the model or to choose an external content type for a subsequent task.

To view a model’s external content types

  1. Verify that you have the following administrative credentials:

    • You must be a farm administrator or an administrator of the service application.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. Click in the Name column of the row that corresponds to the Business Data Connectivity service application.

  4. In the View group of the ribbon, click BDC Models.

  5. Point to the model, click the arrow that appears, and then click View External Content Types.

See Also

Other Resources

Resource Center: Operations and Manageability for SharePoint Foundation 2010 (https://go.microsoft.com/fwlink/p/?LinkId=220234)