Readme for AS Simple Sample

AS Simple Sample is a sample C# program that illustrates the use of the Analysis Management Objects (AMO) to create complex OLAP cubes and the use of ADOMD.Net to access the contents of the newly created cubes.

Default location: "<system_drive>:\Program Files\Microsoft SQL Server\90\Samples\AnalysisServices\Programmability\AMO\AS Simple Sample".

AS Simple Sample is a complete developer sample for Analysis Services multidimensional databases; it covers both sides of the coin for developers: the server administration (using AMO) and the client access to the data (using ADOMD.Net.Client).

From the server administration perspective the AS Simple Sample covers almost all major objects creation, modification and process. On the enhancement side it covers aggregation design, perspectives, KPIs, actions, translations, and proactive caching. It also mentions security by using roles and permissions. The sample also covers a data mining structure and model creation and processing.

From the client access perspective, the AS Simple Sample covers most major objects metadata browsing and access to the values; it shows how to implement KPIs, actions, and browsing a data mining model.

While working with the AS Simple Sample, developers can see and understand the impact of using AMO and see the results using ADOMD. One of the most common challenges that developers working with Analysis Services face is how to see the results of what they are doing in AMO from the user perspective. This is because when you design an object (for example, a KPI) there is no way to see the results from AMO. In addition, if you are implementing a client interface using ADOMD that allows the user to execute designed actions, there is no easy way to discover the actions implemented unless you browse the actions collection using AMO. The AS Simple Sample therefore the need to have an integrated sample.

Scenario

The AS Simple Sample uses a guided set of procedures to create a subset of the functionality of the AdventureWorks cube located in the AdventureWorks Analysis Services Project. Then, the sample allows the user to view results in a client interface.

Languages

C#

Features

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

Application Area Features

AdventureWorks

AMO, ADOMD.Net Client, ADOMD.Net Server

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
    • The SQL sample database: AdventureWorksDW (data warehouse).
    • 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.

The AS Simple Sample is composed of three different binaries:

  • 'Simple Sample Stored Procedures.dll'
  • 'Simple Sample AMO Access.exe'
  • 'Simple Sample ADOMD ClientAccess.exe'

The only requirement to build the sample is to compile 'Simple Sample Stored Procedures.dll' before compiling 'Simple Sample AMO Access.exe'. There is no binary interdependency between the AMO sample and the ADOMD sample.

To build the Simple Sample Analysis Services sample

  1. Compile 'Simple Sample Stored Procedures.dll' by using Visual Studio 2005 and the 'StoredProcedures.sln' file.

    — 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/ StoredProcedures.sln"

    You can use other MSBuild build options depending on your needs.

  2. Compile 'Simple Sample AMO Access.exe' by using Visual Studio 2005 and the 'ServerAdmin.sln' file.

    — 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/ServerAdmin.sln"

    You can use other MSBuild build options depending on your needs.

  3. Compile 'Simple Sample ADOMD ClientAccess.exe' by using Visual Studio 2005 and the 'ClientAccess.sln' file.

    — 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/ ClientAccess.sln"

    You can use other MSBuild build options depending on your needs.

Running the Sample

To run the Simple Sample Analysis Services sample

  1. Build the 'Simple Sample' database using 'Simple Sample AMO Access'.

  2. In Visual Studio 2005, with ServerAdmin solution opened, 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 .\CS\ServerAdmin\bin\Debug. In that directory, run the following command (including quotes):

    "Simple Sample AMO Access.exe"

  3. Execute the suggested steps in the sample interface.

  4. In Visual Studio 2005, with ClientAccess solution opened, 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 .\CS\ ClientAccess \bin\Debug. In that directory, run the following command (including quotes):

    "Simple Sample ADOMD ClientAccess.exe"

  5. Connect to a server and explore the user objects.