Common Operations and Examples

Analysis Services Programming

Analysis Services Programming

Common Operations and Examples

This topic provides basic and advanced examples, in a step-by-step format, that show you how to perform common operations using Decision Support Objects (DSO). These examples assume that you have some experience in creating Microsoft® Visual Basic® or Visual C++® database applications. The examples provide complete routines in Visual Basic that perform the following functions:

  • Connects to your Analysis server

  • Accesses the FoodMart 2000 sample database

  • Adds a new database and data source

  • Adds dimensions and levels

  • Adds a cube and measures

  • Processes the cube

  • Creates a virtual cube

  • Creates a linked cube

  • Creates virtual dimensions

  • Performs incremental updates on a cube

Note  You can also find sample applications on the Microsoft SQL Server™ 2000 CD-ROM in the \MSOLAP\Samples directory. These illustrate some of the techniques you can use for developing your own applications that use DSO or PivotTable® Service. The Readme.txt file in the folder provides descriptions of the individual samples and instructions for installing them on your computer. Examples include displaying meta data and data over the Web, creating and processing cubes with DSO, and creating a write-enabled cube.

The examples use DSO objects to create a cube derived from the FoodMart 2000 sample database, which is provided with Microsoft SQL Server 2000 Analysis Services. It uses the Sales_Fact_1997, Product, Store, and Time_By_Day tables in a star schema, as shown here.

The following dimensions and measures are also used, as shown here.

Remarks

You may also find it helpful to review the structure of the FoodMart 2000 database itself by examining it either in Microsoft Access or in a third-party computer-aided software engineering (CASE) tool. This will help you to understand how the preceding steps are applied to the specific instance of the FoodMart 2000 database.

Some of these exercises can modify the FoodMart 2000 sample database. We recommend that you make backup copies of the following directories before you proceed:

  • C:\Program Files\Microsoft Analysis Services\Bin

  • C:\Program Files\Microsoft Analysis Services\Data