Showing posts with label omiting. Show all posts
Showing posts with label omiting. Show all posts

Friday, March 9, 2012

Error in Merging partitions in AS 2005 from DSO

I have the following code to incrementally process a cube (this is not the full code. I am omiting error handling and other less relevant parts). Basically, I clone the existing partition, process the clone, and then merge it back into the original partition:

Set dsoCube = m_dsoDatabase.MDStores.Item(cubeName)
For Each wrkDimension In dsoCube.Dimensions
m_dsoDatabase.Dimensions(wrkDimension.Name).process processDefault
Next
Set dsoPartition = dsoCube.MDStores.Item(cubeName)
Set dsoClonePartition = dsoCube.MDStores.AddNew(tmpPartition)
dsoPartition.Clone dsoClonePartition, cloneMinorChildren
dsoClonePartition.SourceTableFilter = "Tranno > GetMaxTranNo(cubeName)" ' simplification
dsoClonePartition.process processDefault
dsoPartition.Merge tmpPartition ' Error occurs in SA 2005
dsoPartition.SourceTableFilter = dsoClonePartition.SourceTableFilter
dsoPartition.Update

This works fine in AS 2000. In AS 2005, an error at the step of merging the two partitions is:
Partitions cannot be merged because the source and target partitions have a different number of aggregations.

Manually merging the temporary partition back into the main one from Management studio works without errors.

Any idea on what this might be?

Thanks,
Boris Zakharin, MCAD

Looks like a bug to me.
Please go ahead and file it using http://connect.microsoft.com/sql

I would also like to seize the opportunity and make a little plea for anyone trying to develop DSO applications against Analysis Services 2005:
Please , take a good look at your requirements and at your reasoning to why you are trying to invest in new application code that uses outdated object model. DSO running against AS2005 is there for supporting legacy applications mostly. I would highly discourage anyone from heavily investing in new development using DSO.
Take a look at .NET development using AMO. It is greatly superior to DSO.

HTH.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||Done. I was just wondering, would there be a hotfix for this in the near future. If not, is there a workaround? We need to tell our customers why parts of our software are incompatible with SQL Server 2005.

As far as AMO goes, we must still support customers with SQL 2000 with the same version of our code, so AMO would seem to not be an option. Also, We have multiple utilities written in VB6 that deal with OLAP (In addition to our main ASP.NET web application), so porting to AMO would require rewriting large chunks of code in .NET including code that is unrelated to AS at all.

Thanks for your time,
Boris Zakharin, MCAD
P/A, Metavante Risk and Compliance|||

I am afraid I cannot speak of any dates or avaliablity of any particular fix.
If you have immideate need it is definitely better contact product support directly.

I completely understand the reasoning for this current DSO usage. Only... there should come a moment and you should be switching to AMO. In my humble opinion you should make all the effort and switch as soon as you can. Any application you developing applications using DSO is the the application you'll have to rebuild using AMO.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.