![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How can you programmatically create cube partitions? I have a cube that is 3.2GB in fact data size and a year should contain about 35GB of fact data. I would like to partition it into several slices, however I do not want to create 50 partition through the GUI. Help me please. Thanks. Kevin Brooks |
#3
| |||
| |||
|
|
Hi Kevin, I was able to create partions using the DSO object model in VB6 (or VB.Net). Here is a subroutine that I used in VB6. It creates 2 distinct partitions. Private Sub CreatePartition() Dim dsoDatabase As DSO.MDStore Dim dsoCube As DSO.MDStore Dim dsoPartition As DSO.MDStore On Error GoTo CreatePartition_ErrHandler '--Need to make reference to C:\Program Files\Common Files\Microsoft Shared\DSO\msmddo.dll '--this is the Microsoft Decision Support Objects library Me.MousePointer = vbHourglass ' ' Connect to the server ' MakeServerConnection Me.txtServer.Text ' ' Set database and cube objects ' Set dsoDatabase = mdsoServer.MDStores("FundAcctSample") Set dsoCube = dsoDatabase.MDStores("Investments") ' ' Create a Partition ' GoTo lbl1 Set dsoPartition = dsoCube.MDStores.AddNew("Connecticut") dsoPartition.SourceTable = "Investments" dsoPartition.SourceTableFilter = "Offices.business = 'Connecticut'" dsoPartition.AggregationPrefix = "Investme_Connecticut_" dsoPartition.OlapMode = olapmodeRolap lbl1: Set dsoPartition = dsoCube.MDStores.AddNew("Vermont") dsoPartition.SourceTable = "Investments" dsoPartition.SourceTableFilter = "Offices.business = 'Vermont'" dsoPartition.AggregationPrefix = "Investme_Vermont_" dsoPartition.OlapMode = olapmodeRolap dsoPartition.Update Me.MousePointer = 0 Exit Sub CreatePartition_ErrHandler: MsgBox Error, vbCritical, "Create Partition Error" Me.MousePointer = 0 Exit Sub End Sub This code adds 2 partitions to the Investments Cube in Analysis server. It worked fine for me. HTH Rich "K. Brooks" wrote: How can you programmatically create cube partitions? I have a cube that is 3.2GB in fact data size and a year should contain about 35GB of fact data. I would like to partition it into several slices, however I do not want to create 50 partition through the GUI. Help me please. Thanks. Kevin Brooks |
![]() |
| Thread Tools | |
| Display Modes | |
| |