100% found this document useful (1 vote)
4K views4 pages

Essential MaxL Commands for Essbase

The document provides examples of MaxL scripts used for common tasks in Hyperion Essbase including: 1) Loading applications and databases, executing calculations, importing and exporting data. 2) It lists commonly used MaxL commands for managing applications, databases, and performing tasks like setting variables, killing requests, and collecting statistics. 3) An example Esscmd script is provided to load data and execute calculations on a database.

Uploaded by

Amit Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
4K views4 pages

Essential MaxL Commands for Essbase

The document provides examples of MaxL scripts used for common tasks in Hyperion Essbase including: 1) Loading applications and databases, executing calculations, importing and exporting data. 2) It lists commonly used MaxL commands for managing applications, databases, and performing tasks like setting variables, killing requests, and collecting statistics. 3) An example Esscmd script is provided to load data and execute calculations on a database.

Uploaded by

Amit Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Learn Hyperion/OBIEE by Amit Sharma [Link] or aloo_a2@yahoo.

com

People who are new to Essbase find it very difficult to memorize or understand as there are
plenty of MaxL functions are used. This is my efforts to give a list of MaxL commands which we
use in our day to day life, specially when we as Essbase Admin or Production Support. These are
the list of MaxL commands along with some sample examples of MaxL file to load data and
execute calculation script.

Some Sample Scripts


Example#1 login $1 $2;

spool on to 'd:\temp\exec_cal.txt';

/*alter system load application 'FinOps';

alter application 'FinOps' load database 'Findb'; */

/* embed the calculation statement into maxl script */

execute calculation 'CALC ALL;' on 'FinOps'.'Findb' ;

/* execute stored server calculation scripts */

execute calculation 'FinOps'.'Findb'.'cal-rank';

spool off;

logout;

Example#2
login $1 $2; /* login section */

spool on to 'd:\Data_file\Jan_Sales.txt'; /* log the result */

alter system load application 'FinOps';

alter application 'FinOps' load database 'Findb';

/* import dimension member from sql database */

import database 'FinOps'.'Findb' dimensions connect as 'xxxxxxxxxxxxxx' identified by


'xxxxxxxxx' using server rules_file 'addday' on error write to 'd:\[Link]';
spool off;
logout;
Learn Hyperion/OBIEE by Amit Sharma [Link] or aloo_a2@[Link]

Some commonly used MaxL Script commands:

/*--------------------------------------------------------------------------*/
/* LOAD APPLICATION AND DATABASE */
/*--------------------------------------------------------------------------*/
alter system load application ASOsamp;
alter application ASOsamp load database Sample;

/*--------------------------------------------------------------------------*/
/* COPY BSO OTL TO ASO APPLICATION */
/*--------------------------------------------------------------------------*/
CREATE OR REPLACE OUTLINE ON AGGREGATE_STORAGE DATABASE [Link] AS
OUTLINE ON DATABASE [Link] ;

/*--------------------------------------------------------------------------*/
/* BUILD ACCOUNTS DIMENSION */
/*--------------------------------------------------------------------------*/
set Dimension=Accounts;
set RulesFile=AcctASO;
import database [Link] dimensions
from local data_file 'C:\Temp\[Link]'
using server rules_file 'Accounts'
on error write to '[Link]';

NOTE: This process is useful when the export files are very large and go over the standard 2GB
size and this gives you the ability to control how many files are created (always 8
files)...especially if you have automated processes that rebuilds your databases each night.

/*--------------------------------------------------------------------------*/
/* SET VARIABLE FOR CURRENTMONTH */
/*--------------------------------------------------------------------------*/
alter database [Link] set variable "CurrentMonth" "July";

/*--------------------------------------------------------------------------*/
/* EXPORT DATA USING REPORT SCRIPT */
/*--------------------------------------------------------------------------*/
export database [Link] using report_file
"'$ARBORPATH/app/ASOsamp/Sample/[Link]'" to data_file 'C:\Temp\[Link]';

/*--------------------------------------------------------------------------*/
/* EXECUTE CALCULATION */
/*--------------------------------------------------------------------------*/
execute calculation [Link];
Learn Hyperion/OBIEE by Amit Sharma [Link] or aloo_a2@[Link]

/*--------------------------------------------------------------------------*/
/* KILL ALL REQUESTS TO DATABASE */
/*--------------------------------------------------------------------------*/
alter system kill request on application Sample;

/*--------------------------------------------------------------------------*/
/* LOGOUT ALL SESSIONS TO DATABASE */
/*--------------------------------------------------------------------------*/
alter system logout session on application Sample;

/*--------------------------------------------------------------------------*/
/* DISABLE CONNECTIONS TO DATABASE */
/*--------------------------------------------------------------------------*/
alter application Sample disable connects;

/*--------------------------------------------------------------------------*/
/* ENABLE CONNECTIONS TO DATABASE */
/*--------------------------------------------------------------------------*/
alter application Sample enable connects;

/*--------------------------------------------------------------------------*/
/* EXPORT LRO AS A MIGRATION STRATEGY */
/*--------------------------------------------------------------------------*/
export database [Link] lro to server directory 'exportedLROs';

/*--------------------------------------------------------------------------*/
/* CLEAR APPLICATION LOG FILE */
/*--------------------------------------------------------------------------*/
alter application Sample clear logfile;

/*--------------------------------------------------------------------------*/
/* CLEAR ESSBASE LOG FILE */
/*--------------------------------------------------------------------------*/
alter system clear logfile;

/*--------------------------------------------------------------------------*/
/* LOAD DATA TO ASO SLICE */
/*--------------------------------------------------------------------------*/
Learn Hyperion/OBIEE by Amit Sharma [Link] or aloo_a2@[Link]

import database [Link] data from load_buffer with buffer_id 1 override values create
slice;
* to execute:
essmsh scriptname username password
*/

Collect Statistics
login $1 $2;
spool on to 'c:\mxlouts\[Link]';
alter database [Link] set performance statistics enabled;
execute calculation
'SET MSG ERROR;
CALC ALL;'
on [Link];
alter database [Link] set performance statistics mode to medium persistence server
scope;
query database [Link] get performance statistics kernel_io table;
alter database [Link] set performance statistics mode to long persistence database
scope;
query database [Link] get performance statistics kernel_cache table;
alter database [Link] set performance statistics mode to medium persistence
database scope;
query database [Link] get performance statistics end_transaction table;
query database [Link] get performance statistics database_synch table;
query database [Link] get performance statistics database_asynch table;
spool off;
logout;

Esscmd Example
LOGIN "amit-PC" "Admin" "password";
select "sample" "basic";
disablelogin;
loaddata 2 [Link]
calcdefault;
ENABLELOGIN;
EXIT;

You might also like