Share via


Readme for AMOAdventureWorks Sample

AMOAdventureWorks is a sample C# program that illustrates the use of the Analysis Management Objects (AMO) to create complex OLAP cubes.

Default location: <system_drive>:\Program Files\Microsoft SQL Server\90\Samples\AnalysisServices\Programmability\AMO\AMOAdventureWorks

Scenario

This sample creates a subset of the functionality of the AdventureWorks cube located in the AdventureWorks Analysis Services Project.

Languages

C#

Features

The SQL Server 2005 Analysis Services (SSAS) sample uses the following features.

Application Area Features

AMOAdventureWorks

AMO

Prerequisites

Before you run this sample, you should have the following software installed:

  • Microsoft SQL Server 2005, which includes the following components:
    • SQL Server 2005 Database Engine
    • Analysis Services
    • SQL Server Management Studio
    • Business Intelligence Development Studio
    • Two sample databases: AdventureWorksDW (data warehouse) and AdventureWorksAS (OLAP)
    • Analysis Services samples
    • An updated version of AdventureWorks database is also available for download on the SQL Server Developer Center Web page.
    • An updated version of the SQL Server 2005 Database Engine samples is also available for download on the SQL Server Developer Center Web page.
    • .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. See Installing the .NET Framework SDK in SQL Server 2005 Books Online.

Note

SQL Server 2005 Business Intelligence Development Studio is not supported on computers that run the Itanium-based platform; the 64-bit development environment is supported on x64-based platforms. SQL Server 2005 samples can be modified and run on computers that run either x86 or x64-based platforms when databases used by the samples are deployed on an Itanium-based platform.

Building the Sample

If you have not already created a strong name key file, generate the key file using the following instructions.

To generate a strong name key file

  1. Open a Microsoft Visual Studio 2005 command prompt. Click Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click SDK Command Prompt.

    -- or --

    Open a Microsoft .NET Framework command prompt. Click Start, point to All Programs, point to Microsoft .NET Framework SDK 2.0, and then click SDK Command Prompt.

  2. Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed.

    Note

    To determine the folder where samples are located, click the Start button, point to All Programs, point to Microsoft SQL Server, point to Documentation and Tutorials, and then click Samples Directory. If the default installation location was used, the samples are located in <system_drive>:\Program Files\Microsoft SQL Server\100\Samples.

  3. At the command prompt, run the following command to generate the key file:

    sn -k SampleKey.snk

    Important

    For more information about the strong-name key pair, see "Security Briefs: Strong Names and Security in the .NET Framework" in the .NET Development Center on MSDN.

To build the AMOAdventureWorks sample

  • Compile the sample by using Visual Studio 2005 and the provided Visual Studio solution.

    — or —

    Compile the sample using Microsoft MSBuild, which is included in the .NET Framework SDK 2.0, by executing a command similar to the following at a command prompt:

    msbuild /nologo /verbosity:quiet /property:Configuration=Debug CS/AMOAdventureWorks.sln

    Other MSBuild build options can be used depending on your needs.

Note

References to Microsoft.AnalysisServices.dll and msmgdsrv.dll assemblies might need to be reset; check that there are no warnings on the project browser. If you compile manually, adjust project files to point to the correct references of both assemblies.

Running the Sample

To run the AMOAdventureWorks sample

  • In Visual Studio 2005, press F5.

    — or —

    In Visual Studio 2005, on the Debug menu, click Start.

    — or —

    At a command prompt, use the change directory (CD) command to go to the folder where the sample was built. The default build location is <system_drive>:\Program Files\Microsoft SQL Server\90\Samples\Analysis Services\Programmability\AMO\AMOAdventureWorks\CS\AMOAdventureWorks\bin\Debug. In that directory, run the following command:

    AMOAdventureWorks.exe

See Also

Tasks

Readme for DisplayObjectNames Sample
SQL Server Analysis Services Samples

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

17 July 2006

New content:
  • Added note on availability for Itanium-based platform.

5 December 2005

New content:
  • Added Building the Sample and Running the Sample sections.