September 27, 2010 at 5:22 am
Hi All
I am not able to run the Dimension throught code while running from pacakge.
I am able to call the code like below but it is not processing through code.
For Each oDim In oDB.Dimensions
oDim.Process(Microsoft.AnalysisServices.ProcessType.ProcessFull)
Next
thorugh code it is not taking any time fraction of secound it is executing
but not processing...
When open the Microsoft Analysis server and run the particular dimenstion it is running perfetly and it is taking time to
run the dimension.
Please helo me any thing need to be changed in code level
Regards,
Venu
October 1, 2010 at 2:46 am
Dim sDimID As String
Dim strVal As Integer = 1
Dim strValCube As Integer = 1
Dim sXMLA As String = ""
Dim oMeasureGroup As Microsoft.AnalysisServices.MeasureGroup
Dim oPartition As Microsoft.AnalysisServices.Partition
For intLoopIndex = 0 To oCube.Dimensions.Count - 1
'System.Console.WriteLine("Hello from Visual Basic")
sDimID = oCube.Dimensions.Item(intLoopIndex).DimensionID
' MsgBox(sDimID)
If oCube.Dimensions.Item(intLoopIndex).Dimension.State = Microsoft.AnalysisServices.AnalysisState.Processed Then
sProcessType = "ProcessUpdate"
Else
sProcessType = "ProcessFull"
End If
sXMLA = ""
sXMLA = sXMLA + "<Batch xmlns=^http://schemas.microsoft.com/analysisservices/2003/engine^>" & vbCrLf
sXMLA = sXMLA + " <Parallel>" & vbCrLf
sXMLA = sXMLA + " <Process xmlns:xsd=^http://www.w3.org/2001/XMLSchema^ xmlns:xsi=^http://www.w3.org/2001/XMLSchema-instance^>" & vbCrLf
sXMLA = sXMLA + " <Object>" & vbCrLf
sXMLA = sXMLA + " <DatabaseID>" & sDatabaseID & "</DatabaseID>" & vbCrLf
sXMLA = sXMLA + " <DimensionID>" & sDimID & "</DimensionID>" & vbCrLf
sXMLA = sXMLA + " </Object>" & vbCrLf
sXMLA = sXMLA + " <Type>" & sProcessType & "</Type>" & vbCrLf
sXMLA = sXMLA + " <WriteBackTableCreation>UseExisting</WriteBackTableCreation>" & vbCrLf
sXMLA = sXMLA + " </Process>" & vbCrLf
sXMLA = sXMLA + " </Parallel>" & vbCrLf
sXMLA = sXMLA + "</Batch>" & vbCrLf
sXMLA = Replace(sXMLA, "^", """")
SaveTextToFile(strVal & ". " & sDimID & ":" & sProcessType & " -- Dimension Start Time:" & DateTime.Now.ToString() & vbCrLf, strErrorFilePath, "DIM" & sDimID & vbCrLf)
objServer.Execute(sXMLA)
SaveTextToFile(strVal & ". " & sDimID & ":" & sProcessType & " -- Dimension End Time:" & DateTime.Now.ToString() & vbCrLf, strErrorFilePath, "DIM" & sDimID & vbCrLf)
strVal += 1
Next intLoopIndex
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply