Saturday, June 21, 2008

Tune & Optimize

The chapter of "Tune & Optimize" from "Look Smarter than you are with Hyperion Essbase" is the most one I've been reading several times. Belows are some tips or summary on how to tuning performance the essbase application .
1. Tune the Index Cache
  • set the index cache equal to the combined the size of all essn.ind files, if possible
  • do not set this cache size higher than the total index size, as no performance improvement will be realized.
2. Tune the data cache
  • set the data cache to 0.123 times the combined size of all essn.pag files with a minimum value of about 307,200 KB.
  • consider increasing this value even further if you have a high humber of concurrent users
there's more about tuning performance but, enough for the theory, lets prove and test it..

Thursday, June 5, 2008

Look Smarter than You Are with Hyperion Essbase


Yesterday, just arrive new book I bought from Amazon.com. Looks like I will spend mostly my weekend time reading the book to sharpen my Essbase skill... :)









Wednesday, June 4, 2008

Data Value [%] Encountered Before All Dimension Selected,[%] Records Completed

Essbase error description :

"Data Value [%] Encountered Before All Dimension Selected,[%] Records Completed"

Solution :

Check the load rule. If there are any dimensions in your database not specified in the data load file, make sure you specify them in your header.

Saturday, May 31, 2008

Lock & Send Multiple Worksheet Automatically

Ever wanted to lock and send data from multiple worksheet in a just one click button ? Dont worry, I write a simple code in VBSCript which you can embeded in your excel file :

Declare Function EssVGetHctxFromSheet Lib “ESSEXCLN.XLL” (ByVal sheetName As Variant) As Long
Declare Function EssVConnect Lib “ESSEXCLN.XLL” (ByVal sheetName As Variant, ByVal userName As Variant, ByVal password As Variant, ByVal Server As Variant, ByVal application As Variant, ByVal database As Variant) As Long
Declare Function EssVDisconnect Lib “ESSEXCLN.XLL” (ByVal sheetName As Variant) As Long
Declare Function EssMenuVLock Lib “ESSEXCLN.XLL” () As Long
Declare Function EssVSendData Lib “ESSEXCLN.XLL” (ByVal sheetName As Variant, ByVal Range As Variant) As Long
Declare Function EssVSetGlobalOption Lib “ESSEXCLN.XLL” (ByVal item As Long, ByVal globalOption As Variant) As Long
Declare Function EssVGetGlobalOption Lib “ESSEXCLN.XLL” (ByVal item As Long) As Variant

‘VB Declaration Section. See ESB32.BAS for a list of Visual Basic declarations.
Declare Function EsbExport Lib “ESBAPIN.DLL” (ByVal hCtx As Long, ByVal AppName As String, ByVal DBName As String, ByVal FilePath As String, ByVal Level As Integer, ByVal isColumns As Integer) As Long
Declare Function EsbGetProcessState Lib “ESBAPIN.DLL” (ByVal hCtx As Long, ProcState As ESB_PROCSTATE_T) As Long
Declare Function EsbListLocks Lib “ESBAPIN.DLL” (ByVal hCtx As Long, ByVal AppName As String, ByVal DBName As String, pItems As Integer) As Long
Declare Function EsbGetNextItem Lib “ESBAPIN.DLL” (ByVal hCtx As Long, ByVal dType As Integer, pItem As Any) As Long

Dim hCtx As Long
Dim sts As Long
Dim AppName As String
Dim DBName As String
Dim PathName As String
Dim Level As Integer
Dim Columns As Integer
Dim Count As Integer
Dim x As Long

Global stCancel As Boolean
Global LastRowLog

