Showing posts with label Essbase. Show all posts
Showing posts with label Essbase. Show all posts

1/24/10

Cannot start Essbase Server?

Problem: Cannot start Essbase Server?
The message is: Fatal Error: invalid item Index in Security File.

I can start the Essbase Service in Windows Service, and it shows "started", one second later, I refresh, it shows not started. I think it is about the Essbase.sec file corrupted, and I have rename essbase.bak to essbase.sec, still not working. I don't have an old backup for the essbase.sec. Should I reinstall Essbase? Please advise,thanks!
----------------
Solution 1(by GlennS):
If the security file is corrupted and you don't have a backup, you do not need to reinstall. You might lose all your security information howver.


First, rename the essbase.sec file

Then open a cmd window and enter Essbase.exe you should have Essbase start in the foreground and be asking for information. Enter the organization name

When it asks for the user, put in the admin id then the admin password. It should start Essbase, but none of the applications will be recognized.

Next start EAS and and right click oin the applications and select create application. One by One enter in the application names that are in the arborpath\Essbase\essbase\server\app folder.

It should re-add the applications.

Recreate any filters you had and if you are running shared services try to resync the users and groups.
--------------
Solution 2(by JohnGoodWin):
Just to add if you are using shared services,


have you tried renaming ESSBASE.BAK_startup to ESSBASE.sec to see if that works.

If that doesn't then ESSBASE.BAK_postUPM to ESSBASE.sec will be the essbase sec file just after essbase was converted to shared services mode.

1/10/10

What is the main develloping tool for design an Essbase?

Which one of the below or else is the main develloping tool to design an Essbase?

1. Essbase Studio Client Console
2. Essbase Integration Service Console
3. Essbase Administration Service Console
Essbase Stidio exists only in version 11, EAS can be used to modify a cube for sure, but in the beginning status to configure a cube, seems we should use another tool for the design of Essbase Cube. EIS is the tool to develope cube from RLDB. But after Essbase Studio appear, seems Essbase Studio is a more powerful tool to develop a CUBE, but I cannot find the method to create attriibute dimension and the place to associate attribute dimension with standard dimension using Essbase Studio Console?
Which tool is the most powerful to create a CUBE that include: alias, formula, attribute dim ans association, and UDA?
---------------
Answer(By JohnGoodWin):
Create a Hierarchy as usual and add your columns for your attribute dimenion, preview make sure your hierarchy is correct. Edit the hierarchy you want to map the attributes dimension to, add the attribute mapping to the hierarchy. (so attribute member mapped to dimension member)
(remember there needs to be a relational ship between the dimension members to the attribute members in your source)
There is an example of adding the mapping to a hierarchy on page 126 of EAS user guide (Multi-chain Hierarchy with Attribute Dimensions)
In the model select dimension > essbase properties > click the attribute member and then select the attribute settings. (this won't appear until you have correctly added the attribute mapping in the hierarchy set up)
------------------
Answer(By Cameron L):
To be totally pedantic, there are two tools that are missing:

1) EPMA -- Not my cup of tea, but can build a database and it supposedly works in v11, at least sometimes
2) If Business Rules is part of EAS, as is the Essbase calc script writer, you need to throw Calc Manager onto the list
I've never built an Essbase database through EPMA (although I have rapidly run away from EPMA/Planning more than once) but it's doable and apparently some like it. To me it is like liver and onions, but to each his own.
Which tool is the "best", or the main one? A case of horses for courses, I think. The project is going to dictate it, but my preference would be:
SQL driven for drill back and database creation (think ASO apps that need to get recreated) -- Studio if possible
Still SQL driven (I love load rules), prototypes (at least for me), BSO, Planning/BSO, calc scripts/HBRs -- EAS
---------------------
Answer(By Daniel):
EAS of course! EIS and Studio is gear towards ability to build a cube with drill back to a relational source. EAS is focus mainly on the cube itself and thus has all the advantages you described and therefore building things like attribute dimensions with ease.

1/7/10

Change the Database Name in Essbase Studio

Is there a way to change the database name in Essbase Studio, what I can see now once we have registered a database in Database Sources panel, we can't change the Database Name because it is always grayed out but the server name, user name and password can be changed.

Actually I have mentioned this issue to our team before starting development and they proposed me the schema that I can use, but suddenly our client did not agree with it that we have been using, and then our client asked us to use another schema, FYI we are using Oracle Database as the data source.
Can you guys here share how to manage this situation.
Thanks,
Rudy
---------------
For Essbase Studio, the configuration metadata are saved as CP_tablenames, look for the CP tables, and make proper database change for the database name.

