Partilhar via


How to: Add or Remove Tables or Views in a Data Source View Using Data Source View Designer

Use Business Intelligence Development Studio to add or remove tables or views in a data source view in Microsoft SQL Server 2005 Analysis Services (SSAS) projects and databases.

To add tables or views to a data source view

  1. In Business Intelligence Development Studio, open the project or connect to the database that contains the data source view to which you want to add tables or views.

  2. In Solution Explorer, expand the Data Source Views folder, then open the data source view in Data Source View Designer by doing one of the following:

    • Double-click the data source view.
    • Right-click the data source view and click Open.
    • Click the data source view and then on the View menu, click Open.
  3. Open the Add/Remove Tables dialog box by doing one of the following:

    • On the Data Source View Designer toolbar, click Add/Remove Objects.
    • In the Diagram pane of the Data Source View Designer, right-click an open area and click Add/Remove Tables.
    • On the Data Source View menu, click Add/Remove Tables.
  4. In the Add/Remove Tables dialog box, in the Data source list, select the data source that contains the tables or views that you want to add to the data source view.

    The default data source that appears is the primary data source, but you can select any data source that has been defined for the project.

  5. On the Add/Remove Tables dialog box, use the arrow buttons (or double-click a table or view) to move tables and views from the Available objects list to the Included objects list.

  6. To include tables related to a table in the Included objects list, select the table in the Included objects list and click Add Related Tables. This adds tables to the Included objects list that are related to the selected table by a foreign key relationship, or a name matching relationship if no foreign relationships exists in the data source.

  7. Optionally, select the Show system objects check box to include system views and tables in the Available objects list.

  8. Optionally, type filter criteria in the Filter text box to apply a filter to the Available objects list. For example, if you type dbo and click the Filter button, then only those items starting with "dbo" show up in the Available objects list.

  9. Click OK.

  10. Save the modified data source view by doing one of the following:

    • On the File menu, click Save Selected Items or Save All.
    • On the Data Source View Designer toolbar, click Save Selected Items or Save All.
    • Close the Data Source View Designer in Business Intelligence Development Studio and then click Save when prompted.

To remove tables or views from a data source view

  1. In Business Intelligence Development Studio, open the project or connect to the database that contains the data source view from which you want to remove tables or views.

  2. In Solution Explorer, expand the Data Source Views folder, then open the data source view in Data Source View Designer by doing one of the following:

    • Double-click the data source view.
    • Right-click the data source view and click Open.
    • Click the data source view and then on the View menu, click Open.
  3. Delete one or more tables or views by doing one of the following:

    • Select the tables or views that you want to delete, press DELETE on the keyboard, and then click OK in the Delete Objects dialog box.
    • Select the tables or views that you want to delete, right-click one of the tables or views, click Delete Table From DSV, and then click OK in the Delete Objects dialog box.
    • Open the Add/Remove Tables dialog box by using one of the following three methods:
    • On the Data Source View Designer toolbar, click Add/Remove Objects.
    • In the Diagram pane of the Data Source View Designer, right-click an open area and click Add/Remove Tables.
    • On the Data Source View menu, click Add/Remove Tables.
      In the Add/Remove Tables dialog box, use the arrow buttons (or double-click a table or view) to remove one or more tables or views from the Included objects list, and then click OK.

Note

When you remove a table or view, the Delete Objects dialog box provides a warning about the objects that will no longer be valid if you delete the selected tables or views.

  1. Save the modified data source view by doing one of the following:
    • On the File menu, click Save Selected Items or Save All.
    • On the Data Source View Designer toolbar, click Save Selected Items or Save All.
    • Close the Data Source View Designer in Business Intelligence Development Studio and then click Save when prompted.

See Also

Tasks

How to: View Objects in a Data Source View Using Data Source View Designer

Concepts

Data Source Views (Analysis Services)
Working with Data Source Views (Analysis Services)

Other Resources

Working with Data Source Views How-to Topics (SSAS)

Help and Information

Getting SQL Server 2005 Assistance