Follow SQLMaster on Twitter

Build an Alert mechanism by using Analysis Management Objects (AMO) - implement SQL Server 2008 OLAP Best Practices

Published 11 February 10 03:34 PM | SQL Master 

SQL Server 2008 offers Analysis Management Objects (AMO) a complete library of classes designed to manage an instance of Analysis Services from a client application in managed code under the .NET Framework version 2.0.

What I believe on the usage of these AMO in Analysis Services 2008 will alert you whenever best practice is not being followed: suggestions and warnings are delivered by AMO and are identified by a curvy blue line underneath the object in question. The message is displayed when you hover over the underlined object. Each message encapsulates an aspect of best practice for design or implementation, depending on your current task.

Books Online highlights the topic as, AMO is a complete collection of management classes for Analysis Services that can be used programmatically, under the namespace of Microsoft.AnalysisServices, in a managed environment. The classes are included in the AnalysisServices.dll file, which is usually found where the SQL Server setup installs the files, under the folder \100\SDK\Assemblies\. To use the AMO classes, include a reference to this assembly in your projects. By using AMO you are able to create, modify, and delete objects such as cubes, dimensions, mining structures, and Analysis Services databases; over all these objects, actions can be performed from your application in the .NET Framework. You can also process and update the information stored in Analysis Services databases. 

AMO is especially useful for automating repetitive tasks, for example creating new partitions in a measure group based on new data in the fact table, or re-training a mining model based on new data. These tasks that create new objects are usually performed on a monthly, weekly, or quarterly basis, and the new objects can easily be named, based in the new data, by the application.

Coming to the usage of these Management Objects by the users I believe that Analysis Services administrators can use AMO to automate the processing of Analysis Services databases. For designing and deploying Analysis Services databases, you should use Business Intelligence Development Studio. For the Developers can use AMO to develop administrative interfaces for specified sets of users. These interfaces can restrict access to Analysis Services objects and limit users to certain tasks. For example, by using AMO you could create a Backup application that enables a user to see all database objects, select any one of the databases, and backup it to any one of a specified set of devices. Also you can embed Analysis Services logic in their applications. For this, developers can create cubes, dimensions, mining structures, and mining models based on user input or other factors. The advanced users of OLAP are usually data analysts or other experienced data users who have a strong programming background and who want to enhance their data analysis with a closer usage of the data objects. For users who are required to work offline, AMO can be very useful to automate creating local cubes before going offline.

Coming to the secure of the usage, AMO Server roles contain one and only one role in the collection, the Administrators role. New roles cannot be added to the server roles collection. Membership in the Administrators role permits complete access to every object in the server.

Permissions define the enabled actions on the object where the permission is supplied. Permissions can be supplied to the following objects: Database, DataSource, Dimension, Cube, MiningStructure, and MiningModel. Permission maintenance involves granting or revoking enabled access by the corresponding access property. For each enabled access, there is a property that can be set to the desired level of access. Access can be defined for the following operations: Process, ReadDefinition, Read, Write, and Administer. Administer access is only defined on the Database object. The database administrator security level is obtained when the role is granted with the Administer database permission.

The following sample creates four roles: Database Administrators, Processors, Writers, and Readers.

Database Administrators can administer the supplied database.

Processors can process all objects in a database and verify results. To verify results, read access to the database object must be explicitly enabled to the supplied cube, because read permission does not apply to children objects.

Writers can read and write to the supplied cube, and cell access is limited to the 'United States' in the customer dimension.

Readers can read on the supplied cube, and cell access is limited to the 'United States' in the customer dimension.

Even I came to know about such an excellent resource by reading at Books Online, it clarifies that you could take advantage of AMO for most repetitive tasks are best designed, deployed, and maintained if they are developed by using Integration Services than if they are developed as an application in any language of your choice. However, for repetitive tasks that cannot be automated by using Integration Services, you can use AMO. AMO is also useful for when you want to develop a specialized application for business intelligence by using Analysis Services.
 
AMO is ideal for setup applications that have to deploy a developed solution, from an independent software vendor to a final customer. The setup application can verify that an earlier version exists and can update the structure, remove no longer useful objects, and create new ones. If there is no earlier version then can create everything from scratch. This can be powerful to create new partitions based on new data, and can remove old partitions that had gone beyond the scope of the project. For example, for a finance analysis solution that works with the last 36 months of data, as soon as a new month of data is received, the 37th old month could be removed. To optimize performance, new aggregations can be designed based on usage and applied to the last 12 months.
***this is the best example I would like to highlight that why Books Online is very important resources to get to know on hidden gems of SQL Server!
 
 
 

Comments

# Other SQL Server Blogs around the Web said on February 11, 2010 3:54 PM:

SQL Server 2008 offers Analysis Management Objects (AMO) a complete library of classes designed to manage

# Intelligence: What Is It? said on February 11, 2010 11:25 PM:

PingBack from http://psychology.articleberry.com/intelligence-what-is-it-

# All about Business Intelligence (SSQA.net) : Build an Alert … | Webmasters feeds said on February 11, 2010 11:43 PM:

PingBack from http://feed.gspvn.org/dedicated-servers/all-about-business-intelligence-ssqanet-build-an-alert/

# All about Business Intelligence (SSQA.net) : Build an Alert … | Business Intelligence Wisdom said on February 12, 2010 4:09 AM:

PingBack from http://business-intelligence.wisdomaboutbusiness.com/all-about-business-intelligence-ssqa-net-build-an-alert/

# SqlServerKudos said on February 12, 2010 8:10 PM:

Kudos for a great Sql Server article - Trackback from SqlServerKudos

Anonymous comments are disabled

About SQL Master

**__________________________________** SQL Server MVP, Sr. DBA & industry expert. - Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.

Search

Go

This Blog

«February 2010»
SMTWTFS
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213

Syndication