Readme for Analysis Services Personalization Extensions Sample

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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.
The Analysis Services Personalization Extensions sample is a C# program that illustrates how to create user-based personalizations. These personalizations are not permanent objects in the cube, but are objects that the client application applies dynamically during the user's session.
The Analysis Services Personalization Extensions sample dynamically creates a different object for three different users. For each user connection, the sample enables just the object that is associated with that user. Each of these personalization objects is only visible during the user session.
Default location: C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\Administrator\ASPE

Scenario

An independent software vendor (ISV) creates an interface that enables a user to design business metrics for his or her company, and then share those metrics with that user's peers. Those metrics are dynamic and adjustable to the person who uses them. For example, an ISV designs a client interface that enables a company's business analyst to design a Sales Monthly Goal Tracking indicator. This indicator calculates and tracks the monthly sales goal for each salesperson. The business analyst can then share this indicator with the company's sales team. Now, any member on the team can know how he or she is doing towards the monthly goal.
Without the personalization extensions, the indicator would have to be passed to the company's Analysis Services team. This Analysis Services team would have to incorporate the indicator directly into the cube design and then redeploy the cube to the end users. Because the indicator is an object in the cube, the indicator is not personalized to each user.

Languages

C#

Features

The Analysis Services Personalization Extensions Sample uses the following features of Microsoft SQL Server Analysis Services.

Application Area Features
AdventureWorks ADOMD.Net Server, MDX


Prerequisites

Before you run this sample, you should have the following software installed:
  • Microsoft SQL Server, which includes the following components:
  • SQL Server Database Engine
  • Analysis Services
  • SQL Server Management Studio
  • Business Intelligence Development Studio
  • The SQL sample database: AdventureWorksDW (data warehouse)
  • Analysis Services samples
  • AdventureWorks database. An updated version of AdventureWorks database is available for download on the SQL Server Developer Center Web page
  • The SQL Server Database Engine samples. An updated version of the SQL Server Database Engine samples is 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. For more information, see the topic, "Installing the .NET Framework SDK," in SQL Server Books Online
Note:
Business Intelligence Development Studio is not supported on Itanium-based computers. The 64-bit development environment is supported on x64-based operating systems. SQL Server 2005 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 computer.



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 Analysis Services Personalization Extensions Sample is composed of one binary file, ASPE.dll.
To build the Analysis Services Personalization Extensions Sample Compile ASPE.dll by using Visual Studio 2005 and the ASPE.sln file.— or —Compile ASPE.dll by using Microsoft MSBuild, which is included in the .NET Framework SDK 2.0. Run a command similar to the following at a command prompt:msbuild /nologo /verbosity:quiet /property:Configuration=Debug "CS/ ASPE.sln"You can use other MSBuild build options depending on your needs.

Deploying the Sample

To deploy the Analysis Services Personalization Extensions sample, you have to add the assembly that you built in the previously procedure to a running instance of Analysis Services.
To add ASPE.dll assembly to a running instance of Analysis Services In SQL Server Management Studio, connect to the instance of Analysis Services.Localhost is assumed as default for this sample. Replace localhost in with the name of the instance that you have selected.At the server level, open the Assemblies folder and verify that the ASPE assembly is not listed.If the ASPE assembly is listed, remove this assembly by right-clicking the assembly and selecting Delete. Continue following the steps on the screen.Right-click Assemblies and select New Assembly.In the Register Server Assembly dialog box, select the following options: For Type, select .NET Assembly. For Filename, click the browse button […] and find the ASPE.dll file in your project folder under bin/debug folders. For Permissions, select Unrestricted. For Impersonation, select Use the Service Account. Click OK.
At the server level, open the Assemblies folder and verify the ASPE assembly is listed.Restart the service to enable the correct management of all events.

Preparing the Environment to Test the Sample

On the same server where you are running Analysis Services and have deployed ASPE.dll, use the following procedures to set up the environment to test the sample.
To add three users to your current system Click Start, right-click My Computer, and select Manage.Expand Local Users and Groups to see the Users and Groups folders.Right-click the Users folder and select New User.In the New User dialog box, select the following options: For User Name, type user1. For Password, type a strong password that meets your company standards. For Confirm Password, re-type your selected password. Clear the User must change password at next logon check box. Select the Password never expires check box.Repeat step 4 for user2 and user3. To verify Adventure Works DW database is deployed and contains Adventure Works cube On an Analysis Services instance, open SQL Server Management Studioand connect to the Server Name, localhost.Expand the Databases node and verify that the Adventure Works DW database exists.Expand the Adventure Works DW node, expand the Cubes node, and verify that the Adventure Works cube exists.Right-click the Adventure Works cube and select Properties. Verify that the cube state is Processed. If any one of the previous steps do not verify correctly, see the Books Online topic, "Running Setup to Install AdventureWorks Sample Databases and Samples," in the MSDN Library. To add a role for the new users and allow them access to the cube and dimensions On an Analysis Services instance, open SQL Server Management Studio and connect to the Server Name, localhost. Expand the Databases node, and then expand Adventure Works DW database.Right-click Roles, and then select New role.In the Create Role dialog box, on the General page, select the following options: For Role Name, type ASPE Test Users. Select the Read Definition check box. Clear the Full Control and Process check box.On the Membership page, select the following options: Click Add. In Select Users or Groups window, for Enter the object names to select, type user1; user2; user3. Click Check Names. The values should now appear underlined, with the server or domain name preceding each name.
Click OK.
On the Data Sources page, in Access, for Adventure Works DW, select Read.On the Cubes page, select the following options: In Access, for Adventure Works, select Read. In Local Cube/Drillthrough, for Adventure Works, select Drillthrough and Local Cube. For Adventure Works, select the Process check box.On the Dimensions page, for all dimensions, select the Process check box.Click OK, and then wait until the command is processed and the new role is created.

Testing the Sample

Testing the sample demonstrates that new personalization objects are created in different user contexts and that those objects are associated with the user profile.
{" To verify your context In SQL Server Management Studio, connect to the Server Name, localhost.On the Standard toolbar, click

Last edited Jun 5, 2007 at 6:33 PM by bonniefe, version 6

Comments

No comments yet.