1. Make a Oracle backup for the CP tables before you change the metadata so that you can get back in case if error
2. Change the CP_CONNECTION TABLE, NAME column
3. Change the CP_SOURCE table, column DNAME, for example, it is called TBC.Sales, change to NewDB.Sales
I am not sure if there are other table also need to be updated, anyway, when you update the DBname in the metadata level, everything should be consistent in all of the related tables. Here, I assume the new db has the same table names as the old db, if the new db has very different table names, recreating everything may be easier and has less risk.
Bob Wang

12/26/09

Essbase Migration

EAM provides a Wizard for migrating Essbase applications, databases, and user/group security from one server to another. For example, you might migrate an application from a development to test server or from a production to a test server to try out a new release of Essbase software. With Migration Wizard, you can migrate application and database objects and security without leaving the Administration Services console.

The following points apply to applications migrated using Migration Wizard:
1. Only application and database objects and user/group security are migrated. No data is transferred.
2. Objects and security on the source server are unchanged. Migration Wizard makes copies on the target server.
3. Source and target servers may be on different operating systems. For example, you can migrate an application from a Windows to a Unix server.

The data can be loded to the target after the running of Migration Wizard.

Prerequisites:
Before starting this tutorial, you should:
1. Have both an Essbase Release 7.1.0 server and an Essbase Release 9.3.1 server installed and running.
2. Utilize Essbase native security on both servers.
3. Have an Essbase application on the Release 7.1.0 server available for migrating. This tutorial migrates an application called Mexcorp.

12/25/09

Application Builder for .NET

Application Builder for .NET provides a comprehensive set of OLAP-aware classes for data navigation, selection, reporting, and visualization to assist you in building custom analytical applications. These controls provide you with the tools to quickly create and deploy applications in stand-alone, client-server, Web, or distributed processing environments. Application Builder for .NET is a component of the Oracle Enterprise Performance Management system that provides an application development workbench for companies wanting to use the Microsoft .NET Framework to create tailored business performance management solutions. Application Builder for .NET includes the following key features:
● Drag and Drop components for creating OLAP aware applications for Web and Windows using MS Visual Studio.Net
● .NET Framework compatibility
● Web Service -based architecture (SOAP)
Application Builder for .NET provides the following functionality:
● Base classes. These classes contain basic OLAP functionality and encapsulate functionality necessary to connect to and perform operations on Essbase applications and databases.
● Dialog components. These classes encapsulate the functionality of Essbase dialog boxes, including the sign-on and member selection dialog boxes.

To develop Application Builder for .NET applications within Visual Studio for .NET, perform the following steps:
● Install and configure Microsoft Visual Studio for .NET.
● Install Application Builder for .NET and note which directory contains theApplication Builder for .NET assemblies.
● If you are developing an ASP .NET (Active Server Pages) application, install or ensure access to an instance of Microsoft Internet Information Server (IIS).
● If you are developing applications using Microsoft Office Web Components (OWC11), you may need to add Microsoft Office Primary Interop Assemblies and install additional assemblies available from http://www.microsoft.com/.
● Install or ensure access to an Essbase server and application.
This guide assumes that you will be using the Sample application and Basic database installed with Essbase.
● Ensure that the Application Builder for .NET .WAR file has been applied to your Web application server.
● Ensure that Oracle Hyperion Provider Services™ is running, and that your application server can access it.

Essbase Studio

Essbase Studio only exists in version 11, it is derived from earlier Essbase Integration Service, but it is more powerful than EIS. It is used to design the Essbase outline from RLDB data source and flat file.

Also, it has a functonality that can migrate EIS catalog to Essbase Studio Catalog. Same as EIS, a common metadata repository, or catalog, captures all metadata related to all Essbase applications built in the enterprise and allows the reuse of metadata at the lowest level of granularity. The catalog gives Essbase Studio knowledge of the common metadata that is shared across the various applications enterprise-wide.The metadata catalog is still saved in RLDB, it describes the metadata repository.
The Source Navigator, displayed by default in the right pane of the Essbase Studio Console, has two tabs, the Data Sources tab and the Minischemas tab.
. Data Sources tab—Lists the physical data sources to which you have created connections. You can also launch the Connection Wizard from this tab, where you create data source connections.
. Minischemas tab—Lists the graphical representations of the tables you select from one or more data sources connections. You can create minischemas when creating data source connections, or you can create them later.

12/9/09

Essbase Migration Keys

1. Make hardware and the version upgrade.
2. Install the application on the new server.
3. Use the migration wizard, this would migrate all the objects, but not the data.
4. Import and export is the way to get the data after migration.
5. Open ports on the servers, make sure no port conflict.
6. Make sure the same language is selected
7. Create the ODBC drivers if SQL interface is used.
8. Put the customized Java functions in the UDF folder
9. Copy Substitution variables to the new server
10. Verify security on the new server, sometimes the migration wizard doe not do it properly
11. Check Essbase config file and copy over needed parameters
12. Do lots of testing of calc scripts, report scripts, and MDX scripts

12/2/09

Java - Run Essbase Report Script

/*
RunReport.java
*/
package com.essbase.samples.japi;
import com.essbase.api.base.*;
import com.essbase.api.session.*;
import com.essbase.api.datasource.*;
//import com.essbase.api.dataquery.*;
import com.essbase.api.domain.*;
//import com.essbase.api.metadata.*;
/**RunReport Example does the following: Signs on to essbase domain,
Runs a report and Signs Off.
In order for this sample to work in your environment, make sure to
change the s_* variables to suit your environment.
*/
public class RunReport {
// NOTE: Change the following variables to suit your setup.
private static String s_userName = "admin";
private static String s_password = "password";
private static String s_olapSvrName = "bobpc";
/* Possible values for s_provider:
"Embedded" or "http://localhost:13080/aps/JAPI" */
private static String s_provider = "Embedded"; // Default
private static final int FAILURE_CODE = 1;
public static void main(String[] args) {
int statusCode = 0;
IEssbase ess = null;
IEssOlapServer olapSvr = null;
try {
acceptArgs(args);
// Create JAPI instance.
ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
// Sign On to the Provider
IEssDomain dom
= ess.signOn(s_userName, s_password, false, null, s_provider);
// Open connection with OLAP server and get the cube.
olapSvr = (IEssOlapServer)dom.getOlapServer(s_olapSvrName);
olapSvr.connect();
IEssCube cube = olapSvr.getApplication("Sample").getCube("Basic");
executeReport(cube);
System.out.println("\nReport Execution Sample Completed.");
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
statusCode = FAILURE_CODE;
} finally {
// Close OLAP server connection and sign off from the domain.
try {
if (olapSvr != null && olapSvr.isConnected() == true)
olapSvr.disconnect();
} catch (EssException x) {
System.err.println("Error: " + x.getMessage());
}
try {
if (ess != null && ess.isSignedOn() == true)
ess.signOff();
} catch (EssException x) {
System.err.println("Error: " + x.getMessage());
}
}
// Set status to failure only if exception occurs and do abnormal termination
// otherwise, it will by default terminate normally
if (statusCode == FAILURE_CODE) System.exit(FAILURE_CODE);
}
static void executeReport(IEssCube cube) throws EssException {
try {
// Execute a report by passing the specification string.
String repSpec = "{TABDELIMIT}" +
"{SUPALL COLHEADING NAMESON BLOCKHEADERS PAGEHEAD INDENTGEN 2 DECIMALS VARIABLE}" +
"
"
"{INCZEROROWS}" +
"{MISSINGTEXT \"n/a\"}
"
"{ OUTALTNAMES }" +
"
System.out.println("Executing a report by passing the specification string....");
System.out.println("\n\nReport Output for spec: "+repSpec+"\n----------------"+
"------------------------------------------------------------");
String output = cube.report(repSpec, true, false);
System.out.println(output);
// Execute a report by passing file name in the server.
String reportFile = "Top";
System.out.println("\nExecuting a report by passing file name in the server....");
System.out.println("\n\nReport Output for file: " + reportFile +
"\n-----------------------------");
output = cube.report(true, false, reportFile, false);
System.out.println(output);
// Copy a report file from server to JAPI client, and execute the
// report by passing this client file name.
reportFile = System.getProperty("java.io.tmpdir")+"Bottom.rep";
cube.copyOlapFileObjectFromServer(IEssOlapFileObject.TYPE_REPORT,
"Bottom", reportFile, false);
System.out.println("\n\nReport Output for file: " + reportFile +
"\n-----------------------------");
output = cube.report(true, false, reportFile, true);
System.out.println(output);
// Execute a report and get the output as an iterator. This is
// useful when report returns large resultset.
reportFile = "Asym";
System.out.println("\nExecuting a report to get output as an iterator....");
System.out.println("\n\nReport Output for file: " + reportFile +
"\n-----------------------------");
IEssSequentialIterator iterator = cube.report(reportFile, true, false,
true, false);
while ((iterator.isEndOfData() == false) &&
((output = iterator.getNextString()) != null))
System.out.println(output);
} catch (EssException x) {
System.err.println("Error: " + x.getMessage());
}
}
static void acceptArgs(String[] args) throws EssException {
if (args.length >= 4) {
s_userName = args[0];
s_password = args[1];
s_olapSvrName = args[2];
s_provider = args[3]; //PROVIDER
} else if (args.length != 0) {
System.err.println("ERROR: Incorrect Usage of this sample.");
System.err.println(
"Usage: java " + RunReport.class.getName() + " ");
System.exit(1); // Simply end
}
}
}

11/29/09

Essbase Excel Report

