MSFTASProdSamples Wiki & Documentation Rss Feedhttp://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=HomeMSFTASProdSamples Wiki Rss DescriptionNew Comment on "SS2005!Readme For Command-line Utility Sample"https://msftasprodsamples.codeplex.com/wikipage?title=SS2005!Readme For Command-line Utility Sample&ANCHOR#C30464&#34;To generate a strong name key file&#34; will fail if UAC is on and the Visual Studio Command Line is not explicitly elevated. If the sn tool &#42;seems&#42; to tell you you mistyped its command line...rheinigFri, 27 Jun 2014 14:16:16 GMTNew Comment on "SS2005!Readme For Command-line Utility Sample" 20140627021616PNew Comment on "Katmai!Data Mining Web Controls Library"http://msftasprodsamples.codeplex.com/wikipage?title=Katmai!Data Mining Web Controls Library&ANCHOR#C20316I cannot see folder &#34; C&#58;&#92;Program Files&#92;Microsoft SQL Server&#92;100&#92;Samples&#92;Analysis Services&#92;DataMining&#92;Data Mining Web Controls&#34; after installation.&#10;I am using 32 bit msi file.thesurajWed, 13 Jul 2011 18:39:06 GMTNew Comment on "Katmai!Data Mining Web Controls Library" 20110713063906PNew Comment on "SS2005!Readme For Command-line Utility Sample"http://msftasprodsamples.codeplex.com/wikipage?title=SS2005!Readme For Command-line Utility Sample&ANCHOR#C16995Am I the only one who have problems with deploying roles &#63;mavericklbjTue, 14 Sep 2010 14:39:55 GMTNew Comment on "SS2005!Readme For Command-line Utility Sample" 20100914023955PUpdated Wiki: Homehttp://msftasprodsamples.codeplex.com/wikipage?version=35<div class="wikidoc"><a href="http://CodePlex.com/SqlServerSamples" class="externalLink">SQL Server Samples Portal Page<span class="externalLinkIcon"></span></a> &gt; SQL Server Analysis Services Product Samples<br /><br />SQL Server Analysis Services provides, a unified and integrated view of all your business data as the foundation for all of your traditional reporting, online analytical processing (OLAP) analysis, Key Performance Indicator (KPI) scorecards, and data mining.<br /><br />This project contains Analysis Services samples released with Microsoft SQL Server product. These samples are in the following three categories: Administrator, Data Mining, and Programmability. If you are interested in contributing Analysis Services samples, please let us know by posting in the developers' forum.<br /><br />To download these samples click on the Releases tab (or click <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=MSFTASProdSamples" class="externalLink">here<span class="externalLinkIcon"></span></a>), optionally select another (older) release, then click on the Windows Installer package (MSI file) which matches the architecture of the installation computer.<br /><br />For information about how to use CodePlex to access SQL Server samples, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=HowToUseCodePlex&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br />To download samples databases, click <a href="http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx" class="externalLink">here<span class="externalLinkIcon"></span></a> and then click the appropriate MSI file.<br />For release notes and brief descriptions of all the sample databases and code, including restrictions on SQL Express and Vista, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=SQLServerDatabasesandSamplesOverview&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.
<h3><b>Administrator</b></h3>
<table><tr><th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 &amp; SQL Server 2008R2 </th></tr>
<tr><td> Activity Viewer </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Activity%20Viewer&referringTitle=Home">SS2005</a> </td><td> n/a </td></tr>
<tr><td> Aggregation Manager Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme%20for%20Aggregation%20Manager%20Sample&referringTitle=Home">SS2005</a> </td><td> n/a </td></tr>
<tr><td> Analysis Services Upgrade Verification Tool Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme%20for%20Analysis%20Services%20Upgrade%20Verification%20Tool%20Sample&referringTitle=Home">SS2005</a> </td><td> n/a </td></tr>
<tr><td> ASTrace Utility Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme%20for%20ASTrace%20Utility%20Sample&referringTitle=Home">SS2005</a> </td><td> n/a </td></tr>
<tr><td> Command-line Utility Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme%20For%20Command-line%20Utility%20Sample&referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18652">SQL Server 2008 SR1</a> </td></tr></table><br /><br />
<h3><b>Data Mining</b></h3>
<table><tr><th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 &amp; SQL Server 2008R2 </th></tr>
<tr><td> Data Mining Web Controls Library </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Data%20Mining%20Web%20Controls%20Library&referringTitle=Home">SS2005</a> </td><td> n/a </td></tr>
<tr><td> SQL Server Plug-In Algorithms </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme%20for%20SQL%20Server%20Plug-In%20Algorithms&referringTitle=Home">SS2005</a> </td><td> n/a </td></tr></table><br /><br />
<h3><b>Extensibility</b></h3>
<table><tr><th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 &amp; SQL Server 2008R2 </th></tr>
<tr><td> Analysis Services Personalization Extensions Sample </td><td> n/a </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample&referringTitle=Home">SS2008</a> </td></tr></table><br /><br />
<h3><b>Programmability</b></h3>
<table><tr><th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 &amp; SQL Server 2008R2 </th></tr>
<tr><td> AMOBrowser </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21AMOBrowser&referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2008%21AMOBrowser&referringTitle=Home">SS2008</a> </td></tr>
<tr><td> BackupAndRestore </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21BackupAndRestore&referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2008%21BackupAndRestore&referringTitle=Home">SS2008</a> </td></tr>
<tr><td> DisplayObjectsName </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21DisplayObjectsName&referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2008%21DisplayObjectsName&referringTitle=Home">SS2008</a> </td></tr>
<tr><td> AS Simple Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme%20for%20AS%20Simple%20Sample&referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2008%21Readme%20for%20AS%20Simple%20Sample&referringTitle=Home">SS2008</a> </td></tr>
<tr><td> AMOAdventureWorks </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2005%21Readme_AMOAdventureWorks&referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/wikipage?title=SS2008%21Readme_AMOAdventureWorks&referringTitle=Home">SS2008</a> </td></tr></table><br /><br /><br /><b>Got questions? Want to contribute?</b> Check out the <a href="http://social.msdn.microsoft.com/Forums/en-us/sqlserversamples/threads" class="externalLink">SQL Server Community &amp; Samples Discussion Forum<span class="externalLinkIcon"></span></a>!<br /></div><div class="ClearBoth"></div>bonniefeTue, 08 Dec 2009 23:47:16 GMTUpdated Wiki: Home 20091208114716PNew Comment on "SS2005!Readme_AMOAdventureWorks"http://msftasprodsamples.codeplex.com/wikipage?title=SS2005!Readme_AMOAdventureWorks&ANCHOR#C14330where is code&#63;Roman_KTue, 01 Dec 2009 06:06:52 GMTNew Comment on "SS2005!Readme_AMOAdventureWorks" 20091201060652ANew Comment on "SS2005!Activity Viewer"http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005!Activity Viewer&ANCHOR#C13674Why program want to load a XML from &#34;C&#58;&#92;documents and settings&#92;Microsoft&#92;Microsoft SQL Server&#92;90&#92;Tools&#92;Shell&#92;RegSrvr.xml&#34;, But I can not find this file in my machine.&#13;&#10;&#13;&#10;How can I run this program sucessfully&#63;&#13;&#10;brucenanFri, 28 Aug 2009 08:35:38 GMTNew Comment on "SS2005!Activity Viewer" 20090828083538ANew Comment on "SS2008!Readme_AMOAdventureWorks"http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme_AMOAdventureWorks&ANCHOR#C13584I&#39;m working with Visual Studio 2005 or 2008 and the AmoAdventureWorks sample and Sql Server 2008 Standard edition. I&#39;ve made two changes to the AmoAdventureworks project, both in Program.cs. First I put an immediate return in the CreateCurrencyRatesMeasureGroup method to avoid the issue of semiadditive measures not being available in the Standard Edition. Second in the CreateRolesAndPermissions method for the reader role I used this statement&#58;&#10;&#10;role.Members.Add&#40;new RoleMember&#40;&#34;EIT&#92;test1&#34;&#41;&#41;&#59; &#47;&#47; e.g. redmond&#92;johndoe&#10;&#10;instead of&#58;&#10;&#10;role.Members.Add&#40;new RoleMember&#40;&#34;&#34;&#41;&#41;&#59; &#47;&#47; e.g. redmond&#92;johndoe&#10;&#10;and then&#10;&#10;role.Update&#40;&#41;&#59;&#10;&#10;gets this exception&#58;&#10;&#10;&#123;&#34;The following system error occurred&#58; No mapping between account names and security IDs was done. .&#92;n&#34;&#125;&#10;&#10;&#10;If I use this statement&#58;&#10;&#10;role.Members.Add&#40;new RoleMember&#40;&#34;EIT&#92;test1&#34;, &#34;S-1-5-21-107385321-1855232891-3196306309-513&#34;&#41;&#41;&#59; &#47;&#47; e.g. redmond&#92;johndoe&#10;&#10;it runs to completion and creates the cube. That is a valid user&#92;sid combination in our domain and as a Server Admin in Analysis Services I can browse the cube. &#10;&#10;However if I go into SSMS 2008 and open the AmoAdventureWorks AS database, then open roles and right click on Readers -&#62; Properties -&#62; Membership it shows S-1-5-21-107385321-1855232891-3196306309-513 as the user for this role. &#10;&#10;If I add a user and immediately remove that user and click ok I once again get a dialog box with&#58;&#10;&#10;The following system error occurred&#58; No mapping between account names and security IDs was done.&#10;&#10;Will someone please explain what I&#39;m doing wrong or missing here&#63;&#10;&#10;Thanks&#10;&#10;jcolaizziFri, 14 Aug 2009 00:33:48 GMTNew Comment on "SS2008!Readme_AMOAdventureWorks" 20090814123348AUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Samplehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme for Analysis Services Personalization Extensions Sample&version=11<div class="wikidoc">
<h2>
Readme_Analysis Services Personalization Extensions Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br />This sample works only with SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2008.<br />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.<br />The Analysis Services Personalization Extensions sample dynamically creates a different object for three different users. For each user connection, the sample enables only the object that is associated with that user. Each of these personalization objects is only visible during the user's session.<br /> <br /><h3>
Scenario
</h3>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. The metrics are dynamic and adjustable to the person who uses them. For example, the 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 easily know how he or she is doing towards the monthly goal, as the indicator is automatically tailored to the goals of each salesperson. <br />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 would be an object in the cube, the indicator would not be personalized to each user.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services Personalization Extensions Sample uses the following features of SQL Server 2008 Analysis Services (SSAS).<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AdventureWorks </td><td> ADOMD.NET Server, MDX </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample databases: the AdventureWorks data warehouse and the AdventureWorks database. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i>. </li><li> Updated versions of the following SQL Server samples: Analysis Services samples and SQL Server Database Engine samples. You can download these samples from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i>. You also need .NET Framework SDK 3.5 or Microsoft Visual Studio 2008 installed. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b></li>
</ul> <br /><h3>
Building the Sample
</h3>The Analysis Services Personalization Extensions Sample is composed of one binary file, ASPE.dll.<br />If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2008 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft Visual Studio 2008</b>, select <b>Visual Studio Tools</b>, and then click <b>Visual Studio 2008 Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the Analysis Services Personalization Extensions Sample
</h6> <br /><ol>
<li>Rename SampleKey.snk to ASPE.snk and move the file to the same location where ASPE.sln is.</li><li>Compile ASPE.dll by using: </li><li> Visual Studio 2008 and the ASPE.sln file. — or —</li><li> Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;3.5. Change directory to the location where the solution file ASPE.sln is located. Run a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug ASPE.sln</span> You can use other MSBuild build options depending on your needs.</li>
</ol> <br /><h3>
Deploying the Sample
</h3>To deploy the Analysis Services Personalization Extensions sample, you must add the assembly that you built in the previous procedure to a running instance of Analysis Services.<br /> <br /><h6>
To add ASPE.dll assembly to a running instance of Analysis Services
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the instance of Analysis Services.<i>Localhost</i> is assumed as the default instance for this sample. Replace <i>localhost</i> in with the name of the instance that you have selected.</li><li>At the server level, open the <b>Assemblies</b> 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 <b>Delete.</b> Continue following the steps on the screen.</li><li>Right-click <b>Assemblies</b> and select <b>New Assembly</b>.</li><li>In the <b>Register Server Assembly</b> dialog box, select the following options:</li><li> For <b>Type</b>, select <b>.NET Assembly</b>. </li><li> For <b>Filename</b>, click the browse button <b><a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=%u2026&amp;referringTitle=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample">…</a></b> and find the ASPE.dll file in your project folder under <b>bin/debug</b> folders. </li><li> For <b>Permissions</b>, select <b>Unrestricted</b>. </li><li> For <b>Impersonation</b>, select <b>Use the Service Account</b>. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>At the server level, open the <b>Assemblies</b> folder and verify the ASPE assembly is listed.</li><li>To enable the correct management of all events, open SQL Server Configuration Manager, select <b>SQL Server Services</b>, and then select the <b>SQL Server Analysis Services</b> row. Click the restart button to restart the service </li>
</ol><h3>
Preparing the Environment to Test the Sample
</h3>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.<br /> <br /><h6>
To add three users to your current system
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Right-click the <b>Users</b> folder and select <b>New User</b>.</li><li>In the <b>New User</b> dialog box, select the following options:</li><li> For <b>User name</b>, type <b>user1</b>. </li><li> For <b>Password</b>, type a strong password that meets your company standards. </li><li> For <b>Confirm password</b>, re-type your selected password. </li><li> Clear the <b>User must change password at next logon</b> check box. </li><li> Select the <b>Password never expires</b> check box. </li><li>Repeat step 4 for <b>user2</b> and <b>user3</b>.</li>
</ol><h6>
To verify Adventure Works DW database is deployed and contains Adventure Works cube
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server name</b>, <i>localhost</i>.</li><li>Expand the <b>Databases</b> node and verify that the <b>Adventure Works DW</b> database exists.</li><li>Expand the <b>Adventure Works DW</b> node, expand the <b>Cubes</b> node, and verify that the <b>Adventure Works</b> cube exists.</li><li>Right-click the <b>Adventure Works</b> cube and select <b>Properties</b>. Verify that the cube <b>State</b> is <b>Processed</b>. </li><li>If any one of the previous steps cannot be completed, see the Books Online topic, <a href="http://go.microsoft.com/fwlink/?LinkId=83253" class="externalLink">Running Setup to Install AdventureWorks Sample Databases and Samples<span class="externalLinkIcon"></span></a>, in the MSDN Library.</li>
</ol><h6>
To add a role for the new users and give them access to the cube and dimensions
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server Name</b>, <i>localhost</i>. </li><li>Expand the <b>Databases</b> node, and then expand the <b>Adventure Works DW</b> database.</li><li>Right-click <b>Roles</b>, and then select <b>New role</b>.</li><li>In the <b>Create Role</b> dialog box, click the <b>General</b> page, and select the following options:</li><li> For <b>Role name</b>, type <b>ASPE Test Users</b>. </li><li> Select the <b>Read definition</b> check box. </li><li> Clear the <b>Full control (Administrator)</b> and <b>Process database</b> check boxes. </li><li>Click the <b>Membership</b> page, and select the following options:</li><li> Click <b>Add</b>. </li><li> In the <b>Select Users or Groups</b> window, for <b>Enter the object names to select</b>, type <b>user1; user2; user3</b>. </li><li> Click <b>Check Names</b>. The values should now appear underlined, with the server or domain name in front of each name. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>Click the <b>Data Sources</b> page. In the <b>Access</b> column for the <b>Adventure Works DW</b> row, select <b>Read</b>.</li><li>Click the <b>Cubes</b> page, and select the following options for the <b>Adventure Works</b> row:</li><li> In the <b>Access</b> column, select <b>Read</b>. </li><li> In the <b>Local Cube/Drillthrough Access</b> column, select <b>Drillthrough and Local Cube</b>. Click <b>OK</b> to accept the message. </li><li> In the <b>Process</b> column, select the check box. </li><li>Click the <b>Dimensions</b> page. For each of the rows in <b>Dimensions</b>, select the <b>Process</b> column check box.</li><li>Click <b>OK</b>, and then wait until the command is processed and the new role is created.</li>
</ol><h3>
Testing the Sample
</h3>Testing the sample demonstrates that new personalization objects are created in different user contexts and that those objects are associated with the user profile.<br /> <br /><h6>
To verify your context
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select the Adventure Works DW database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the Adventure Works cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node. </li><li>Expand the <b>Internet Sales</b> node, and verify that there is no <b>ISV_1</b> folder under this node. </li><li>Expand the <b>Geography</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li><li>Expand the <b>Product</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li>
</ol><h6>
To verify the context for user1
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user1</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user1 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if it is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, and then expand the <b>Internet Sales</b> node to see the <b>ISV1</b> folder.Unlike your user context, user1 has an *ISV1 *folder under the <b>Internet Sales</b> node.</li><li>Expand the <b>ISV1</b> folder, expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, expand the <b>ISV1</b> folder, and then expand the <b>Operations</b> folder.Notice that the <b>Operations</b> folder contains the <b>Average Item Freight Cost</b> member.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV1 - Western Coast</b> set.Unlike your user context, user1 does have access to the <b>ISV1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV1</b> folder, and then expand the <b>Operations</b> folder to see the <b>Touring Bikes</b> set.Unlike your user context, user1 has access to the <b>Touring Bikes</b> set.</li>
</ol><h6>
To verify the context for user2
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user2</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user2 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select the <b>Adventure Works DW</b> database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV1</b> folder, and expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is also visible to this user. </li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV1</b> folder in this group.Only user1 has an <b>ISV1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, expand the <b>ISV1</b> folder, and then expand the <b>Finance</b> folder to see the *Rate Difference *member.Notice that for user2 only, the <b>Exchange Rates</b> measure group has an <b>ISV1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV1 - Western Coast</b> set.Notice that user2, just like user1, has access to the <b>ISV1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV1</b> folder, and then expand the <b>Finance</b> folder to see the <b>Mountain Bikes</b> set.While user2 has access to the <b>Mountain Bikes</b> set, user2 does not have access to the <b>Touring Bikes</b> set in the <b>Operations</b> folder. Only user1 has access to the <b>Touring Bikes</b> set<b>.</b></li>
</ol><h6>
To verify the context for user3
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user3</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user3 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV1</b> folder, and expand the <b>Common</b> folder. Notice that the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV1</b> folder in this group.Only user1 has an <b>ISV1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, and verify that there is no <b>ISV1</b> folder in this group.Only user2 has an <b>ISV1</b> folder in the <b>Exchange Rates</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Orders</b> measure group, expand the <b>ISV1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>Discount per Order</b> member.Notice that for user3 only, the <b>Reseller Orders</b> measure group has an <b>ISV1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV1</b> folder, and expand the <b>Common</b> folder to see <b>ISV1 - Western Coast</b> set.user3, just like user1 and user2, has access to the <b>ISV1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>All Terrain Bikes</b> set.While user3 has access to the <b>All Terrain Bikes</b> set, user3 does not have access to the <b>Touring Bikes</b> set in the <b>Operation</b> folder. Only user1 has access to the <b>Touring Bikes</b> set. User3 also has access to the <b>Mountain Bikes</b> set in the <b>Finance</b> folder. It is user2 who has no access to the <b>All Terrain Bikes</b> set.</li>
</ol><h3>
Troubleshooting the Sample
</h3>Use the following set of procedures to troubleshoot the Analysis Services Personalization Extensions sample.<br /> <br /><h6>
To define debug breakpoints in the code
</h6> <br /><ol>
<li>In Visual Studio 2008, open ASPE.sln.</li><li>Open the source code for the <i>ASClientExtensions.cs</i> source file, and then set a breakpoint on the opening brace of the <i>ASClientExtensions</i> constructor.</li><li>Open the source code for the <i>SessionMgr.cs</i> source file, and then set the following breakpoints:</li><li> Set a breakpoint on the opening brace of the <i>SessionMgr</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>CubeOpened</i> method. </li><li>Open the source code for the <i>AuthoringAndManagement.cs</i> source file, and then set the following breakpoints.</li><li> Set a breakpoint on the opening brace of the <i>AuthoringAndManagement</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>DefineMembers</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineSets</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineKPIs</i> method. </li>
</ol><h6>
To attach to the running instance of Analysis Services
</h6> <br /><ol>
<li>In the menu bar, select <b>Debug</b>, and then select <b>Attach to process</b>.</li><li>In the <b>Available Processes</b> pane, browse to find <b>msmdsrv.exe</b>, and then select it.</li><li>Click <b>Attach</b>, and then wait until the debugger attaches to the running process.</li>
</ol><h6>
To run through the breakpoints
</h6> <br /><ol>
<li>Repeat all the steps in the procedure, <b>To verify the context for user1</b>.Notice that SQL Server Management Studio does not immediately appear. Instead, Visual Studio opens.</li><li>To see the sequence of events, press F11 repeatedly.If there are no more events, check SQL Server Management Studio to continue with the steps in the procedure, <b>To verify the context for user1</b>.</li>
</ol><h3>
Removing the Sample
</h3>Use the following procedure to remove the Analysis Services Personalization Extensions Sample.<br /> <br /><h6>
To remove the roles and assembly from the current Analysis Services instance
</h6> <br /><ol>
<li>Open SQL Server Management Studio. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i></li><li>Expand the <b>Databases</b> node, and then expand <b>Adventure Works DW</b> database.</li><li>Expand <b>Roles</b>, right-click <b>ASPE Test Users</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>At server level, expand <b>Assemblies</b>, right-click <b>ASPE</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>Close SQL Server Management Studio.</li><li>Restart the service</li>
</ol><h6>
To remove the user created for this sample
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Expand the <b>Users</b> folder.</li><li>Remove user1, user2, user3 by right-clicking each user, selecting <b>Delete</b>, and then clicking <b>OK</b>.</li>
</ol><h6>
To remove the ASPE sample
</h6> <br /><ul>
<li>From your solution folder, in the ASPE folder, remove the <b>bin</b> and <b>obj</b> folders. &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>cmslydiaThu, 09 Apr 2009 02:39:02 GMTUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Sample 20090409023902AUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Samplehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme for Analysis Services Personalization Extensions Sample&version=10<div class="wikidoc">
<h2>
Readme_Analysis Services Personalization Extensions Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br />This sample works only with SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2008.<br />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.<br />The Analysis Services Personalization Extensions sample dynamically creates a different object for three different users. For each user connection, the sample enables only the object that is associated with that user. Each of these personalization objects is only visible during the user's session.<br /> <br /><h3>
Scenario
</h3>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. The metrics are dynamic and adjustable to the person who uses them. For example, the 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 easily know how he or she is doing towards the monthly goal, as the indicator is automatically tailored to the goals of each salesperson. <br />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 would be an object in the cube, the indicator would not be personalized to each user.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services Personalization Extensions Sample uses the following features of SQL Server 2008 Analysis Services (SSAS).<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AdventureWorks </td><td> ADOMD.NET Server, MDX </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample databases: the AdventureWorks data warehouse and the AdventureWorks database. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i>. </li><li> Updated versions of the following SQL Server samples: Analysis Services samples and SQL Server Database Engine samples. You can download these samples from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i>. You also need .NET Framework SDK 3.5 or Microsoft Visual Studio 2008 installed. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b></li>
</ul> <br /><h3>
Building the Sample
</h3>The Analysis Services Personalization Extensions Sample is composed of one binary file, ASPE.dll.<br />If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2008 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft Visual Studio 2008</b>, select <b>Visual Studio Tools</b>, and then click <b>Visual Studio 2008 Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the Analysis Services Personalization Extensions Sample
</h6> <br /><ol>
<li>Rename SampleKey.snk to ASPE.snk and move the file to the same location where ASPE.sln is.</li><li>Compile ASPE.dll by using: </li><li> Visual Studio 2008 and the ASPE.sln file. — or —</li><li> Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;3.5. Change directory to the location where the solution file ASPE.sln is located. Run a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug ASPE.sln</span> You can use other MSBuild build options depending on your needs.</li>
</ol> <br /><h3>
Deploying the Sample
</h3>To deploy the Analysis Services Personalization Extensions sample, you must add the assembly that you built in the previous procedure to a running instance of Analysis Services.<br /> <br /><h6>
To add ASPE.dll assembly to a running instance of Analysis Services
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the instance of Analysis Services.<i>Localhost</i> is assumed as the default instance for this sample. Replace <i>localhost</i> in with the name of the instance that you have selected.</li><li>At the server level, open the <b>Assemblies</b> 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 <b>Delete.</b> Continue following the steps on the screen.</li><li>Right-click <b>Assemblies</b> and select <b>New Assembly</b>.</li><li>In the <b>Register Server Assembly</b> dialog box, select the following options:</li><li> For <b>Type</b>, select <b>.NET Assembly</b>. </li><li> For <b>Filename</b>, click the browse button <b><a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=%u2026&amp;referringTitle=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample">…</a></b> and find the ASPE.dll file in your project folder under <b>bin/debug</b> folders. </li><li> For <b>Permissions</b>, select <b>Unrestricted</b>. </li><li> For <b>Impersonation</b>, select <b>Use the Service Account</b>. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>At the server level, open the <b>Assemblies</b> folder and verify the ASPE assembly is listed.</li><li>To enable the correct management of all events, open SQL Server Configuration Manager, select <b>SQL Server Services</b>, and then select the <b>SQL Server Analysis Services</b> row. Click the restart button to restart the service </li>
</ol><h3>
Preparing the Environment to Test the Sample
</h3>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.<br /> <br /><h6>
To add three users to your current system
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Right-click the <b>Users</b> folder and select <b>New User</b>.</li><li>In the <b>New User</b> dialog box, select the following options:</li><li> For <b>User name</b>, type <b>user1</b>. </li><li> For <b>Password</b>, type a strong password that meets your company standards. </li><li> For <b>Confirm password</b>, re-type your selected password. </li><li> Clear the <b>User must change password at next logon</b> check box. </li><li> Select the <b>Password never expires</b> check box. </li><li>Repeat step 4 for <b>user2</b> and <b>user3</b>.</li>
</ol><h6>
To verify Adventure Works DW database is deployed and contains Adventure Works cube
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server name</b>, <i>localhost</i>.</li><li>Expand the <b>Databases</b> node and verify that the <b>Adventure Works DW</b> database exists.</li><li>Expand the <b>Adventure Works DW</b> node, expand the <b>Cubes</b> node, and verify that the <b>Adventure Works</b> cube exists.</li><li>Right-click the <b>Adventure Works</b> cube and select <b>Properties</b>. Verify that the cube <b>State</b> is <b>Processed</b>. </li><li>If any one of the previous steps cannot be completed, see the Books Online topic, <a href="http://go.microsoft.com/fwlink/?LinkId=83253" class="externalLink">Running Setup to Install AdventureWorks Sample Databases and Samples<span class="externalLinkIcon"></span></a>, in the MSDN Library.</li>
</ol><h6>
To add a role for the new users and give them access to the cube and dimensions
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server Name</b>, <i>localhost</i>. </li><li>Expand the <b>Databases</b> node, and then expand the <b>Adventure Works DW</b> database.</li><li>Right-click <b>Roles</b>, and then select <b>New role</b>.</li><li>In the <b>Create Role</b> dialog box, click the <b>General</b> page, and select the following options:</li><li> For <b>Role name</b>, type <b>ASPE Test Users</b>. </li><li> Select the <b>Read definition</b> check box. </li><li> Clear the <b>Full control (Administrator)</b> and <b>Process database</b> check boxes. </li><li>Click the <b>Membership</b> page, and select the following options:</li><li> Click <b>Add</b>. </li><li> In the <b>Select Users or Groups</b> window, for <b>Enter the object names to select</b>, type <b>user1; user2; user3</b>. </li><li> Click <b>Check Names</b>. The values should now appear underlined, with the server or domain name in front of each name. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>Click the <b>Data Sources</b> page. In the <b>Access</b> column for the <b>Adventure Works DW</b> row, select <b>Read</b>.</li><li>Click the <b>Cubes</b> page, and select the following options for the <b>Adventure Works</b> row:</li><li> In the <b>Access</b> column, select <b>Read</b>. </li><li> In the <b>Local Cube/Drillthrough Access</b> column, select <b>Drillthrough and Local Cube</b>. Click <b>OK</b> to accept the message. </li><li> In the <b>Process</b> column, select the check box. </li><li>Click the <b>Dimensions</b> page. For each of the rows in <b>Dimensions</b>, select the <b>Process</b> column check box.</li><li>Click <b>OK</b>, and then wait until the command is processed and the new role is created.</li>
</ol><h3>
Testing the Sample
</h3>Testing the sample demonstrates that new personalization objects are created in different user contexts and that those objects are associated with the user profile.<br /> <br /><h6>
To verify your context
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select the Adventure Works DW database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the Adventure Works cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node. </li><li>Expand the <b>Internet Sales</b> node, and verify that there is no <b>ISV_1</b> folder under this node. </li><li>Expand the <b>Geography</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li><li>Expand the <b>Product</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li>
</ol><h6>
To verify the context for user1
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user1</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user1 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if it is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, and then expand the <b>Internet Sales</b> node to see the <b>ISV_1</b> folder.Unlike your user context, user1 has an *ISV_1 *folder under the <b>Internet Sales</b> node.</li><li>Expand the <b>ISV_1</b> folder, expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Operations</b> folder.Notice that the <b>Operations</b> folder contains the <b>Average Item Freight Cost</b> member.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV_1 - Western Coast</b> set.Unlike your user context, user1 does have access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Operations</b> folder to see the <b>Touring Bikes</b> set.Unlike your user context, user1 has access to the <b>Touring Bikes</b> set.</li>
</ol><h6>
To verify the context for user2
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user2</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user2 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select the <b>Adventure Works DW</b> database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is also visible to this user. </li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user1 has an <b>ISV_1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Finance</b> folder to see the *Rate Difference *member.Notice that for user2 only, the <b>Exchange Rates</b> measure group has an <b>ISV_1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV_1 - Western Coast</b> set.Notice that user2, just like user1, has access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Finance</b> folder to see the <b>Mountain Bikes</b> set.While user2 has access to the <b>Mountain Bikes</b> set, user2 does not have access to the <b>Touring Bikes</b> set in the <b>Operations</b> folder. Only user1 has access to the <b>Touring Bikes</b> set<b>.</b></li>
</ol><h6>
To verify the context for user3
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user3</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user3 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder. Notice that the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user1 has an <b>ISV_1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user2 has an <b>ISV_1</b> folder in the <b>Exchange Rates</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Orders</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>Discount per Order</b> member.Notice that for user3 only, the <b>Reseller Orders</b> measure group has an <b>ISV_1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder to see <b>ISV_1 - Western Coast</b> set.user3, just like user1 and user2, has access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>All Terrain Bikes</b> set.While user3 has access to the <b>All Terrain Bikes</b> set, user3 does not have access to the <b>Touring Bikes</b> set in the <b>Operation</b> folder. Only user1 has access to the <b>Touring Bikes</b> set. User3 also has access to the <b>Mountain Bikes</b> set in the <b>Finance</b> folder. It is user2 who has no access to the <b>All Terrain Bikes</b> set.</li>
</ol><h3>
Troubleshooting the Sample
</h3>Use the following set of procedures to troubleshoot the Analysis Services Personalization Extensions sample.<br /> <br /><h6>
To define debug breakpoints in the code
</h6> <br /><ol>
<li>In Visual Studio 2008, open ASPE.sln.</li><li>Open the source code for the <i>ASClientExtensions.cs</i> source file, and then set a breakpoint on the opening brace of the <i>ASClientExtensions</i> constructor.</li><li>Open the source code for the <i>SessionMgr.cs</i> source file, and then set the following breakpoints:</li><li> Set a breakpoint on the opening brace of the <i>SessionMgr</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>CubeOpened</i> method. </li><li>Open the source code for the <i>AuthoringAndManagement.cs</i> source file, and then set the following breakpoints.</li><li> Set a breakpoint on the opening brace of the <i>AuthoringAndManagement</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>DefineMembers</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineSets</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineKPIs</i> method. </li>
</ol><h6>
To attach to the running instance of Analysis Services
</h6> <br /><ol>
<li>In the menu bar, select <b>Debug</b>, and then select <b>Attach to process</b>.</li><li>In the <b>Available Processes</b> pane, browse to find <b>msmdsrv.exe</b>, and then select it.</li><li>Click <b>Attach</b>, and then wait until the debugger attaches to the running process.</li>
</ol><h6>
To run through the breakpoints
</h6> <br /><ol>
<li>Repeat all the steps in the procedure, <b>To verify the context for user1</b>.Notice that SQL Server Management Studio does not immediately appear. Instead, Visual Studio opens.</li><li>To see the sequence of events, press F11 repeatedly.If there are no more events, check SQL Server Management Studio to continue with the steps in the procedure, <b>To verify the context for user1</b>.</li>
</ol><h3>
Removing the Sample
</h3>Use the following procedure to remove the Analysis Services Personalization Extensions Sample.<br /> <br /><h6>
To remove the roles and assembly from the current Analysis Services instance
</h6> <br /><ol>
<li>Open SQL Server Management Studio. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i></li><li>Expand the <b>Databases</b> node, and then expand <b>Adventure Works DW</b> database.</li><li>Expand <b>Roles</b>, right-click <b>ASPE Test Users</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>At server level, expand <b>Assemblies</b>, right-click <b>ASPE</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>Close SQL Server Management Studio.</li><li>Restart the service</li>
</ol><h6>
To remove the user created for this sample
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Expand the <b>Users</b> folder.</li><li>Remove user1, user2, user3 by right-clicking each user, selecting <b>Delete</b>, and then clicking <b>OK</b>.</li>
</ol><h6>
To remove the ASPE sample
</h6> <br /><ul>
<li>From your solution folder, in the ASPE folder, remove the <b>bin</b> and <b>obj</b> folders. &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>cmslydiaFri, 27 Mar 2009 03:18:23 GMTUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Sample 20090327031823AUpdated Wiki: SS2008!Readme for AS Simple Samplehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme for AS Simple Sample&version=10<div class="wikidoc">
<h2>
Readme_AS Simple Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br /> 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. <br />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.<br />Default location: C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\Programmability\AMO\AS Simple Sample<br />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).<br />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.<br />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.<br />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.<br /> <br /><h3>
Scenario
</h3>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.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services sample uses the following features.<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AdventureWorks </td><td> AMO, ADOMD.NET Client, ADOMD.NET Server </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have Microsoft SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample databases: the <b>AdventureWorksDW</b> data warehouse and the AdventureWorks database. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. </li><li> Updated versions of the following SQL Server samples: Analysis Services samples and SQL Server Database Engine samples. You can download these samples from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> web site. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i>. 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 <b>Installing the .NET Framework SDK</b> in SQL Server Books Online.</li>
</ul> <br /><h3>
Building the Sample
</h3>If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol>The AS Simple Sample is composed of three different binaries: <br /> <br /><ul>
<li> 'Simple Sample Stored Procedures.dll' </li><li> 'Simple Sample AMO Access.exe' </li><li> '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.</li>
</ul> <br /><h6>
To build the Simple Sample Analysis Services sample
</h6> <br /><ol>
<li>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&nbsp;2.0, by executing a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug &quot;CS/StoredProcedures.sln&quot;</span> You can use other MSBuild build options depending on your needs.</li><li>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&nbsp;2.0, by executing a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug &quot;CS/ServerAdmin.sln&quot;</span> You can use other MSBuild build options depending on your needs.</li><li>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&nbsp;2.0, by executing a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug &quot;CS/ClientAccess.sln&quot;</span> You can use other MSBuild build options depending on your needs.</li>
</ol><h3>
Running the Sample
</h3> <br /><h6>
To run the Simple Sample Analysis Services sample
</h6> <br /><ol>
<li>Build the 'Simple Sample' database using 'Simple Sample AMO Access'.</li><li>In Visual Studio 2005, with ServerAdmin solution opened, press <b>F5</b>.— or —In Visual Studio 2005, on the <b>Debug</b> menu, click <b>Start</b>.— 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): <span class="codeInline">&quot;Simple Sample AMO Access.exe&quot;</span> </li><li>Execute the suggested steps in the sample interface.</li><li>In Visual Studio 2005, with ClientAccess solution opened, press <b>F5</b>.— or —In Visual Studio 2005, on the <b>Debug</b> menu, click <b>Start</b>.— 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): <span class="codeInline">&quot;Simple Sample ADOMD ClientAccess.exe&quot;</span> </li><li>Connect to a server and explore the user objects. &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ol>
</div>leiluThu, 19 Mar 2009 06:44:15 GMTUpdated Wiki: SS2008!Readme for AS Simple Sample 20090319064415AUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Samplehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme for Analysis Services Personalization Extensions Sample&version=9<div class="wikidoc">
<h2>
Readme_Analysis Services Personalization Extensions Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br />This sample works only with SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2008.<br />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.<br />The Analysis Services Personalization Extensions sample dynamically creates a different object for three different users. For each user connection, the sample enables only the object that is associated with that user. Each of these personalization objects is only visible during the user's session.<br /> <br /><h3>
Scenario
</h3>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. The metrics are dynamic and adjustable to the person who uses them. For example, the 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 easily know how he or she is doing towards the monthly goal, as the indicator is automatically tailored to the goals of each salesperson. <br />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 would be an object in the cube, the indicator would not be personalized to each user.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services Personalization Extensions Sample uses the following features of SQL Server 2008 Analysis Services (SSAS).<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AdventureWorks </td><td> ADOMD.NET Server, MDX </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample databases: the AdventureWorks data warehouse and the AdventureWorks database. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i>. </li><li> Updated versions of the following SQL Server samples: Analysis Services samples and SQL Server Database Engine samples. You can download these samples from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i>. 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 <b>Installing the .NET Framework SDK</b></li>
</ul> <br /><h3>
Building the Sample
</h3>The Analysis Services Personalization Extensions Sample is composed of one binary file, ASPE.dll.<br />If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the Analysis Services Personalization Extensions Sample
</h6> <br /><ol>
<li>Rename SampleKey.snk to ASPE.snk and move the file to the same location where ASPE.sln is.</li><li>Compile ASPE.dll by using: </li><li> Visual Studio 2005 and the ASPE.sln file. — or —</li><li> Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0. Change directory to the location where the solution file ASPE.sln is located. Run a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug ASPE.sln</span> You can use other MSBuild build options depending on your needs.</li>
</ol> <br /><h3>
Deploying the Sample
</h3>To deploy the Analysis Services Personalization Extensions sample, you must add the assembly that you built in the previous procedure to a running instance of Analysis Services.<br /> <br /><h6>
To add ASPE.dll assembly to a running instance of Analysis Services
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the instance of Analysis Services.<i>Localhost</i> is assumed as the default instance for this sample. Replace <i>localhost</i> in with the name of the instance that you have selected.</li><li>At the server level, open the <b>Assemblies</b> 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 <b>Delete.</b> Continue following the steps on the screen.</li><li>Right-click <b>Assemblies</b> and select <b>New Assembly</b>.</li><li>In the <b>Register Server Assembly</b> dialog box, select the following options:</li><li> For <b>Type</b>, select <b>.NET Assembly</b>. </li><li> For <b>Filename</b>, click the browse button <b><a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=%u2026&amp;referringTitle=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample">…</a></b> and find the ASPE.dll file in your project folder under <b>bin/debug</b> folders. </li><li> For <b>Permissions</b>, select <b>Unrestricted</b>. </li><li> For <b>Impersonation</b>, select <b>Use the Service Account</b>. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>At the server level, open the <b>Assemblies</b> folder and verify the ASPE assembly is listed.</li><li>To enable the correct management of all events, open SQL Server Configuration Manager, select <b>SQL Server Services</b>, and then select the <b>SQL Server Analysis Services</b> row. Click the restart button to restart the service </li>
</ol><h3>
Preparing the Environment to Test the Sample
</h3>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.<br /> <br /><h6>
To add three users to your current system
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Right-click the <b>Users</b> folder and select <b>New User</b>.</li><li>In the <b>New User</b> dialog box, select the following options:</li><li> For <b>User name</b>, type <b>user1</b>. </li><li> For <b>Password</b>, type a strong password that meets your company standards. </li><li> For <b>Confirm password</b>, re-type your selected password. </li><li> Clear the <b>User must change password at next logon</b> check box. </li><li> Select the <b>Password never expires</b> check box. </li><li>Repeat step 4 for <b>user2</b> and <b>user3</b>.</li>
</ol><h6>
To verify Adventure Works DW database is deployed and contains Adventure Works cube
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server name</b>, <i>localhost</i>.</li><li>Expand the <b>Databases</b> node and verify that the <b>Adventure Works DW</b> database exists.</li><li>Expand the <b>Adventure Works DW</b> node, expand the <b>Cubes</b> node, and verify that the <b>Adventure Works</b> cube exists.</li><li>Right-click the <b>Adventure Works</b> cube and select <b>Properties</b>. Verify that the cube <b>State</b> is <b>Processed</b>. </li><li>If any one of the previous steps cannot be completed, see the Books Online topic, <a href="http://go.microsoft.com/fwlink/?LinkId=83253" class="externalLink">Running Setup to Install AdventureWorks Sample Databases and Samples<span class="externalLinkIcon"></span></a>, in the MSDN Library.</li>
</ol><h6>
To add a role for the new users and give them access to the cube and dimensions
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server Name</b>, <i>localhost</i>. </li><li>Expand the <b>Databases</b> node, and then expand the <b>Adventure Works DW</b> database.</li><li>Right-click <b>Roles</b>, and then select <b>New role</b>.</li><li>In the <b>Create Role</b> dialog box, click the <b>General</b> page, and select the following options:</li><li> For <b>Role name</b>, type <b>ASPE Test Users</b>. </li><li> Select the <b>Read definition</b> check box. </li><li> Clear the <b>Full control (Administrator)</b> and <b>Process database</b> check boxes. </li><li>Click the <b>Membership</b> page, and select the following options:</li><li> Click <b>Add</b>. </li><li> In the <b>Select Users or Groups</b> window, for <b>Enter the object names to select</b>, type <b>user1; user2; user3</b>. </li><li> Click <b>Check Names</b>. The values should now appear underlined, with the server or domain name in front of each name. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>Click the <b>Data Sources</b> page. In the <b>Access</b> column for the <b>Adventure Works DW</b> row, select <b>Read</b>.</li><li>Click the <b>Cubes</b> page, and select the following options for the <b>Adventure Works</b> row:</li><li> In the <b>Access</b> column, select <b>Read</b>. </li><li> In the <b>Local Cube/Drillthrough Access</b> column, select <b>Drillthrough and Local Cube</b>. Click <b>OK</b> to accept the message. </li><li> In the <b>Process</b> column, select the check box. </li><li>Click the <b>Dimensions</b> page. For each of the rows in <b>Dimensions</b>, select the <b>Process</b> column check box.</li><li>Click <b>OK</b>, and then wait until the command is processed and the new role is created.</li>
</ol><h3>
Testing the Sample
</h3>Testing the sample demonstrates that new personalization objects are created in different user contexts and that those objects are associated with the user profile.<br /> <br /><h6>
To verify your context
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select the Adventure Works DW database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the Adventure Works cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node. </li><li>Expand the <b>Internet Sales</b> node, and verify that there is no <b>ISV_1</b> folder under this node. </li><li>Expand the <b>Geography</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li><li>Expand the <b>Product</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li>
</ol><h6>
To verify the context for user1
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user1</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user1 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if it is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, and then expand the <b>Internet Sales</b> node to see the <b>ISV_1</b> folder.Unlike your user context, user1 has an *ISV_1 *folder under the <b>Internet Sales</b> node.</li><li>Expand the <b>ISV_1</b> folder, expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Operations</b> folder.Notice that the <b>Operations</b> folder contains the <b>Average Item Freight Cost</b> member.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV_1 - Western Coast</b> set.Unlike your user context, user1 does have access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Operations</b> folder to see the <b>Touring Bikes</b> set.Unlike your user context, user1 has access to the <b>Touring Bikes</b> set.</li>
</ol><h6>
To verify the context for user2
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user2</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user2 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select the <b>Adventure Works DW</b> database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is also visible to this user. </li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user1 has an <b>ISV_1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Finance</b> folder to see the *Rate Difference *member.Notice that for user2 only, the <b>Exchange Rates</b> measure group has an <b>ISV_1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV_1 - Western Coast</b> set.Notice that user2, just like user1, has access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Finance</b> folder to see the <b>Mountain Bikes</b> set.While user2 has access to the <b>Mountain Bikes</b> set, user2 does not have access to the <b>Touring Bikes</b> set in the <b>Operations</b> folder. Only user1 has access to the <b>Touring Bikes</b> set<b>.</b></li>
</ol><h6>
To verify the context for user3
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user3</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user3 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder. Notice that the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user1 has an <b>ISV_1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user2 has an <b>ISV_1</b> folder in the <b>Exchange Rates</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Orders</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>Discount per Order</b> member.Notice that for user3 only, the <b>Reseller Orders</b> measure group has an <b>ISV_1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder to see <b>ISV_1 - Western Coast</b> set.user3, just like user1 and user2, has access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>All Terrain Bikes</b> set.While user3 has access to the <b>All Terrain Bikes</b> set, user3 does not have access to the <b>Touring Bikes</b> set in the <b>Operation</b> folder. Only user1 has access to the <b>Touring Bikes</b> set. User3 also has access to the <b>Mountain Bikes</b> set in the <b>Finance</b> folder. It is user2 who has no access to the <b>All Terrain Bikes</b> set.</li>
</ol><h3>
Troubleshooting the Sample
</h3>Use the following set of procedures to troubleshoot the Analysis Services Personalization Extensions sample.<br /> <br /><h6>
To define debug breakpoints in the code
</h6> <br /><ol>
<li>In Visual Studio 2005, open ASPE.sln.</li><li>Open the source code for the <i>ASClientExtensions.cs</i> source file, and then set a breakpoint on the opening brace of the <i>ASClientExtensions</i> constructor.</li><li>Open the source code for the <i>SessionMgr.cs</i> source file, and then set the following breakpoints:</li><li> Set a breakpoint on the opening brace of the <i>SessionMgr</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>CubeOpened</i> method. </li><li>Open the source code for the <i>AuthoringAndManagement.cs</i> source file, and then set the following breakpoints.</li><li> Set a breakpoint on the opening brace of the <i>AuthoringAndManagement</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>DefineMembers</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineSets</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineKPIs</i> method. </li>
</ol><h6>
To attach to the running instance of Analysis Services
</h6> <br /><ol>
<li>In the menu bar, select <b>Debug</b>, and then select <b>Attach to process</b>.</li><li>In the <b>Available Processes</b> pane, browse to find <b>msmdsrv.exe</b>, and then select it.</li><li>Click <b>Attach</b>, and then wait until the debugger attaches to the running process.</li>
</ol><h6>
To run through the breakpoints
</h6> <br /><ol>
<li>Repeat all the steps in the procedure, <b>To verify the context for user1</b>.Notice that SQL Server Management Studio does not immediately appear. Instead, Visual Studio opens.</li><li>To see the sequence of events, press F11 repeatedly.If there are no more events, check SQL Server Management Studio to continue with the steps in the procedure, <b>To verify the context for user1</b>.</li>
</ol><h3>
Removing the Sample
</h3>Use the following procedure to remove the Analysis Services Personalization Extensions Sample.<br /> <br /><h6>
To remove the roles and assembly from the current Analysis Services instance
</h6> <br /><ol>
<li>Open SQL Server Management Studio. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i></li><li>Expand the <b>Databases</b> node, and then expand <b>Adventure Works DW</b> database.</li><li>Expand <b>Roles</b>, right-click <b>ASPE Test Users</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>At server level, expand <b>Assemblies</b>, right-click <b>ASPE</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>Close SQL Server Management Studio.</li><li>Restart the service</li>
</ol><h6>
To remove the user created for this sample
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Expand the <b>Users</b> folder.</li><li>Remove user1, user2, user3 by right-clicking each user, selecting <b>Delete</b>, and then clicking <b>OK</b>.</li>
</ol><h6>
To remove the ASPE sample
</h6> <br /><ul>
<li>From your solution folder, in the ASPE folder, remove the <b>bin</b> and <b>obj</b> folders. &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>libinzhaoThu, 19 Mar 2009 04:03:18 GMTUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Sample 20090319040318AUpdated Wiki: SS2008!BackupAndRestorehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!BackupAndRestore&version=9<div class="wikidoc">
<h2>
Readme_Backup and Restore Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br /> 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. <br />The Backup and Restore sample lets you use Analysis Management Objects (AMO) to connect to a server that is running Microsoft SQL Server Analysis Services. The sample creates a new empty database, completes a backup of that database, deletes the database, restores the database from the backup, and deletes that database.<br /> <br /><h3>
Scenario
</h3>This sample shows you how to back up and restore your Analysis Services databases programmatically.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services sample uses the following items.<br /> <br /><table>
<tr>
<th> Application area </th><th> Features </th>
</tr><tr>
<td> AMOAdventureWorks</td><td> AMO Objects </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you must have the following software installed:<br /> <br /><ul>
<li> .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b> in SQL Server Books Online. </li><li> Analysis Services </li><li> Business Intelligence Development Studio <b>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.</b></li><li> The <b>AdventureWorks AS</b> database. You can download this sample database from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. After your sample has been successfully compiled, you have to access one of the Analysis Services sample databases to test your program. We recommend that you use the <b>AdventureWorks</b> sample database that is provided with SQL Server.</li>
</ul> <br /><h5>
User Permissions for Backup
</h5>For each backup file, the user who runs the backup command must have permission to write to the backup location specified. Also, the user must have one of the following roles: a member of a server role for the Analysis Services instance, or a member of a database role with Full Control (Administrator) permissions on the database to be backed up.<br /> <br /><h5>
User Permissions for Restore
</h5>For each backup file, the user who runs the restore command must have permission to read from the backup location specified. To restore an Analysis Services database that is not installed on the server, the user must also be a member of the server role for that Analysis Services instance. To overwrite an Analysis Services database, the user must have one of the following roles: a member of the server role for the Analysis Services instance, or a member of a database role with Full Control (Administrator) permissions on the database to be restored.<br /> <br /><table>
<tr>
<th> Note: </th>
</tr><tr>
<td> After restoring an existing database, the user who restored the database might lose access to the restored database. This loss of access can occur if, at the time that the backup was performed, the user was not a member of the server role or was not a member of the database role with Full Control (Administrator) permissions. </td>
</tr>
</table> <br /> <br /> <br /><h3>
Building the Sample
</h3>If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the Backup and Restore sample
</h6> <br /><ul>
<li>Build the sample by using Visual Studio 2005 and the provided Visual Studio solution.— or —</li><li>Build the sample using Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0, and run a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug CS/BackupAndRestore.sln</span> Other Microsoft MSBuild build options can be used depending on your needs.</li>
</ul><h3>
Running the Sample
</h3> <br /><h6>
To run the Backup and Restore sample
</h6> <br /><ul>
<li>In Visual Studio 2005, press <b>F5</b>.— or —</li><li>In Visual Studio 2005, click <b>Start</b> on the <b>Debug</b> menu.— or —</li><li>At a command prompt, run a command similar to the following: <span class="codeInline">CS\BackupAndRestore\bin\Debug\BackupAndRestore.exe</span> The path might vary depending on the options that were used to compile the sample and the starting folder when at command prompt.After you run the sample, the backup file of the temporary database created by the sample will be located at <i>&lt;system</i>drive&gt;<i>:\backup_</i>file<i>_generated_</i>by<i>_AMO_</i>sample<i>_code</i>.abf.</li>
</ul><h3>
See Also
</h3> <br /><h6>
Tasks
</h6><a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21DisplayObjectsName&amp;referringTitle=SS2008%21BackupAndRestore">Readme_DisplayObjectNames Sample</a> <br /><h6>
Concepts
</h6><i>Analysis Services Multidimensional Database Samples</i> <br /><h6>
Help and Information
</h6><ul>
<li>Getting SQL Server 2008 Assistance* &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>libinzhaoThu, 19 Mar 2009 03:51:39 GMTUpdated Wiki: SS2008!BackupAndRestore 20090319035139AUpdated Wiki: SS2008!DisplayObjectsNamehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!DisplayObjectsName&version=10<div class="wikidoc">
<h2>
Readme_DisplayObjectNames Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br /> 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. <br />With the DisplayObjectNames sample, you can use Analysis Management Objects (AMO) objects to connect to a server that is running Microsoft SQL Server Analysis Services and then display the names of some of the AMO objects.<br /> <br /><h3>
Scenario
</h3>This sample shows how to create a connection to an Analysis Services server by using AMO objects.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services sample uses the following items.<br /> <br /><table>
<tr>
<th> Application area </th><th> Features </th>
</tr><tr>
<td> AMOAdventureWorks</td><td> AMO Objects </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you must have the following software installed:<br /> <br /><ul>
<li> .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b> in SQL Server Books Online. </li><li> Analysis Services </li><li> Business Intelligence Development Studio <b>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.</b></li><li> The <b>AdventureWorks AS</b> database. You can download this sample database from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. </li><li> The DisplayObjectNames sample. You can download this sample from the <b>Microsoft SQL Server Samples and Community Projects</b> Web site at <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">http://www.codeplex.com<span class="externalLinkIcon"></span></a>. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. After your sample has been successfully compiled, you will have to access one of the Analysis Services sample databases to test your program. We recommend that you use the <b>AdventureWorks</b> sample database that is provided with SQL Server.</li>
</ul> <br /><h3>
Building the Sample
</h3>If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the DisplayObjectNames sample
</h6> <br /><ul>
<li>Build the sample by using Visual Studio 2005 and the provided Visual Studio solution.— or —</li><li>Build the sample using Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0, and run a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug CS/DisplayObjectNames.sln</span> Other MSBuild build options can be used depending on your needs.</li>
</ul><h3>
Running the Sample
</h3> <br /><h6>
To run the Display Object Names sample
</h6> <br /><ul>
<li>At a command prompt, run a command similar to the following: <span class="codeInline">CS\DisplayObjectNames\bin\Debug\DisplayObjectNames.exe localhost</span> The path might vary depending on the options that are used to compile the sample and your starting folder.</li>
</ul><h3>
See Also
</h3> <br /><h6>
Other Resources
</h6><b>Readme for AMOBrowser sample</b> <b>SQL Server Analysis Services Samples</b> <br /><h6>
Help and Information
</h6><ul>
<li>Getting SQL Server 2008 Assistance* &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>libinzhaoThu, 19 Mar 2009 03:28:57 GMTUpdated Wiki: SS2008!DisplayObjectsName 20090319032857AUpdated Wiki: SS2008!AMOBrowserhttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!AMOBrowser&version=5<div class="wikidoc">
<h2>
Readme for AMOBrowser Sample
</h2> <br /> [This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] <br /> <br /> 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. <br />The AMOBrowser sample lets you use Analysis Management Objects (AMO) objects to connect to a Microsoft SQL Server Analysis Services server, and then browse different AMO objects and their properties.<br />AMOBrowser uses a TreeView to display the AMO hierarchy and a PropertyGrid to display the properties of a selected object.<br /> <br /><h3>
Scenario
</h3>This sample shows you how to create a connection to an Analysis Services server by using AMO objects. The sample also shows you how to grab all AMO objects, together with their corresponding properties.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services sample uses the following items:<br /> <br /><table>
<tr>
<th> Application area </th><th> Features </th>
</tr><tr>
<td> AMOAdventureWorks</td><td> AMO Objects </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have the following software installed:<br /> <br /><ul>
<li> .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b> in SQL Server Books Online. </li><li> Analysis Services </li><li> Business Intelligence Development Studio <b>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.</b></li><li> The <b>AdventureWorks AS</b> database. You can download this sample database from the <b>Microsoft SQL Server Samples and Community Projects</b> Web site at <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">http://www.codeplex.com/sqlserversamples<span class="externalLinkIcon"></span></a>. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. </li><li> The AMOBrowser sample. You can download this sample from the <b>Microsoft SQL Server Samples and Community Projects</b> Web site at <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">http://www.codeplex.com/sqlserversamples<span class="externalLinkIcon"></span></a>. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. After your sample has been successfully compiled, you will have to access one of the Analysis Services sample databases to test your program. We recommend that you use the <b>AdventureWorks</b> sample database that is provided with SQL Server.</li>
</ul> <br /><h3>
Building the Sample
</h3>If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the AMOBrowser sample
</h6> <br /><ul>
<li>Build the sample by using Visual Studio 2005 and the provided Visual Studio solution.— or —</li><li>Build the sample by using Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0, and executing a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug CS/AmoBrowser.sln</span> </li>
</ul><h3>
Running the Sample
</h3> <br /><h6>
To run the AMOBrowser sample
</h6> <br /><ul>
<li>In Visual Studio 2005, press <b>F5</b>. — or —</li><li>In Visual Studio 2005, on the <b>Debug</b> menu, click <b>Start</b>.— or —</li><li>At a command prompt, run a command similar to the following path: <span class="codeInline">CS\AmoBrowser\bin\Debug\AmoBrowser.exe</span> &#169; 2007 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>libinzhaoThu, 19 Mar 2009 03:18:33 GMTUpdated Wiki: SS2008!AMOBrowser 20090319031833AUpdated Wiki: SS2008!Readme_AMOAdventureWorkshttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme_AMOAdventureWorks&version=11<div class="wikidoc">
<h2>
Readme_AMOAdventureWorks Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br /> 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. <br />AMOAdventureWorks is a sample C# program that illustrates the use of the Analysis Management Objects (AMO) to create complex OLAP cubes.<br />Default location: C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\Programmability\AMO\AMOAdventureWorks<br /> <br /><h3>
Scenario
</h3>This sample creates a subset of the functionality of the AdventureWorks cube located in the AdventureWorks Analysis Services Project.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The SQL Server Analysis Services sample uses the following features.<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AMOAdventureWorks</td><td> AMO </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have Microsoft SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample database: the <b>AdventureWorksDW</b> data warehouse. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. </li><li> Updated versions of the following SQL Server samples: Analysis Services and SQL Server Database Engine. You can download these samples from the <b>Microsoft SQL Server Samples and Community Projects</b> Web site at <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">http://www.codeplex.com<span class="externalLinkIcon"></span></a>. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. You also must have .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b> in SQL Server Books Online.</li>
</ul> <br /><h3>
Building the Sample
</h3>If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the AMOAdventureWorks sample
</h6> <br /><ul>
<li>Compile the sample by using Visual Studio 2005 and the provided Visual Studio solution.— or —</li><li>Compile the sample using Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0, by executing a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug CS/AMOAdventureWorks.sln</span> Other MSBuild build options can be used depending on your needs.</li>
</ul><h3>
Running the Sample
</h3> <br /><h6>
To run the AMOAdventureWorks sample
</h6> <br /><ul>
<li>In Visual Studio 2005, press <b>F5</b>.— or —</li><li>In Visual Studio 2005, on the <b>Debug</b> menu, click <b>Start</b>.— or —</li><li>At a command prompt, use the change directory (CD) command to go to the folder where the sample was built. In that directory, run the following command: <span class="codeInline">AMOAdventureWorks.exe</span> </li>
</ul><h3>
See Also
</h3> <br /><h6>
Tasks
</h6><a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21DisplayObjectsName&amp;referringTitle=SS2008%21Readme_AMOAdventureWorks">Readme_DisplayObjectNames Sample</a> <br /><h6>
Other Resources
</h6><b>SQL Server Analysis Services Samples</b> <br /><h6>
Help and Information
</h6><ul>
<li>Getting SQL Server 2008 Assistance* &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>libinzhaoThu, 19 Mar 2009 02:56:25 GMTUpdated Wiki: SS2008!Readme_AMOAdventureWorks 20090319025625AUpdated Wiki: SS2008!Readme_AMOAdventureWorkshttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008!Readme_AMOAdventureWorks&version=10<div class="wikidoc">
<h2>
Readme_AMOAdventureWorks Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br /> 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. <br />AMOAdventureWorks is a sample C# program that illustrates the use of the Analysis Management Objects (AMO) to create complex OLAP cubes.<br />Default location: C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\Programmability\AMO\AMOAdventureWorks<br /> <br /><h3>
Scenario
</h3>This sample creates a subset of the functionality of the AdventureWorks cube located in the AdventureWorks Analysis Services Project.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The SQL Server Analysis Services sample uses the following features.<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AMOAdventureWorks</td><td> AMO </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have Microsoft SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample database: the <b>AdventureWorksDW</b> data warehouse, the <b>AdventureWorksAS</b> OLAP database, and the AdventureWorks database. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. </li><li> Updated versions of the following SQL Server samples: Analysis Services and SQL Server Database Engine. You can download these samples from the <b>Microsoft SQL Server Samples and Community Projects</b> Web site at <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">http://www.codeplex.com<span class="externalLinkIcon"></span></a>. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i> in SQL Server Books Online. You also must have .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework SDK</b> in SQL Server Books Online.</li>
</ul> <br /><h3>
Building the Sample
</h3>If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the AMOAdventureWorks sample
</h6> <br /><ul>
<li>Compile the sample by using Visual Studio 2005 and the provided Visual Studio solution.— or —</li><li>Compile the sample using Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0, by executing a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug CS/AMOAdventureWorks.sln</span> Other MSBuild build options can be used depending on your needs.</li>
</ul><h3>
Running the Sample
</h3> <br /><h6>
To run the AMOAdventureWorks sample
</h6> <br /><ul>
<li>In Visual Studio 2005, press <b>F5</b>.— or —</li><li>In Visual Studio 2005, on the <b>Debug</b> menu, click <b>Start</b>.— or —</li><li>At a command prompt, use the change directory (CD) command to go to the folder where the sample was built. In that directory, run the following command: <span class="codeInline">AMOAdventureWorks.exe</span> </li>
</ul><h3>
See Also
</h3> <br /><h6>
Tasks
</h6><a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21DisplayObjectsName&amp;referringTitle=SS2008%21Readme_AMOAdventureWorks">Readme_DisplayObjectNames Sample</a> <br /><h6>
Other Resources
</h6><b>SQL Server Analysis Services Samples</b> <br /><h6>
Help and Information
</h6><ul>
<li>Getting SQL Server 2008 Assistance* &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>libinzhaoWed, 18 Mar 2009 03:41:50 GMTUpdated Wiki: SS2008!Readme_AMOAdventureWorks 20090318034150AUpdated Wiki: Homehttp://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=Home&version=34<div class="wikidoc">
<a href="http://CodePlex.com/SqlServerSamples" class="externalLink">SQL Server Samples Portal Page<span class="externalLinkIcon"></span></a> &gt; SQL Server Analysis Services Product Samples<br /> <br />SQL Server Analysis Services provides, a unified and integrated view of all your business data as the foundation for all of your traditional reporting, online analytical processing (OLAP) analysis, Key Performance Indicator (KPI) scorecards, and data mining.<br /> <br />This project contains Analysis Services samples released with Microsoft SQL Server product. These samples are in the following three categories: Administrator, Data Mining, and Programmability. If you are interested in contributing Analysis Services samples, please let us know by posting in the developers' forum.<br /> <br />To download these samples click on the Releases tab (or click <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=MSFTASProdSamples" class="externalLink">here<span class="externalLinkIcon"></span></a>), optionally select another (older) release, then click on the Windows Installer package (MSI file) which matches the architecture of the installation computer.<br /> <br />For information about how to use CodePlex to access SQL Server samples, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=HowToUseCodePlex&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br />To download samples databases, click <a href="http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx" class="externalLink">here<span class="externalLinkIcon"></span></a> and then click the appropriate MSI file.<br />For release notes and brief descriptions of all the sample databases and code, including restrictions on SQL Express and Vista, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=SQLServerDatabasesandSamplesOverview&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br /><h3>
<b>Administrator</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Activity Viewer </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Activity%20Viewer&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Aggregation Manager Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme%20for%20Aggregation%20Manager%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Analysis Services Upgrade Verification Tool Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme%20for%20Analysis%20Services%20Upgrade%20Verification%20Tool%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> ASTrace Utility Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme%20for%20ASTrace%20Utility%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Command-line Utility Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme%20For%20Command-line%20Utility%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18652">SQL Server 2008 SR1</a> </td>
</tr>
</table> <br /> <br /><h3>
<b>Data Mining</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Data Mining Web Controls Library </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Data%20Mining%20Web%20Controls%20Library&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> SQL Server Plug-In Algorithms </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme%20for%20SQL%20Server%20Plug-In%20Algorithms&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr>
</table> <br /> <br /><h3>
<b>Extensibility</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Analysis Services Personalization Extensions Sample </td><td> n/a </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample&amp;referringTitle=Home">SS2008</a> </td>
</tr>
</table> <br /> <br /><h3>
<b>Programmability</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> AMOBrowser </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21AMOBrowser&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21AMOBrowser&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> BackupAndRestore </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21BackupAndRestore&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21BackupAndRestore&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> DisplayObjectsName </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21DisplayObjectsName&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21DisplayObjectsName&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> AS Simple Sample </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme%20for%20AS%20Simple%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21Readme%20for%20AS%20Simple%20Sample&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> AMOAdventureWorks </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2005%21Readme_AMOAdventureWorks&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://msftasprodsamples.codeplex.com/Wiki/View.aspx?title=SS2008%21Readme_AMOAdventureWorks&amp;referringTitle=Home">SS2008</a> </td>
</tr>
</table> <br /> <br /><b>Got questions? Want to contribute?</b> Check out the <a href="http://social.msdn.microsoft.com/Forums/en-us/sqlserversamples/threads" class="externalLink">SQL Server Community &amp; Samples Discussion Forum<span class="externalLinkIcon"></span></a>!<br />
</div>ReedMeFri, 06 Mar 2009 19:43:52 GMTUpdated Wiki: Home 20090306074352PUpdated Wiki: Homehttp://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=Home&version=33<div class="wikidoc">
<a href="http://CodePlex.com/SqlServerSamples" class="externalLink">SQL Server Samples Portal Page<span class="externalLinkIcon"></span></a> &gt; SQL Server Analysis Services Product Samples<br /> <br />SQL Server Analysis Services provides, a unified and integrated view of all your business data as the foundation for all of your traditional reporting, online analytical processing (OLAP) analysis, Key Performance Indicator (KPI) scorecards, and data mining.<br /> <br />This project contains Analysis Services samples released with Microsoft SQL Server product. These samples are in the following three categories: Administrator, Data Mining, and Programmability. If you are interested in contributing Analysis Services samples, please let us know by posting in the developers' forum.<br /> <br />To download these samples click on the Releases tab (or click <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=MSFTASProdSamples" class="externalLink">here<span class="externalLinkIcon"></span></a>), optionally select another (older) release, then click on the Windows Installer package (MSI file) which matches the architecture of the installation computer.<br /> <br />For information about how to use CodePlex to access SQL Server samples, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=HowToUseCodePlex&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br />To download samples databases, click <a href="http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx" class="externalLink">here<span class="externalLinkIcon"></span></a> and then click the appropriate MSI file.<br />For release notes and brief descriptions of all the sample databases and code, including restrictions on SQL Express and Vista, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=SQLServerDatabasesandSamplesOverview&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br /><h3>
<b>Administrator</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Activity Viewer </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Activity%20Viewer&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Aggregation Manager Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20Aggregation%20Manager%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Analysis Services Upgrade Verification Tool Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20Analysis%20Services%20Upgrade%20Verification%20Tool%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> ASTrace Utility Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20ASTrace%20Utility%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Command-line Utility Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20For%20Command-line%20Utility%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Release/ProjectReleases.aspx?ReleaseId=18652">SQL Server 2008 SR1</a> </td>
</tr>
</table> <br /> <br /><h3>
<b>Data Mining</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Data Mining Web Controls Library </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Data%20Mining%20Web%20Controls%20Library&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> SQL Server Plug-In Algorithms </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20SQL%20Server%20Plug-In%20Algorithms&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr>
</table> <br /> <br /><h3>
<b>Extensibility</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Analysis Services Personalization Extensions Sample </td><td> n/a </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample&amp;referringTitle=Home">SS2008</a> </td>
</tr>
</table> <br /> <br /><h3>
<b>Programmability</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> AMOBrowser </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21AMOBrowser&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> BackupAndRestore </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21BackupAndRestore&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21BackupAndRestore&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> DisplayObjectsName </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21DisplayObjectsName&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21DisplayObjectsName&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> AS Simple Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20AS%20Simple%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21Readme%20for%20AS%20Simple%20Sample&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> AMOAdventureWorks </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme_AMOAdventureWorks&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21Readme_AMOAdventureWorks&amp;referringTitle=Home">SS2008</a> </td>
</tr>
</table> <br /> <br /><b>Got questions? Want to contribute?</b> Check out the <a href="http://social.msdn.microsoft.com/Forums/en-us/sqlserversamples/threads" class="externalLink">SQL Server Community &amp; Samples Discussion Forum<span class="externalLinkIcon"></span></a>!<br />
</div>ReedMeThu, 29 Jan 2009 23:01:13 GMTUpdated Wiki: Home 20090129110113PUpdated Wiki: Homehttp://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=Home&version=32<div class="wikidoc">
<a href="http://CodePlex.com/SqlServerSamples" class="externalLink">SQL Server Samples Portal Page<span class="externalLinkIcon"></span></a> &gt; SQL Server Analysis Services Product Samples<br /> <br />SQL Server Analysis Services provides, a unified and integrated view of all your business data as the foundation for all of your traditional reporting, online analytical processing (OLAP) analysis, Key Performance Indicator (KPI) scorecards, and data mining.<br /> <br />This project contains Analysis Services samples released with Microsoft SQL Server product. These samples are in the following three categories: Administrator, Data Mining, and Programmability. If you are interested in contributing Analysis Services samples, please let us know by posting in the developers' forum.<br /> <br />To download these samples click on the Releases tab (or click <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=MSFTASProdSamples" class="externalLink">here<span class="externalLinkIcon"></span></a>), optionally select another (older) release, then click on the Windows Installer package (MSI file) which matches the architecture of the installation computer.<br /> <br />For information about how to use CodePlex to access SQL Server samples, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=HowToUseCodePlex&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br />To download samples databases, click <a href="http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx" class="externalLink">here<span class="externalLinkIcon"></span></a> and then click the appropriate MSI file.<br />For release notes and brief descriptions of all the sample databases and code, including restrictions on SQL Express and Vista, click <a href="http://www.codeplex.com/SqlServerSamples/Wiki/View.aspx?title=SQLServerDatabasesandSamplesOverview&amp;referringTitle=Home" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br /><h3>
<b>Administrator</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Activity Viewer </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Activity%20Viewer&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Aggregation Manager Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20Aggregation%20Manager%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Analysis Services Upgrade Verification Tool Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20Analysis%20Services%20Upgrade%20Verification%20Tool%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> ASTrace Utility Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20ASTrace%20Utility%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> Command-line Utility Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20For%20Command-line%20Utility%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Release/ProjectReleases.aspx?ReleaseId=18652">SQL Server 2008 Samples Refresh 1</a> </td>
</tr>
</table> <br /> <br /><h3>
<b>Data Mining</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Data Mining Web Controls Library </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Data%20Mining%20Web%20Controls%20Library&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> SQL Server Plug-In Algorithms </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20SQL%20Server%20Plug-In%20Algorithms&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr>
</table> <br /> <br /><h3>
<b>Extensibility</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> Analysis Services Personalization Extensions Sample </td><td> n/a </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample&amp;referringTitle=Home">SS2008</a> </td>
</tr>
</table> <br /> <br /><h3>
<b>Programmability</b>
</h3><table>
<tr>
<th> Sample </th><th> SQL Server 2005 </th><th> SQL Server 2008 </th>
</tr><tr>
<td> AMOBrowser </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21AMOBrowser&amp;referringTitle=Home">SS2005</a> </td><td> n/a </td>
</tr><tr>
<td> BackupAndRestore </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21BackupAndRestore&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21BackupAndRestore&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> DisplayObjectsName </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21DisplayObjectsName&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21DisplayObjectsName&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> AS Simple Sample </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme%20for%20AS%20Simple%20Sample&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21Readme%20for%20AS%20Simple%20Sample&amp;referringTitle=Home">SS2008</a> </td>
</tr><tr>
<td> AMOAdventureWorks </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme_AMOAdventureWorks&amp;referringTitle=Home">SS2005</a> </td><td> <a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008%21Readme_AMOAdventureWorks&amp;referringTitle=Home">SS2008</a> </td>
</tr>
</table> <br /> <br />
</div>carlrabelerSat, 15 Nov 2008 00:04:01 GMTUpdated Wiki: Home 20081115120401AUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Samplehttp://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2008!Readme for Analysis Services Personalization Extensions Sample&version=8<div class="wikidoc">
<h2>
Readme_Analysis Services Personalization Extensions Sample
</h2> <br /> 11/05/2008 21:36:06<br /> <br /> <br />This sample works only with SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2008.<br />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.<br />The Analysis Services Personalization Extensions sample dynamically creates a different object for three different users. For each user connection, the sample enables only the object that is associated with that user. Each of these personalization objects is only visible during the user's session.<br /> <br /><h3>
Scenario
</h3>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. The metrics are dynamic and adjustable to the person who uses them. For example, the 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 easily know how he or she is doing towards the monthly goal, as the indicator is automatically tailored to the goals of each salesperson. <br />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 would be an object in the cube, the indicator would not be personalized to each user.<br /> <br /><h3>
Languages
</h3>C#<br /> <br /><h3>
Features
</h3>The Analysis Services Personalization Extensions Sample uses the following features of SQL Server 2008 Analysis Services (SSAS).<br /> <br /><table>
<tr>
<th> Application Area </th><th> Features </th>
</tr><tr>
<td> AdventureWorks </td><td> ADOMD.NET Server, MDX </td>
</tr>
</table> <br /> <br /><h3>
Prerequisites
</h3>Before you run this sample, you should have SQL Server and the following SQL Server components installed:<br /> <br /><ul>
<li> SQL Server Database Engine </li><li> Analysis Services </li><li> SQL Server Management Studio </li><li> Business Intelligence Development Studio <b>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.</b></li><li> Updated versions of the following SQL Server sample databases: the AdventureWorks data warehouse and the AdventureWorks database. You can download these sample databases from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install sample databases, see <i>Installing SQL Server Samples and Sample Databases</i>. </li><li> Updated versions of the following SQL Server samples: Analysis Services samples and SQL Server Database Engine samples. You can download these samples from the <a href="http://go.microsoft.com/fwlink/?LinkId=85384" class="externalLink">Microsoft SQL Server Samples and Community Projects<span class="externalLinkIcon"></span></a> Web site. For more information about how to download and install samples, see <i>Installing SQL Server Samples and Sample Databases</i>. 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 <b>Installing the .NET Framework SDK</b></li>
</ul> <br /><h3>
Building the Sample
</h3>The Analysis Services Personalization Extensions Sample is composed of one binary file, ASPE.dll.<br />If you have not already created a strong name key file, generate the key file using the following instructions.<br /> <br /><h6>
To generate a strong name key file
</h6> <br /><ol>
<li>Open a Microsoft Visual Studio 2005 command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.-- or --Open a Microsoft .NET Framework command prompt. Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft .NET Framework SDK 2.0</b>, and then click <b>SDK Command Prompt</b>.</li><li>Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed. <b>Note: To determine the folder where samples are located, click the <b>Start</b> button, point to <b>All Programs</b>, point to <b>Microsoft SQL Server</b>, point to <b>Documentation and Tutorials</b>, and then click <b>Samples Directory</b>. If the default installation location was used, the samples are located in &lt;system_drive&gt;:\Program Files\Microsoft SQL Server\100\Samples.</b></li><li>At the command prompt, run the following command to generate the key file: <span class="codeInline">sn -k SampleKey.snk</span> <b>Important: For more information about the strong-name key pair, see &quot;Security Briefs: Strong Names and Security in the .NET Framework&quot; in the .NET Development Center on MSDN.</b></li>
</ol> <br /><h6>
To build the Analysis Services Personalization Extensions Sample
</h6> <br /><ol>
<li>Rename SampleKey.snk to ASPE.snk and move the file to the same location where ASPE.sln is.</li><li>Compile ASPE.dll by using: </li><li> Visual Studio 2005 and the ASPE.sln file. — or —</li><li> Microsoft MSBuild, which is included in the .NET Framework SDK&nbsp;2.0. Change directory to the location where the solution file ASPE.sln is located. Run a command similar to the following at a command prompt: <span class="codeInline">msbuild /nologo /verbosity:quiet /property:Configuration=Debug ASPE.sln</span> You can use other MSBuild build options depending on your needs.</li>
</ol> <br /><h3>
Deploying the Sample
</h3>To deploy the Analysis Services Personalization Extensions sample, you must add the assembly that you built in the previous procedure to a running instance of Analysis Services.<br /> <br /><h6>
To add ASPE.dll assembly to a running instance of Analysis Services
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the instance of Analysis Services.<i>Localhost</i> is assumed as the default instance for this sample. Replace <i>localhost</i> in with the name of the instance that you have selected.</li><li>At the server level, open the <b>Assemblies</b> 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 <b>Delete.</b> Continue following the steps on the screen.</li><li>Right-click <b>Assemblies</b> and select <b>New Assembly</b>.</li><li>In the <b>Register Server Assembly</b> dialog box, select the following options:</li><li> For <b>Type</b>, select <b>.NET Assembly</b>. </li><li> For <b>Filename</b>, click the browse button <b><a href="http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=%u2026&amp;referringTitle=SS2008%21Readme%20for%20Analysis%20Services%20Personalization%20Extensions%20Sample">…</a></b> and find the ASPE.dll file in your project folder under <b>bin/debug</b> folders. </li><li> For <b>Permissions</b>, select <b>Unrestricted</b>. </li><li> For <b>Impersonation</b>, select <b>Use the Service Account</b>. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>At the server level, open the <b>Assemblies</b> folder and verify the ASPE assembly is listed.</li><li>To enable the correct management of all events, open SQL Server Configuration Manager, select <b>SQL Server Services</b>, and then select the <b>SQL Server Analysis Services</b> row. Click the restart button to restart the service </li>
</ol><h3>
Preparing the Environment to Test the Sample
</h3>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.<br /> <br /><h6>
To add three users to your current system
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Right-click the <b>Users</b> folder and select <b>New User</b>.</li><li>In the <b>New User</b> dialog box, select the following options:</li><li> For <b>User name</b>, type <b>user1</b>. </li><li> For <b>Password</b>, type a strong password that meets your company standards. </li><li> For <b>Confirm password</b>, re-type your selected password. </li><li> Clear the <b>User must change password at next logon</b> check box. </li><li> Select the <b>Password never expires</b> check box. </li><li>Repeat step 4 for <b>user2</b> and <b>user3</b>.</li>
</ol><h6>
To verify Adventure Works DW database is deployed and contains Adventure Works cube
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server name</b>, <i>localhost</i>.</li><li>Expand the <b>Databases</b> node and verify that the <b>Adventure Works DW</b> database exists.</li><li>Expand the <b>Adventure Works DW</b> node, expand the <b>Cubes</b> node, and verify that the <b>Adventure Works</b> cube exists.</li><li>Right-click the <b>Adventure Works</b> cube and select <b>Properties</b>. Verify that the cube <b>State</b> is <b>Processed</b>. </li><li>If any one of the previous steps cannot be completed, see the Books Online topic, <a href="http://go.microsoft.com/fwlink/?LinkId=83253" class="externalLink">Running Setup to Install AdventureWorks Sample Databases and Samples<span class="externalLinkIcon"></span></a>, in the MSDN Library.</li>
</ol><h6>
To add a role for the new users and give them access to the cube and dimensions
</h6> <br /><ol>
<li>On an Analysis Services instance, open SQL Server Management Studio and connect to the <b>Server Name</b>, <i>localhost</i>. </li><li>Expand the <b>Databases</b> node, and then expand the <b>Adventure Works DW</b> database.</li><li>Right-click <b>Roles</b>, and then select <b>New role</b>.</li><li>In the <b>Create Role</b> dialog box, click the <b>General</b> page, and select the following options:</li><li> For <b>Role name</b>, type <b>ASPE Test Users</b>. </li><li> Select the <b>Read definition</b> check box. </li><li> Clear the <b>Full control (Administrator)</b> and <b>Process database</b> check boxes. </li><li>Click the <b>Membership</b> page, and select the following options:</li><li> Click <b>Add</b>. </li><li> In the <b>Select Users or Groups</b> window, for <b>Enter the object names to select</b>, type <b>user1; user2; user3</b>. </li><li> Click <b>Check Names</b>. The values should now appear underlined, with the server or domain name in front of each name. </li><li> Click <b>OK</b>.</li>
</ol> <br /><ol>
<li>Click the <b>Data Sources</b> page. In the <b>Access</b> column for the <b>Adventure Works DW</b> row, select <b>Read</b>.</li><li>Click the <b>Cubes</b> page, and select the following options for the <b>Adventure Works</b> row:</li><li> In the <b>Access</b> column, select <b>Read</b>. </li><li> In the <b>Local Cube/Drillthrough Access</b> column, select <b>Drillthrough and Local Cube</b>. Click <b>OK</b> to accept the message. </li><li> In the <b>Process</b> column, select the check box. </li><li>Click the <b>Dimensions</b> page. For each of the rows in <b>Dimensions</b>, select the <b>Process</b> column check box.</li><li>Click <b>OK</b>, and then wait until the command is processed and the new role is created.</li>
</ol><h3>
Testing the Sample
</h3>Testing the sample demonstrates that new personalization objects are created in different user contexts and that those objects are associated with the user profile.<br /> <br /><h6>
To verify your context
</h6> <br /><ol>
<li>In SQL Server Management Studio, connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select the Adventure Works DW database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the Adventure Works cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node. </li><li>Expand the <b>Internet Sales</b> node, and verify that there is no <b>ISV_1</b> folder under this node. </li><li>Expand the <b>Geography</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li><li>Expand the <b>Product</b> dimension, and verify that there is no <b>ISV_1</b> folder in this dimension.</li>
</ol><h6>
To verify the context for user1
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user1</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user1 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the SQL Server Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if it is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, and then expand the <b>Internet Sales</b> node to see the <b>ISV_1</b> folder.Unlike your user context, user1 has an *ISV_1 *folder under the <b>Internet Sales</b> node.</li><li>Expand the <b>ISV_1</b> folder, expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Operations</b> folder.Notice that the <b>Operations</b> folder contains the <b>Average Item Freight Cost</b> member.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV_1 - Western Coast</b> set.Unlike your user context, user1 does have access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Operations</b> folder to see the <b>Touring Bikes</b> set.Unlike your user context, user1 has access to the <b>Touring Bikes</b> set.</li>
</ol><h6>
To verify the context for user2
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user2</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user2 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select the <b>Adventure Works DW</b> database if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube if it is not already selected.</li><li>Select the <b>Metadata</b> tab if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder. Notice the <b>Gross Internet Profit</b> member is also visible to this user. </li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user1 has an <b>ISV_1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Finance</b> folder to see the *Rate Difference *member.Notice that for user2 only, the <b>Exchange Rates</b> measure group has an <b>ISV_1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Common</b> folder to see the <b>ISV_1 - Western Coast</b> set.Notice that user2, just like user1, has access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Finance</b> folder to see the <b>Mountain Bikes</b> set.While user2 has access to the <b>Mountain Bikes</b> set, user2 does not have access to the <b>Touring Bikes</b> set in the <b>Operations</b> folder. Only user1 has access to the <b>Touring Bikes</b> set<b>.</b></li>
</ol><h6>
To verify the context for user3
</h6> <br /><ol>
<li>Users running Windows XP or Windows Server 2003. Right-click the SQL Server Management Studio icon, select <b>Run as</b>, and then select the following options:</li><li> Select <b>The following user</b>. </li><li> Replace with <b>user3</b>. Make sure that the domain or server name is correct. </li><li> Proceed to step 3. </li><li>Users running Windows Vista or Windows Server 2008. Open a command window and run the following command: <span class="codeInline">runas.exe /profile /user:</span> <i>&lt;Domain&gt;</i> <span class="codeInline">\user3 &quot;</span> <i>&lt;Path-to-ssms&gt;</i> <span class="codeInline">\Ssms.exe&quot;</span> </li><li> Replace <i>&lt;Domain&gt;</i> with the correct domain or server name. </li><li> Replace <i>&lt;Path-to-ssms&gt;</i> with the complete path to ssms.exe, the executable file for SQL Server Management Studio. <b>Note: Windows Vista and Windows Server 2008 no longer have the <b>Run as</b> option when you right-click an application.</b></li><li>Ensure that <b>Server type</b> is set to Analysis Services, then connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Standard toolbar, click <b>Analysis Services MDX Query</b>. </li><li>Connect to the <b>Server name</b>, <i>localhost</i>.</li><li>On the Analysis Services toolbar, select <b>Adventure Works DW</b> database, if it is not already selected.</li><li>In the left pane of the MDX tab, in the <b>Cube</b> list, select the <b>Adventure Works</b> cube, if is not already selected.</li><li>Select the <b>Metadata</b> tab, if it is not already selected.</li><li>Expand the <b>Measures</b> node, expand the <b>Internet Sales</b> node, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder. Notice that the <b>Gross Internet Profit</b> member is visible to this user.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Sales</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user1 has an <b>ISV_1</b> folder in the <b>Reseller Sales</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Exchange Rates</b> measure group, and verify that there is no <b>ISV_1</b> folder in this group.Only user2 has an <b>ISV_1</b> folder in the <b>Exchange Rates</b> measure group.</li><li>Return to the <b>Measures</b> node and expand the <b>Reseller Orders</b> measure group, expand the <b>ISV_1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>Reseller Discount per Order</b> member.Notice that for user3 only, the <b>Reseller Orders</b> measure group has an <b>ISV_1</b> folder.</li><li>Expand the <b>Geography</b> dimension, expand the <b>ISV_1</b> folder, and expand the <b>Common</b> folder to see <b>ISV_1 - Western Coast</b> set.user3, just like user1 and user2, has access to the <b>ISV_1 - Western Coast</b> set.</li><li>Expand the <b>Product</b> dimension, expand the <b>ISV_1</b> folder, and then expand the <b>Marketing</b> folder to see the <b>All Terrain Bikes</b> set.While user3 has access to the <b>All Terrain Bikes</b> set, user3 does not have access to the <b>Touring Bikes</b> set in the <b>Operation</b> folder. Only user1 has access to the <b>Touring Bikes</b> set. User3 also has access to the <b>Mountain Bikes</b> set in the <b>Finance</b> folder. It is user2 who has no access to the <b>All Terrain Bikes</b> set.</li>
</ol><h3>
Troubleshooting the Sample
</h3>Use the following set of procedures to troubleshoot the Analysis Services Personalization Extensions sample.<br /> <br /><h6>
To define debug breakpoints in the code
</h6> <br /><ol>
<li>In Visual Studio 2005, open ASPE.sln.</li><li>Open the source code for the <i>ASClientExtensions.cs</i> source file, and then set a breakpoint on the opening brace of the <i>ASClientExtensions</i> constructor.</li><li>Open the source code for the <i>SessionMgr.cs</i> source file, and then set the following breakpoints:</li><li> Set a breakpoint on the opening brace of the <i>SessionMgr</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>CubeOpened</i> method. </li><li>Open the source code for the <i>AuthoringAndManagement.cs</i> source file, and then set the following breakpoints.</li><li> Set a breakpoint on the opening brace of the <i>AuthoringAndManagement</i> constructor. </li><li> Set a breakpoint on the opening brace of the <i>DefineMembers</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineSets</i> method. </li><li> Set a breakpoint on the opening brace of the <i>DefineKPIs</i> method. </li>
</ol><h6>
To attach to the running instance of Analysis Services
</h6> <br /><ol>
<li>In the menu bar, select <b>Debug</b>, and then select <b>Attach to process</b>.</li><li>In the <b>Available Processes</b> pane, browse to find <b>msmdsrv.exe</b>, and then select it.</li><li>Click <b>Attach</b>, and then wait until the debugger attaches to the running process.</li>
</ol><h6>
To run through the breakpoints
</h6> <br /><ol>
<li>Repeat all the steps in the procedure, <b>To verify the context for user1</b>.Notice that SQL Server Management Studio does not immediately appear. Instead, Visual Studio opens.</li><li>To see the sequence of events, press F11 repeatedly.If there are no more events, check SQL Server Management Studio to continue with the steps in the procedure, <b>To verify the context for user1</b>.</li>
</ol><h3>
Removing the Sample
</h3>Use the following procedure to remove the Analysis Services Personalization Extensions Sample.<br /> <br /><h6>
To remove the roles and assembly from the current Analysis Services instance
</h6> <br /><ol>
<li>Open SQL Server Management Studio. </li><li>Connect to the <b>Server Name</b>, <i>localhost</i></li><li>Expand the <b>Databases</b> node, and then expand <b>Adventure Works DW</b> database.</li><li>Expand <b>Roles</b>, right-click <b>ASPE Test Users</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>At server level, expand <b>Assemblies</b>, right-click <b>ASPE</b>, select <b>Delete</b>, and then click <b>OK</b>.</li><li>Close SQL Server Management Studio.</li><li>Restart the service</li>
</ol><h6>
To remove the user created for this sample
</h6> <br /><ol>
<li>Click <b>Start</b>, right-click <b>My Computer</b>, and select <b>Manage</b>.</li><li>Expand <b>Local Users and Groups</b> to see the <b>Users</b> and <b>Groups</b> folders.</li><li>Expand the <b>Users</b> folder.</li><li>Remove user1, user2, user3 by right-clicking each user, selecting <b>Delete</b>, and then clicking <b>OK</b>.</li>
</ol><h6>
To remove the ASPE sample
</h6> <br /><ul>
<li>From your solution folder, in the ASPE folder, remove the <b>bin</b> and <b>obj</b> folders. &#169; 2008 Microsoft Corporation. All rights reserved.</li>
</ul>
</div>bonniefeThu, 06 Nov 2008 23:18:04 GMTUpdated Wiki: SS2008!Readme for Analysis Services Personalization Extensions Sample 20081106111804P