0% found this document useful (0 votes)
34 views3 pages

MaxL Script Examples for Levis Database

This document provides examples of MaxL scripts used for loading and managing data in Essbase databases. The scripts demonstrate commands for loading data into applications and databases, clearing and initializing data, exporting data to files, executing calculations, and managing connections and log files. Common MaxL script commands are also summarized.

Uploaded by

venkat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

MaxL Script Examples for Levis Database

This document provides examples of MaxL scripts used for loading and managing data in Essbase databases. The scripts demonstrate commands for loading data into applications and databases, clearing and initializing data, exporting data to files, executing calculations, and managing connections and log files. Common MaxL script commands are also summarized.

Uploaded by

venkat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Maxl Script

MaxL

Here are some examples of Essbase Maxl Scripts. They were


based off of the [Link] and [Link] databases.

Levis Application Name

Sales Database Name

Load Data into the [Link] database. Those items in bold


should be utilized in all maxl scripts.
spool on to [Link];
login admin password on localhost;
set timestamp on;
UNLOAD APPLICATION
alter system unload application Levis;
LOAD APPLICATION
alter system load application Levis;
CLEAR DATA FROM ASO APPLICATION
alter database [Link] reset;
INITIALIZE ASO BUFFER
alter database [Link] initialize load_buffer with buffer_id 1;
LOAD DATA TO BUFFER 1
import database [Link] data
from local data_file
$ARBORPATH/app/Levis/Sales/[Link]
using server rules_file dataload to load_buffer with buffer_id 1
on error write to
[Link];
LOAD DATA FROM BUFFER
import database [Link] data from load_buffer with buffer_id 1;
AGGREGATE DATABASE
execute aggregate process on database [Link] stopping when total_size exceeds 1.5;
logout;
spool off;

exit;
NOTE: You can put the spool on after the login code so that your log file will capture the login
information.
Other commonly used Maxl Script commands:
LOAD APPLICATION AND DATABASE
alter system load application Levis;
alter application Levis load database Sales;
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: Same syntax for Block Storage vs Aggregate Storage Databases
EXPORT DATABASE TO 8 FILES
export database [Link] level0 data in columns
to data_file C:\Temp\[Link],
C:\Temp\[Link],
C:\Temp\[Link],
C:\Temp\[Link],
C:\Temp\[Link],
C:\Temp\[Link],
C:\Temp\[Link],
C:\Temp\[Link];
Tis 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/Levis/Sales/[Link]
to data_file C:\Temp\[Link];
EXECUTE CALCULATION
execute calculation [Link];
KILL ALL REQUESTS TO DATABASE

alter system kill request on application Sales;


LOGOUT ALL SESSIONS TO DATABASE
alter system logout session on application Sales;
DISABLE CONNECTIONS TO DATABASE
alter application Sales disable connects;
ENABLE CONNECTIONS TO DATABASE
alter application Sales enable connects;
CLEAR APPLICATION LOG FILE
alter application Sales clear logfile;
CLEAR ESSBASE LOG FILE
alter system clear logfile;
LOAD DATA TO ASO SLICE
import database [Link] data from load_buffer with buffer_id 1 override values create slice;

You might also like