The report developing with Excel is very simple. The way is:
1. Design an interactive interface on Excel, that include: listing box, drop down box, text box, label, button, radio option, check box,etc. For example, the region listing box, the product category listing box, the process(data retrieve) button, the submit or update button.
2. Add proper VBA code and call VBA MACRO functions on these control boxes. Macro such as: ESSConnect(), ESSMenu(), ESSRetrieve(),etc
3. Then we can run the on demand interactive Excel report to make special query on the Essbase data, and navigate on different sheets.
4. The VBA code related to these control boxes can be saved as a VBA function library, so that the code can be reused on other Excel report

The next is a simple but standard sample:



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 EssVGetMemberInfo Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal mbrName As Variant, ByVal action As Variant, ByVal aliases As Variant) As Variant

Declare Function EssVDisconnect Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant) As Long



Declare Function EssVFreeMemberInfo Lib "ESSEXCLN.XLL" (ByRef memInfo As Variant) As Long

Const EssBottomLevel = 3

Const EssChildLevel = 1

Const username = "admin"

Const password = "password"

Const ServerName = "bobpc"

Const AppllicationName = "Sample"

Const EssbaseDataBase = "Basic"

Sub Disconnect()

sFileName = ThisWorkbook.Name

For Each wsSheet In Worksheets

X = EssVDisconnect(sFileName & wsSheet.Name)

Next wsSheet

If X = 0 Then

answer = MsgBox("Disconnected!", 64, "Connection Dialog")

End If



End Sub

Sub lstRegion_Change()

v_ListIndex = Sheet1.Shapes(2).ControlFormat.ListIndex

v_ListText = Sheet1.Shapes(2).ControlFormat.List(v_ListIndex)

Call GetBottom(v_ListText)

End Sub

Sub UnselectListBox(ByVal ListBoxNam As Variant)



End Sub

Sub Refresh()

Call GetChild("Market")

Call GetBottom("Market")

End Sub

Sub Process()



End Sub

Sub Submit()



End Sub

Sub Export()

With Sheet1

Set cb = .Shapes.AddFormControl(xlCheckBox, 10, 10, 100, 10)

cb.ControlFormat.LinkedCell = "A1"

End With



End Sub

Sub Quit()



End Sub

Sub Actual()

'MsgBox (Sheet1.Shapes.Item(3).Name)



End Sub

Sub Budget()

'MsgBox (Sheet1.Shapes(3).ControlFormat.LinkedCell

End Sub



Sub Conn()

sFileName = ThisWorkbook.Name

For Each wsSheet In Worksheets

X = EssVConnect(sFileName & wsSheet.Name, username, password, ServerName, AppllicationName, EssbaseDataBase)

Next wsSheet

If X = 0 Then

' answer = MsgBox("Connected!", 64, "Connection Dialog")

Else

answer = MsgBox("not Connected!", 64, "Connection Dialog")

End If

End Sub

Public Sub Tester()

Dim rng As Range

Dim LastRow As Long



LastRow = Cells(Rows.Count, "A").End(xlUp).Row



Set rng = Range(LastRow - 1)

rng.Select



End Sub

Sub SelectFirstToLastInColumn()

' Select From the First NonBlank to the Last Nonblank in the Column

Cells(1, 1).Select

Set TopCell = Cells(1, ActiveCell.Column)

Set BottomCell = Cells(Rows.Count, ActiveCell.Column)

If IsEmpty(TopCell) Then Set TopCell = TopCell.End(xlDown)

If IsEmpty(BottomCell) Then Set BottomCell = BottomCell.End(xlUp)

If TopCell.Row = Rows.Count And BottomCell.Row = 1 Then

ActiveCell.Select

Else

Range(TopCell, BottomCell).Select

End If

End Sub





Sub GetChild(ByVal mbrName As Variant)

Call Conn





Dim vt As Variant

Dim cbItems As Variant

Dim i As Integer

Dim pMember As String



vt = EssVGetMemberInfo(ThisWorkbook.Name & "Sheet1", mbrName, EssChildLevel, False)

If IsArray(vt) Then

cbItems = UBound(vt) + 1



For i = 0 To UBound(vt)

Sheet1.Cells(i + 1, 1) = vt(i)

Next

Else

MsgBox ("Return Value = " + Str(vt))

End If



' Select From the First NonBlank to the Last Nonblank in the Column



Cells(1, 1).Select

Set TopCell = Cells(1, ActiveCell.Column)

Set BottomCell = Cells(Rows.Count, ActiveCell.Column)

If IsEmpty(TopCell) Then Set TopCell = TopCell.End(xlDown)

If IsEmpty(BottomCell) Then Set BottomCell = BottomCell.End(xlUp)

If TopCell.Row = Rows.Count And BottomCell.Row = 1 Then

ActiveCell.Select

Else

