dbTalk Databases Forums  

DSO unable to change partition properties. Defect?

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


Discuss DSO unable to change partition properties. Defect? in the microsoft.public.sqlserver.olap forum.



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

Default DSO unable to change partition properties. Defect? - 11-05-2004 , 05:08 AM






Hi,
In VB .NET code, I am trying to change the fact table of a partition,
using DSO. The code snippet is:

dsoPartitionNew.SourceTable = sLQuote & "dbo" & sRQuote & "." &
sLQuote & objName & sRQuote
dsoPartitionNew.FromClause = Replace(dsoPartition.FromClause,
dsoPartition.SourceTable, dsoPartitionNew.SourceTable)
dsoPartitionNew.JoinClause = Replace(dsoPartition.JoinClause,
dsoPartition.SourceTable, dsoPartitionNew.SourceTable)
dsoPartitionNew.SourceTableFilter =
Replace(dsoPartition.SourceTableFilter, dsoPartition.SourceTable,
dsoPartitionNew.SourceTable)
dsoPartitionNew.FactTable = Replace(dsoPartition.FactTable,
dsoPartition.SourceTable, dsoPartitionNew.SourceTable)

When I trace the execution, at the first line, control passes through
the statement. But I see that the value of the Source Table as seen
from a watch window, does not change. The partition seen from the
Analysis Manager, also shows the source table unchanged.

Can someone suggest what might be missing to make things work?
I use Analysis Services 2000 with service pack 3.

Thanks
Yash

Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: DSO unable to change partition properties. Defect? - 11-07-2004 , 02:04 AM






It may be that you are simply not updating the right properties.
I would recommend that you get a copy of the Metadata Scripter program from
the SQL Server 2000 Resource Kit (available from your local bookstore,
www.bn.com or on the TechNet CD/DVD distribution).

1) run the metadata scripter -- it will generate a program, let's call it
proga.bas
2) modify the partition as you desire using Analysis Mangaer
3) re-run the metadata scripter -- it will generate a program, let's call it
progb.bas

Run windiff between proga.bas and progb.bas. It should show you various
properties which have changed. My guess is that you will find that there is
another property or two which you either have the wrong format or didn't
realize that you also have to change.

The other possibility is that this is a VB.NET thing. It just so happens
that the DSO/XML utility is written in VB.NET. You might take a look at it's
source kit to see how it modifies the properties you are interested in. The
download for the source kit is at:
http://www.microsoft.com/downloads/d...DisplayLang=en

Hope that 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.

"Yash" <yashgt (AT) yahoo (DOT) com> wrote

Quote:
Hi,
In VB .NET code, I am trying to change the fact table of a partition,
using DSO. The code snippet is:

dsoPartitionNew.SourceTable = sLQuote & "dbo" & sRQuote & "." &
sLQuote & objName & sRQuote
dsoPartitionNew.FromClause = Replace(dsoPartition.FromClause,
dsoPartition.SourceTable, dsoPartitionNew.SourceTable)
dsoPartitionNew.JoinClause = Replace(dsoPartition.JoinClause,
dsoPartition.SourceTable, dsoPartitionNew.SourceTable)
dsoPartitionNew.SourceTableFilter =
Replace(dsoPartition.SourceTableFilter, dsoPartition.SourceTable,
dsoPartitionNew.SourceTable)
dsoPartitionNew.FactTable = Replace(dsoPartition.FactTable,
dsoPartition.SourceTable, dsoPartitionNew.SourceTable)

When I trace the execution, at the first line, control passes through
the statement. But I see that the value of the Source Table as seen
from a watch window, does not change. The partition seen from the
Analysis Manager, also shows the source table unchanged.

Can someone suggest what might be missing to make things work?
I use Analysis Services 2000 with service pack 3.

Thanks
Yash



Reply With Quote
  #3  
Old   
Kevin Wick
 
Posts: n/a

Default Re: DSO unable to change partition properties. Defect? - 11-10-2004 , 02:24 PM



I ran into the same problem and found something somewhere on the MSFT
site that solved it. I went back through a partitioning control app
we wrote and found this code. It helped me remember the solution.

It seems as though the Partition object is smart enough to realize
that the
FromClause and JoinClause need to have the fact table changed before
the SourceTable property will accept the change. It makes sense for
it all to hang together. The object must parse these two properties
looking for the source table.

Hope this helps!!!!

------------------------
sSourceTable = Trim(oRS("cSourceTable").Value)
sSourceColumn = Trim(oRS("cPartColumn").Value)
sPartValue = Trim(oRS("cPartValue").Value)
sPartName = Trim(oRS("cPartitionName").Value)
dtPartValue = Trim(oRS("cPartValue_AsDate").Value)

bPartFound = FindPartition(dsoCube, dsoPart, nIndx, sPartName)

dsoPart.FromClause = Replace(dsoCube.FromClause, dsoCube.SourceTable,
"dbo." & WrapIt(sSourceTable, "Double"))

dsoPart.JoinClause = Replace(dsoCube.JoinClause, dsoCube.SourceTable,
"dbo." & WrapIt(sSourceTable, "Double"))

dsoPart.SourceTable = "dbo." & WrapIt(sSourceTable, "Double")
dsoPart.SourceTableAlias = "dbo." & WrapIt(sSourceTable, "Double")
dsoPart.SourceTableFilter = sFilter

Set dsoDim = dsoPart.Dimensions("RunDates")
Set dsoLvl = dsoDim.Levels("RunDate")
dsoLvl.SliceValue = Format(dtPartValue, "Mmm-dd-yyyy")

dsoPart.Update
dsoPart.Process processFull

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.