dbTalk Databases Forums  

Re: Remove dimensions with DSO doesn't show up correctly in Analys

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Re: Remove dimensions with DSO doesn't show up correctly in Analys in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pete Appleton
 
Posts: n/a

Default Re: Remove dimensions with DSO doesn't show up correctly in Analys - 02-18-2005 , 03:03 AM






For the benefit of others, as I just spent a day banging my head against this
particular brick wall until installing VB6 on a spare machine and getting the
scripting utility to work:

The problem appears to be that not only do you have to update the
FromClause / JoinClause for the cube, but you also have to do so for the
partition - eg, in pseudo-C#:

DSO.Cube cube = dsoDatabase.MDStores.Item( "SomeCube" );
DSO.Dimension dimension = cube.Dimensions( "SomeDimension" );

cube.Dimensions.Remove( dimension );
// A cube with a single partition has one with the same name as the cube.
// On the Enterprise version you can have multiple partitions
// This code assumes a single partition
DSO.Partition partition = cube.Partitions.Item( "SomeCube" ) ;

cube.FromClause = CalculateNewFromClause();
cube.JoinClause = CalculateNewJoinClause();

partition.FromClause = cube.FromClause;
partition.JoinClause = cube.JoinClause;

This is also applicable to adding dimensions to the cube.

Pete Appleton

Keywords for search: DSO decision support objects add remove adding
removing dimension cube partition

"Dave Wickert [MSFT]" wrote:

Quote:
How to solve this.
1) Get a copy of the Metadata Scripter on the SQL Server 2000 Resource Kit.
Install it on your system. I believe that you will need VB6 to do this.
2) Run your program to remove the dimension. Then run the Metadata Scripter
and generate program 1.
3) Put back your dimension and remove the dimension with Analysis Manager.
Then run the Metadata Scripter and generate program 2.
4) Run windiff (or any compare program) to compare program 1 and program 2.
There is probably some property or attribute which Analysis Manager is doing
that you aren't aware of.

This is a common problem trying to emulate AM (that it sometimes does
non-trivial things behind your back that are unexpected).

The Metadata Scripter is your friend in this case.

Hope this helps.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Dinnan" <dinnan (AT) tjohoo (DOT) se> wrote in message
news:1107260276.520040.281730 (AT) c13g2000cwb (DOT) googlegroups.com...
I'm trying to remove a shared dimension from a cube. I'm using DSO to
do this. The problem is that when I open the cube in edit mode in
Analysis Manager after removing the dimension the dimension table is
still there. But the joins to it are removed.

I use the following method to remove the dimension from the cube

1. Remove the dimension table from the cubes fromClause list.
2. Remove the dimension table join from cubes joinClause.
3. Remove the dimension from the cubes dimension collection
4. Execute update and process command on the cube.

The processing of the cube works fine and the dimension is removed from
the list of dimensions in the cube editor but the source table of the
dimension is still there.

I also tried to remove the occurence of the table from the cube's
custom property "SchemaLayout" but that did not help. I have searched
the repository for occurences of the dimension table but I only found
it in the definition of the dimension wich seems ok to me. So my
question is: Where does Analysis Manager get the information that this
dimension table should belong to this cube? What am I missing?
Regards Dinnan





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.