Range(TopCell, BottomCell).Select

End If



Sheet1.Shapes(2).ControlFormat.ListFillRange = Range(TopCell, BottomCell).Address



'MsgBox (Worksheets(1).Shapes(2).Name)

X = EssVFreeMemberInfo(vt)



End Sub

Sub lstCity_Clear()

For i = 1 To 20

Sheet1.Cells(i, 2) = Null

Next

End Sub

Sub GetBottom(ByVal mbrName As Variant)



Call lstCity_Clear

Dim vt As Variant

Dim cbItems As Variant

Dim i As Integer

Dim pMember As String



vt = EssVGetMemberInfo(ThisWorkbook.Name & "Sheet1", mbrName, EssBottomLevel, False)



If IsArray(vt) Then

cbItems = UBound(vt) + 1

For i = 0 To UBound(vt)

Sheet1.Cells(i + 1, 2) = vt(i)



Next

Else

MsgBox ("Return Value = " + Str(vt))

End If

Cells(1, 2).Select

Set TopCell = Cells(1, ActiveCell.Column)

Set BottomCell = Cells(Rows.Count, ActiveCell.Column)

If IsEmpty(TopCell) Then Set TopCell = TopCell.End(xlDown)

If IsEmpty(BottomCell) Then Set BottomCell = BottomCell.End(xlUp)

If TopCell.Row = Rows.Count And BottomCell.Row = 1 Then

ActiveCell.Select

Else

Range(TopCell, BottomCell).Select

End If


Sheet1.Shapes(3).ControlFormat.ListFillRange = Range(TopCell, BottomCell).Address

X = EssVFreeMemberInfo(vt)

End Sub

BSO Intelligent Calculation

You can calculate the correct results by telling Essbase not to mark the calculated data blocks as
clean. The following calculation script calculates the correct results:
SET CLEARUPDATESTATUS OFF;
FIX(“New York”)
CALC DIM(Product);
ENDFIX
SET CLEARUPDATESTATUS AFTER;
FIX(“New York”)
CALC DIM(Year);
ENDFIX
With the SET CLEARUPDATESTATUS OFF command, Essbase calculates dirty data blocks but
does not to mark them as clean, unlike the SET CLEARUPDATESTATUS AFTER command.
This solution assumes that the data blocks are not marked as clean from a previous partial
calculation of the database.
You can ensure that all data blocks are calculated, regardless of their status, by disabling
Intelligent Calculation. The following calculation script calculates all specified data blocks,
regardless of their clean or dirty status:
SET UPDATECALC OFF;
FIX(“New York”)
CALC DIM(Year, Product);
ENDFIX
Because you have not used the SET CLEARUPDATESTATUS AFTER command, Essbase does
not mark calculated data blocks as clean.

Optimizing Parallel Data Load Processing

Although Essbase uses parallel processing to optimize processor resources across the data load stages, processor resources are idle at times. To take advantage of these times, Essbase can further divide record processing in the preparation and write stages. To tailor parallel processing to your situation, you can use the DLTHREADSPREPARE and DLTHREADSWRITE essbase.cfg settings to tell Essbase to use additional threads during these stages.

DLTHREADSPREPARE: Specifies how many threads Essbase may use during the data load stage that codifies and organizes the data in preparation to being written to blocks in memory.
DLTHREADSWRITE: Specifies how many threads Essbase may use during the data load stage that writes data to the disk. High values may require allocation of additional cache. See Implications in Sizing the Data Cache.
For ASO, Essbase Server uses one thread with aggregate storage cache. The DLTHREADSWRITE setting is ignored.
DLSINGLETHREADPERSTAGE: Specifies that Essbase use a single thread per stage, ignoring the values in the DLTHREADSPREPARE and DLTHREADSWRITE settings

11/28/09

Java - backup Essbase

We can create Java procedure that will automatically backup the Essbase database, and even recover the essbase database when necessary.
package com.essbase.samples.japi;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.io.File;

import com.essbase.api.base.EssException;
import com.essbase.api.datasource.EssSEQID;
import com.essbase.api.datasource.EssTRANSACTION;
import com.essbase.api.datasource.EssTRANSACTION_REPLAY;
import com.essbase.api.datasource.IEssCube;
import com.essbase.api.datasource.IEssOlapFileObject;
import com.essbase.api.datasource.IEssOlapServer;
import com.essbase.api.domain.IEssDomain;
import com.essbase.api.session.IEssbase;