Const ESB_DATA_INPUT = 3
Const ESB_STATE_DONE = 0 ‘ No process, or process complete
Const ESB_STATE_INPROGRESS = 1 ‘ Async process is in progress
Const ESB_LOCKINFO_TYPE = 5 ‘ ESB_LOCKINFO_T (ESBListLocks)
Const ESB_USERNAMELEN = 30 ‘ Max length of a user group
Const ESB_NO = 0
Type ESB_PROCSTATE_T
Action As Integer ‘ current process action
State As Integer ‘ current process state
Reserved1 As Integer ‘ reserved for future use
Reserved2 As Long ‘ reserved for future use
Reserved3 As Long ‘ reserved for future use
End Type

Type ESB_LOCKINFO_T
LoginId As Long ‘ user identification tag
Time As Long ‘ maximum time held (in seconds)
nLocks As Integer ‘ number of block locks held
userName As String * ESB_USERNAMELEN ‘ user/group name

End Type

Dim ProcState As ESB_PROCSTATE_T
Dim LockInfo As ESB_LOCKINFO_T

Function SendData(WorkBookFile, Server, AppName, DBName, UserID, Pwd) As Integer
Dim wb As Workbook
Dim ws As Worksheet
Dim WorkBookName As String
Dim fso As New FileSystemObject
Dim firstws
Dim temp
Dim lastusedcell
Dim i
Dim j, k

DoEvents
If stCancel = True Then
SendData = -2
Exit Function
End If

WorkBookName = fso.GetFile(WorkBookFile).Name

If Not WorkbookOpen(WorkBookName) Then
Workbooks.Open WorkBookFile, False, True
End If

Set wb = Workbooks(WorkBookName)

firstws = GetFirstActiveSheet(WorkBookName)

DoEvents
If stCancel = True Then
SendData = -2
wb.Close
Exit Function
End If

temp = “[" & WorkBookName & "]” & firstws

x = EssVConnect(temp, UserID, Pwd, Server, AppName, DBName)
hCtx = EssVGetHctxFromSheet(temp)
If hCtx = 0 Then
MsgBox (”General Error in connecting to sheet.”)
GoTo Quit
End If
If x <> 0 Then
MsgBox (”Connect Failed. Error: ” + Str(x))
End If

DoEvents
If stCancel = True Then
SendData = -2
wb.Close
Exit Function
End If

‘Get Global Options and set the message level. If level value is set to display message, turn it off.

x = EssVGetGlobalOption(5)
If x < 4 Then
x = EssVSetGlobalOption(5, 4)
End If

j = 0

For Each ws In wb.Worksheets
DoEvents
DoEvents
If stCancel = True Then
SendData = -2
wb.Close
Exit Function
End If

If ws.Visible = xlSheetVisible Then
temp = “[" & WorkBookName & "]” & ws.Name
LastRowLog = LastRowLog + 1
Workbooks(WorkBookName).Activate
Sheets(ws.Name).Select

DoEvents
DoEvents
If stCancel = True Then
SendData = -2
wb.Close
Exit Function
End If

x = EssMenuVLock()
x = EssVSendData(temp, Range(”A1:” & lastusedcell))

j = j + 1

DoEvents
DoEvents
If stCancel = True Then
SendData = -2
Exit For
End If

End If
Next

‘Logout all sheets
k = 0
For Each ws In wb.Worksheets
DoEvents
If ws.Visible = xlSheetVisible Then
k = k + 1
If k > j Then
Exit For
End If

temp = “[" & WorkBookName & "]” & ws.Name
x = EssVDisconnect(temp)

End If

Next

wb.Close
SendData = 1

Exit Function

Quit:

wb.Close
If hCtx = 0 Then
SendData = -1
End If
If x <> 0 Then
SendData = -1
End If

End Function

Outline Extractor from Applied OLAP, Inc

Recently I try to find a way to compare two similar essbase outline between development version and production one. Then I found that OlapUnderground Outline Extractor is very nice tool to help me. It has the ability to export all outline member to the flat file. So All I do is just exporting two outlines, open it with an editor which can compare two files (you can use Notepad++ or UltraEdit), and figure out the difference between both files. Nice & Easy.