dbTalk Databases Forums  

how can I get progress of cube processing?

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


Discuss how can I get progress of cube processing? in the microsoft.public.sqlserver.olap forum.



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

Default how can I get progress of cube processing? - 12-25-2003 , 06:20 AM






Hello, this is rick.
As we know, usually the cube processing is time-consuming.
In my application, I process the cube programatically by DSO. I want to give
users information about how long it will takes, like a progress bar, just
like the processing dialog in Analysis Service, so the UI will not be
dead-waiting.

How can I?



Reply With Quote
  #2  
Old   
Barry Hensch
 
Posts: n/a

Default Re: how can I get progress of cube processing? - 12-26-2003 , 07:41 PM






Hi Rick:

You can use the With Events ReportProgress to access how many rows
have been processed. We us it to determine the start and end time of
our processing.

Assuming you have a DSO object for the Analysis Services database
called dsoDB you will place something like:

'***The WithEvents allows us to use the ReportProgress option
Public WithEvents dsoDB As DSO.Database

in the declaration

From there you can set-up the ReportProgress program like:

Private Sub dsoDB_ReportProgress(o_Obj As Object, ByVal i_Action As
Integer, l_Counter As Long, s_Message As String, cancel As Boolean)
If g_cube_name = "WSD" Or g_cube_name = "BANNER" Or g_cube_name =
"DCM" Then
Select Case i_Action
'***To capture the progress of the data loading
Case mdactReadData '***102
'***If the iRowsStartIndicator = 0 then this must be
the first progress report
'***for the rows read. After the first pass through
the iRowsStartIndicator
'***is reset to 1 until the next partition is started.
If g_rows_start_indicator = 0 Then
g_analysis_services_processing_start_time = Now()
g_rows_start_indicator = 1
End If

'***These variable will get updated with each
subsequent progress report
'***from the server (after 1000 rows have been read)
g_total_rows_processed = l_Counter
g_analysis_services_processing_end_time = Now()

Case mdactAggregate '***103
'***If the iAggregationsStartIndicator = 0 then this
must be the first progress report
'***for the rows read. After the first pass through
the iAggregationsStartIndicator
'***is reset to 1 until the next partition is started.
If g_aggregations_start_indicator = 0 Then
g_aggregations_start_time = Now()
g_aggregations_start_indicator = 1

'**Updates the Cube Processing Instructions with
the End Time of data processing (since this must be the first visit
'**to the aggregation creation. Also set the
number of rows processed and the start time of the aggregations
End If

'***These variable will get updated with each
subsequent progress report
g_aggregations_end_time = Now()
''' Case mdactExecuteSQL '***104
''' Debug.Print s_Message
End Select
End If
End Sub


In terms of the constants, they can be placed in a separate module:

Global Const mdactProcess = 1
Global Const mdactMerge = 2
Global Const mdactDelete = 3
Global Const mdactDeleteOldAggregations = 4
Global Const mdactRebuild = 5
Global Const mdactCommit = 6
Global Const mdactRollback = 7
Global Const mdactCreateIndexes = 8
Global Const mdactCreateTable = 9
Global Const mdactInsertInto = 10
Global Const mdactTransaction = 11
Global Const mdactInitialize = 12
Global Const mdactCreateView = 13

Global Const mdactWriteData = 101
Global Const mdactReadData = 102 (***Probably the one you want)
Global Const mdactAggregate = 103
Global Const mdactExecuteSQL = 104
Global Const mdactNowExecutingSQL = 105
Global Const mdactExecuteModifiedSQL = 106
Global Const mdactConnecting = 107
Global Const mdactRowsAffected = 108
Global Const mdactError = 109
Global Const mdactWriteAggsAndIndexes = 110
Global Const mdactWriteSegment = 111
Global Const mdactDataMiningProgress = 112

HTH,

Barry

Reply With Quote
  #3  
Old   
Rick
 
Posts: n/a

Default Re: how can I get progress of cube processing? - 12-28-2003 , 07:40 PM



Thanks!


"Barry Hensch" <barryh (AT) quadrus (DOT) com> ????
news:5757a2ca.0312261741.65cc40fd (AT) posting (DOT) google.com...
Quote:
Hi Rick:

You can use the With Events ReportProgress to access how many rows
have been processed. We us it to determine the start and end time of
our processing.

Assuming you have a DSO object for the Analysis Services database
called dsoDB you will place something like:

'***The WithEvents allows us to use the ReportProgress option
Public WithEvents dsoDB As DSO.Database

in the declaration

From there you can set-up the ReportProgress program like:

Private Sub dsoDB_ReportProgress(o_Obj As Object, ByVal i_Action As
Integer, l_Counter As Long, s_Message As String, cancel As Boolean)
If g_cube_name = "WSD" Or g_cube_name = "BANNER" Or g_cube_name =
"DCM" Then
Select Case i_Action
'***To capture the progress of the data loading
Case mdactReadData '***102
'***If the iRowsStartIndicator = 0 then this must be
the first progress report
'***for the rows read. After the first pass through
the iRowsStartIndicator
'***is reset to 1 until the next partition is started.
If g_rows_start_indicator = 0 Then
g_analysis_services_processing_start_time = Now()
g_rows_start_indicator = 1
End If

'***These variable will get updated with each
subsequent progress report
'***from the server (after 1000 rows have been read)
g_total_rows_processed = l_Counter
g_analysis_services_processing_end_time = Now()

Case mdactAggregate '***103
'***If the iAggregationsStartIndicator = 0 then this
must be the first progress report
'***for the rows read. After the first pass through
the iAggregationsStartIndicator
'***is reset to 1 until the next partition is started.
If g_aggregations_start_indicator = 0 Then
g_aggregations_start_time = Now()
g_aggregations_start_indicator = 1

'**Updates the Cube Processing Instructions with
the End Time of data processing (since this must be the first visit
'**to the aggregation creation. Also set the
number of rows processed and the start time of the aggregations
End If

'***These variable will get updated with each
subsequent progress report
g_aggregations_end_time = Now()
''' Case mdactExecuteSQL '***104
''' Debug.Print s_Message
End Select
End If
End Sub


In terms of the constants, they can be placed in a separate module:

Global Const mdactProcess = 1
Global Const mdactMerge = 2
Global Const mdactDelete = 3
Global Const mdactDeleteOldAggregations = 4
Global Const mdactRebuild = 5
Global Const mdactCommit = 6
Global Const mdactRollback = 7
Global Const mdactCreateIndexes = 8
Global Const mdactCreateTable = 9
Global Const mdactInsertInto = 10
Global Const mdactTransaction = 11
Global Const mdactInitialize = 12
Global Const mdactCreateView = 13

Global Const mdactWriteData = 101
Global Const mdactReadData = 102 (***Probably the one you want)
Global Const mdactAggregate = 103
Global Const mdactExecuteSQL = 104
Global Const mdactNowExecutingSQL = 105
Global Const mdactExecuteModifiedSQL = 106
Global Const mdactConnecting = 107
Global Const mdactRowsAffected = 108
Global Const mdactError = 109
Global Const mdactWriteAggsAndIndexes = 110
Global Const mdactWriteSegment = 111
Global Const mdactDataMiningProgress = 112

HTH,

Barry



Reply With Quote
  #4  
Old   
Rick
 
Posts: n/a

Default Re: how can I get progress of cube processing? - 12-28-2003 , 08:10 PM



But I don't know what does the "o_Obj As Object" parameter mean.
Usually, it is Empty. How can I get the name of what is processing, such as
the dimensions, cubes and partitions?


"Barry Hensch" <barryh (AT) quadrus (DOT) com> ????
news:5757a2ca.0312261741.65cc40fd (AT) posting (DOT) google.com...
Quote:
Hi Rick:

You can use the With Events ReportProgress to access how many rows
have been processed. We us it to determine the start and end time of
our processing.

Assuming you have a DSO object for the Analysis Services database
called dsoDB you will place something like:

'***The WithEvents allows us to use the ReportProgress option
Public WithEvents dsoDB As DSO.Database

in the declaration

From there you can set-up the ReportProgress program like:

Private Sub dsoDB_ReportProgress(o_Obj As Object, ByVal i_Action As
Integer, l_Counter As Long, s_Message As String, cancel As Boolean)
If g_cube_name = "WSD" Or g_cube_name = "BANNER" Or g_cube_name =
"DCM" Then
Select Case i_Action
'***To capture the progress of the data loading
Case mdactReadData '***102
'***If the iRowsStartIndicator = 0 then this must be
the first progress report
'***for the rows read. After the first pass through
the iRowsStartIndicator
'***is reset to 1 until the next partition is started.
If g_rows_start_indicator = 0 Then
g_analysis_services_processing_start_time = Now()
g_rows_start_indicator = 1
End If

'***These variable will get updated with each
subsequent progress report
'***from the server (after 1000 rows have been read)
g_total_rows_processed = l_Counter
g_analysis_services_processing_end_time = Now()

Case mdactAggregate '***103
'***If the iAggregationsStartIndicator = 0 then this
must be the first progress report
'***for the rows read. After the first pass through
the iAggregationsStartIndicator
'***is reset to 1 until the next partition is started.
If g_aggregations_start_indicator = 0 Then
g_aggregations_start_time = Now()
g_aggregations_start_indicator = 1

'**Updates the Cube Processing Instructions with
the End Time of data processing (since this must be the first visit
'**to the aggregation creation. Also set the
number of rows processed and the start time of the aggregations
End If

'***These variable will get updated with each
subsequent progress report
g_aggregations_end_time = Now()
''' Case mdactExecuteSQL '***104
''' Debug.Print s_Message
End Select
End If
End Sub


In terms of the constants, they can be placed in a separate module:

Global Const mdactProcess = 1
Global Const mdactMerge = 2
Global Const mdactDelete = 3
Global Const mdactDeleteOldAggregations = 4
Global Const mdactRebuild = 5
Global Const mdactCommit = 6
Global Const mdactRollback = 7
Global Const mdactCreateIndexes = 8
Global Const mdactCreateTable = 9
Global Const mdactInsertInto = 10
Global Const mdactTransaction = 11
Global Const mdactInitialize = 12
Global Const mdactCreateView = 13

Global Const mdactWriteData = 101
Global Const mdactReadData = 102 (***Probably the one you want)
Global Const mdactAggregate = 103
Global Const mdactExecuteSQL = 104
Global Const mdactNowExecutingSQL = 105
Global Const mdactExecuteModifiedSQL = 106
Global Const mdactConnecting = 107
Global Const mdactRowsAffected = 108
Global Const mdactError = 109
Global Const mdactWriteAggsAndIndexes = 110
Global Const mdactWriteSegment = 111
Global Const mdactDataMiningProgress = 112

HTH,

Barry



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.