/**
* Signs on to essbase domain,
* creates a App and Cube, backups the database(cube) and then restores it.
* In order for this sample to work in your environment, make sure to
* change the s_* variables to suit your environment.
*
* @author
* @version
*/
public class BackupAndRestoreDatabase {
// NOTE: Change the following variables to suit your setup.
private static String s_userName = "system";
private static String s_password = "password";
private static String s_olapSvrName = "localhost";
/* Possible values for s_provider:
"Embedded" or "http://localhost:13080/aps/JAPI" */
private static String s_provider = "Embedded"; // Default
private static final int FAILURE_CODE = 1;
public static void main(String[] args) {
int statusCode = 0;
IEssbase ess = null;
IEssOlapServer olapSvr = null;
try {
acceptArgs(args);
// Create JAPI instance.
ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
// Sign On to the Provider
IEssDomain dom = ess.signOn(s_userName, s_password, false, null,s_provider);
// Open connection with OLAP server and get the cube.
olapSvr = (IEssOlapServer) dom.getOlapServer(s_olapSvrName);
olapSvr.connect();
try {
// Delete the App if it already exists
olapSvr.getApplication("BackUp").delete();
} catch (EssException x) {
// Ignore Error
}
// Create a new Application/Cube : BackUp/Basic - Copy of Sample/Basic
olapSvr.createApplication("BackUp");
dom.copyCube(s_olapSvrName, "Sample", "Basic", s_olapSvrName, "BackUp","Basic");
olapSvr.disconnect();

olapSvr.connect();
IEssCube cube = olapSvr.getApplication("BackUp").getCube("Basic");
BackUpAndRestore(cube);

System.out.println("Cube Archive and Restore Sample completed.");
// Transaction logging requires the below essbase property to be set in essbase.cfg. Choose one
// of the below ways to set it.
// TransactionLogLocation AppName DbName LogLocation NATIVE ENABLE|DISABLE
// TransactionLogLocation AppName LogLocation NATIVE ENABLE
// TransactionLogLocation LogLocation NATIVE ENABLE
// Ex: TransactionLogLocation Sample Basic D:\Hyperion\AnalyticServices-950\app\Sample\Basic NATVIE ENABLE
// TransactionLoggingAndReplay(cube);

// Delete newly created Application.
olapSvr.getApplication("BackUp").delete();

} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
statusCode = FAILURE_CODE;
} finally {
// Close OLAP server connection and sign off from the domain.
try {
if (olapSvr != null && olapSvr.isConnected() == true)
olapSvr.disconnect();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}

try {
if (ess != null && ess.isSignedOn() == true)
ess.signOff();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}
}
// Set status to failure only if exception occurs and do abnormal termination
// otherwise, it will by default terminate normally
if (statusCode == FAILURE_CODE)
System.exit(FAILURE_CODE);
}

static void TransactionLoggingAndReplay(IEssCube cube) throws EssException {

Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DATE, -2);
cal.getTimeInMillis();
SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yyyy:HH:mm:ss");
String date = fmt.format(cal.getTime());
System.out.println("From Date specified for Transactions is :"+ date);
EssTRANSACTION[] list = cube.listTransactions((short)1, date, IEssCube.ESS_LIST_TRANSACTIONS_TOCLIENT, "");
if (list == null || list.length ==0) {
System.out.println("\nNo transactions to List or Replay since "+ date +".\n"
+"Please comment out the BackUpAndRestore(cube) function call in this sample and\n ensure you have executed a transaction like loaddata prior to running this sample.");

return;
}
for (int i = 0; i < list.length; i++) { System.out.println(list[i] +"\n"); } System.out.println("List transactions complete"); EssTRANSACTION_REPLAY replayTran = new EssTRANSACTION_REPLAY((byte)2, date, 1); EssSEQID[] seqIds = new EssSEQID[1]; seqIds[0] = new EssSEQID(list[0].getSeq_id(), list[0].getSeq_id_upper(), 1, list[0].getSeq_id_upper()); cube.replayTransactions(replayTran, seqIds); System.out.println("Relplay transactions complete"); } static void BackUpAndRestore(IEssCube cube) throws EssException { cube.loadData(true, false, "Product Market Actual Sales Jan 4469\n" + "Product Market Actual Sales Feb 42494"); String ArchiveFile = System.getProperty("java.io.tmpdir") + "demobasic.arc"; cube.archiveDatabase(ArchiveFile, "", true); // Take backup. cube.loadData(IEssOlapFileObject.TYPE_RULES, null, IEssOlapFileObject.TYPE_TEXT, "Calcdat", false); String[] Src = null; String[] Dest = null; // Unload Database before restoring. do { try { Thread.sleep(5000); cube.stop(); break; } catch(EssException x){ // If error occurs in unloading database because database is in use(Error #1013113), // wait for 5 sec. and try again. if(x.getNativeCode() == 1013113) continue; else break; } catch (Exception x) { break; } } while (true); cube.restoreDatabase(ArchiveFile, false, Src, Dest); // Restore database. (new File (ArchiveFile)).delete(); } static void acceptArgs(String[] args) throws EssException { if (args.length >= 4) {
s_userName = args[0];
s_password = args[1];
s_olapSvrName = args[2];
s_provider = args[3]; //PROVIDER
} else if (args.length != 0) {
System.err.println("ERROR: Incorrect Usage of this sample.");
System.err.println("Usage: java " + BackupAndRestoreDatabase.class.getName()
+ " ");
System.exit(1); // Simply end
}
}
}

