Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Mariposa Bot Shipped With Vodafone Smartphone

IT Job Market Heating Up: Report

Bing Makes Strides But Momentum Stalls

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2







Related Articles
Introduction to SQL Server 2000 Analysis Services: Handling Time Dimensions
Introduction to SQL Server 2000 Analysis Services: Working with Dimensions
Introduction to SQL Server 2000 Analysis Services: Creating Our First Cube

Finance Developer (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MS SQL

February 14, 2005

Introduction to MSSQL Server 2000 Analysis Services: Manage Distinct Count with a Virtual Cube

By William Pearson




Isolating DISTINCT COUNT into a Separate Cube




We will begin performance enhancement efforts with the creation of a cube into which we will isolate the Distinct Count capabilities of the existing solution. We will manage this aspect of our solution from within the MSAS Analysis Manager.




Let's start Analysis Services and proceed with the following steps:



1.  Open Analysis Manager.



2.  Expand the Analysis Servers folder by clicking the "+" sign to its immediate left.



Our server(s) appear (my server, MOTHER1, is depicted in some of the illustrations).



3.  Expand the desired server.

Our database(s) appear, in much the same manner as depicted in Illustration 4.




Illustration 4: A Sample Set of Databases Displayed within Analysis Manager

4.  Expand the FoodMart 2000 database.

5.  Expand the Cubes folder.

The sample cubes appear, as shown in Illustration 5.


Illustration 5: The Sample Cubes in the FoodMart2000 Database

NOTE: Your databases / cube tree may differ, depending upon the activities you have performed since the installation of MSAS (and the simultaneous creation of the original set of sample cubes). Moreover, some of the illustrations will occasionally depict measures, dimensions, and objects that do not appear in the pristine samples. If this happens, please ignore the differences, as they are unlikely to impact the steps we are undertaking as part of our practice exercise.

Should you want or need to restore the cubes to their original state, simply restore the database under consideration. For instructions, see the MSSQL Server 2000 Books Online.

Because we need a cube that matches the Sales cube, with which it will be working, as we shall see, with regard to dimensions, we will simply copy the Sales cube and rename it in the following steps:

6.  Right-click the Sales sample cube.

7.  Select Copy from the context menu that appears, as depicted in Illustration 6.


Illustration 6: Select Copy from the Context Menu

8.  Right-click the Cubes folder for FoodMart 2000.

9.  Select Paste from the context menu that appears, as shown in Illustration 7.


Illustration 7: Select Paste from the Context Menu

The Duplicate Name dialog appears, providing a means for the renaming of the Sales cube clone we are attempting to create. MSAS will not allow duplicate cube names within the same database.

10.  Replace Sales with DISTINCT_CUSTOMERS in the Name box of the Duplicate Name dialog, as depicted in Illustration 8.


Illustration 8: New Name Appears in the Duplicate Name Dialog

11.  Click OK to close the dialog, and to create the DISTINCT_CUSTOMERS cube.

The DISTINCT_CUSTOMERS cube appears in the cube tree.

While the dimensions of the DISTINCT_CUSTOMERS cube must mirror those in the Sales cube, the new cube will require only one measure; that measure will be a Distinct Count measure, which we will add next. To prepare the new cube further, we will then dump the unneeded measures.

12.  Right-click the new DISTINCT_CUSTOMERS cube.

13.  Select Edit from the context menu that appears, as shown in Illustration 9.


Illustration 9: Select Edit from the Context Menu

The Cube Editor opens.

14.  Right-click the Measures folder in the Tree View to the left of the Schema tab.

A single-line context menu appears, as depicted in Illustration 10.

15.  Select New Measure from the context menu.


Illustration 10: Select New Measure from the Context Menu

The Insert Measure dialog appears.

16.  Click-select customer_id.

The Insert Measure dialog, selection circled in red, appears as shown in Illustration 11.


Illustration 11: Select Customer_Id from the Insert Measure Dialog



Go to page: Prev  1  2  3  4  5  6  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives








Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
shrinking a Database tkatende 2 March 19th, 08:55 AM
Dropping database yogesphu 3 March 19th, 08:52 AM
Inner and outer select mussab 3 March 17th, 11:05 AM
Help with Getting Started jozepeter 1 March 15th, 11:03 AM









The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers