Readme_AS Simple Sample

11/05/2008 21:36:06


This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
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: C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\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 most major objects creation, modifications 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 also 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) you cannot see the results from AMO. In addition, if you are implementing a client interface using ADOMD that permits 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 Analysis Services 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 Microsoft SQL Server and the following SQL Server components installed:
  • SQL Server Database Engine
  • Analysis Services
  • SQL Server Management Studio
  • Business Intelligence Development Studio Note: Business Intelligence Development Studio is not supported on computers that run the Itanium-based operating system; the 64-bit development environment is supported on x64-based operating systems. SQL Server samples can be modified and run on computers that run either x86 or x64-based operating systems when databases used by the samples are deployed on an Itanium-based operating system.
  • Updated versions of the following SQL Server sample databases: the AdventureWorksDW data warehouse and the AdventureWorks database. You can download these sample databases from the Microsoft SQL Server Samples and Community Projects web site. For more information about how to download and install sample databases, see Installing SQL Server Samples and Sample Databases in SQL Server Books Online.
  • Updated versions of the following SQL Server samples: Analysis Services samples and SQL Server Database Engine samples. You can download these samples from the Microsoft SQL Server Samples and Community Projects web site. For more information about how to download and install samples, see Installing SQL Server Samples and Sample Databases. You also need .NET Framework SDK 2.0 or Microsoft Visual Studio 2005 installed. You can obtain .NET Framework SDK free of charge. For more information, see Installing the .NET Framework SDK in SQL Server Books Online.

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 you compile '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 quotation marks): "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 quotation marks): "Simple Sample ADOMD ClientAccess.exe"
  5. Connect to a server and explore the user objects. © 2008 Microsoft Corporation. All rights reserved.

Last edited Mar 19, 2009 at 7:44 AM by leilu, version 10

Comments

No comments yet.