11/25/09

Java Customized Calc Function

The essbase already have many functions for calculation. We can create customized calculation functions by Java. Steps:
1. Create a Java function,CalcFunc.java
public class CalcFunc {
public static double sum (double[] data) {
int i, n = data.length;
double sum = 0.0d;
for (i=0; i< n ; i++)
{
double d = data [i];
sum = sum + d;
}
return sum;
}
}
2. compile,run with javac CalcFunc.java, and generate CalcFunc.class
javac CalcFunc.java
C:\app\bob\product\11.1.0\db_1\jdk\bin\javac.exe C:\Hyperion\CustJava\CalcFunc.java
3. Put the class file in the jar file
jar cf jar_filename class_filename
jar cf CalcFunc.jar CalcFunc.class
4.On the computer running Essbase Server, copy the .jar file to one of the following directories (if the directory does not exist, create it):
For .jar files containing global custom-defined functions:
ARBORPATH/java/udf/
C:\Hyperion\products\Essbase\EssbaseServer\java\udf
For .jar files to be used only with specific applications:
ARBORPATH/app/AppName/udf/
5. Register
create function Sample.'@JSUM'
as 'CalcFunc.sum'
spec '@JSUM(memberRange)'
comment 'adds list of input members';

MaxL Perl Module

Windows: Download Perl source from http://www.cpan.org/ and build it yourself. You may use ActivePerl, available from http://www.activestate.com/. Before you install the Essbase.pm extension to Perl, ensure that:
You have Perl 5.6 (or higher) installed on your system.You have Microsoft Visual C++ version 6 or higher installed on your system.The Essbase Server is either installed locally, or you have at least the Runtime Client installed and your system's environment is set up to access a remote Essbase Server. Your system should have an environment variable $ESSBASEPATH pointing to the root directory of the Essbase Server installation. In addition, %ESSBASEPATH%\Bin should be included in your path variable. Note:MaxL Perl Module can only be used with the same version Essbase Server.

11/24/09

MaxL Automation Backup/Recovery

This paper is for the auto backup and recovery process for LDAP Shared Service and Essbase database.
1. In the essbase.cfg file, add:
    SPLITARCHIVEFILE TRUE
    TRANSACTIONLOGDATALOADARCHIVE SERVER_CLIENT

The 1st command will split big archive file into smaller one automatically. The 2nd command will enable the transaction logging.

2.  backupLDAP.bat
The code inside:
@echo off
REM Backup LDAP with HOTBackup
c:\Hyperion\products\Foundation\server\scripts\backup.bat C:\Hyperion\backup\HSS_backup

3. RecoveryLDAP.bat, the code inside:
@echo off

REM Backup LDAP with HOTBackup
c:\Hyperion\products\Foundation\server\scripts\recover.bat C:\Hyperion\backup\HSS_backup

4. BackupEssbaseMaxL.msh
spool on to 'c:\Hyperion\Logs\EssbaseArchive.log';

login $1 $2 on $3;
alter database Sample.Basic force archive to file 'C:\Hyperion\backup\SampleBasic';
alter database Demo.Basic force archive to file 'c:\Hyperion\backup\DemoBasic';
spool off;

5. backupEssbaseBSO.bat
echo off
REM Backup BSO Essbase
set uid=admin
set pwd=password
set svr=bobpc
essmsh "C:\Hyperion\auto\BackupEssbaseMaxL.msh" %uid% %pwd% %svr% %dt% %tm%
ren C:\Hyperion\backup\SampleBasic SampleBasic%date:~4,2%-%date:~7,2%-%date:~10%.arc
ren C:\Hyperion\backup\DemoBasic DemoBasic%date:~4,2%-%date:~7,2%-%date:~10%.arc
The idea is backup with general name, and use bat script rename the backup file with time stamp.

6. RecoveryEssbaseMaxL.msh
spool on to 'c:\Hyperion\Logs\EssbaseArchive.log';

alter database Sample.Basic force restore from file 'C:\Hyperion\backup\SampleBasic.arc';
alter database Demo.Basic force restore from file 'c:\Hyperion\backup\DemoBasic.arc';
alter database Sample.Basic replay transactions using sequence_id_range 2 to 2;
alter database Demo.Basic replay transactions using sequence_id_range 2 to 2;
spool off;

Please select the sequence id range by query
query database Sample.Basic list transactions;



7. RecoveryEssbaseBSO.bat
@echo off
REM Recovery BSO Essbase
essmsh "C:\Hyperion\auto\RecoveryEssbaseMaxL.msh"

The bat file for backup can be scheduled to run daily using Windows Scheduler.

ASO - add huge dim members

ASO always have a lot of members. the most polular methods are generation reference method and children reference method.

1. Create some rule files
2. Create some data files, the data files are not for data loading, but for member creation. Check the consistence between the data file and the rule files
3. If there are too much data members, you may have to use a computer language(such as JavaScript) to generate the better formated data files from a more basic original data file
4. Use Maxl Import command to load data to buffer from the data files in parallel
5. Use Maxl import command to load data from buffer to essbase

import database AsoSamp.Sample data connect as TBC identified by 'password' using multiple rules_file 'rule1','rule2' to load_buffer_block starting with buffer_id 100 on error write to "error.txt";
import database AsoSamp.Sample data from load_buffer with buffer_id 1, 2;

11/22/09

V11 Service Starting Sequence

The next is the sequence to correctly start the EAS for version 11:

1. Start the RLDB that hold the reporsitory of LDAP, Shared Service, and Essbase Server, in Windows system, it is related the next 3 services:

OracleOraDb11g_home1ConfigurationManager

OracleServiceORCL

OracleOraDb11g_home1TNSListener

2. Start the LDAP service, and the Hyperion Shared Service

Hyperion Foundation OpenLDAP

Hyperion Foundation Shared Services - Web Application

3. Start Essbase Server

Hyperion Essbase Services 11.1.1 - hypservice_1

4. Start the Essbase Administration Service

Hyperion Administration Services - Web Application



http://hyperionexpert.blogspot.com/

MDX Query - BottomPercent

WITH
SET [Lowest 5% products] AS
'BottomPercent (
{ [Product].members },
5,
([Measures].[Sales], [Year].[Qtr2])
)'

MEMBER
[Product].[Sum of all lowest prods] AS
'Sum ( [Lowest 5% products] )'

MEMBER [Product].[Percent that lowest sellers hold of all product sales] AS
'Sum ( [Lowest 5% products] ) / [Product] '

SELECT
{[Year].[Qtr2].children}
on columns,
{
[Lowest 5% products],
[Product].[Sum of all lowest prods],
[Product],
[Product].[Percent that lowest sellers hold of all product sales]
}
on rows
FROM Sample.Basic
WHERE ([Measures].[Sales])

11/21/09

Essbase ASO Perfromance

● Use stored hierarchies (rather than dynamic hierarchies) as much as possible.
● Use alternate hierarchies (shared members) only when necessary.
● Minimize the number of hierarchies. (For example, each additional stored hierarchy slows down view selection and potentially increases the size of the aggregated data).
● If a hierarchy is a small subset of the first hierarchy, consider making the small hierarchy a dynamic hierarchy. Considerations include how often the hierarchy data is queried and the query performance impact when it is dynamically queried at the time of retrieval.
● The performance of attributes is the same as for members on a stored hierarchy.
● The higher the association level of an attribute to the base member, the faster the retrieval query
------------------------------------------------------------------
● Convert BSO to ASO in case, ASO has much faster running performance compared to BSO. ASO cannot include Calculation Script however. Must use migration wizard for this transmision, besides, as soon as it is transferred to ASO, it cannot be transferred back t BSO.

11/19/09

Special Notices for Essbase

Note: there are 2 ways for Essbase backup and recovery

Method 1:
backup = full essbase backup + transaction log backup
recovery = full essbase recovery + replay transaction log

Method 2:
backup = backup all Essbase system files
recovery=replace essbase system files with the backup files
You can backup files while Essbase is in read only mode

The Essbase should be stopped while recovery is processing in method 1 or 2.
---------------------------------------------------------------------------
Note: Essbase Outline change will NOT be logged!
Note: in the essbase.cfg file, set the SPLITARCHIVEFILE configuration to TRUE. This will split archive file to smaller size(<2 GB).
Note: Partition commands (for example, synchronization commands) are not logged and,
therefore, cannot be replayed. When recovering a database, you must replay logged
transactions and manually make the same partition changes in the correct chronological order.
When using partitioned databases or using the @XREF function in calculation scripts, you must selectively replay logged transactions in the correct chronological order between the source and target databases.

Note: for ASO Essbase,the only way is system file backup:
1 Stop the application.
2 Use the file system to copy the contents of the application directory (ARBORPATH/app/appname),excluding the temp directory

-----------------------------------------------------------------------------
Set Essbase in read only mode when backing up:
alter database begin archive
Set Essbase back to read/write after backing up:
alter database end archive
----------------------------------------------------------------------------
Use export command to export data file is also a simple option to keep text format data backup, level 0 data is ok