Scripting Reference Oracle Essbase
Scripting Reference Oracle Essbase
Scripting Reference Oracle Essbase
F17647-06
September 2020
Oracle Essbase Scripting Reference for Oracle Essbase,
F17647-06
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,
any programs embedded, installed or activated on delivered hardware, and modifications of such programs)
and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government
end users are "commercial computer software" or "commercial computer software documentation" pursuant
to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such,
the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works,
and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs
embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle
computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the
license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud
services are defined by the applicable contract for such services. No other rights are granted to the U.S.
Government.
This software or hardware is developed for general use in a variety of information management applications.
It is not developed or intended for use in any inherently dangerous applications, including applications that
may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you
shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its
safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of
their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are
used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc,
and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered
trademark of The Open Group.
This software or hardware and documentation may provide access to or information about content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise
set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not
be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content,
products, or services, except as set forth in an applicable agreement between you and Oracle.
Contents
iii
3 MaxL
How to Read MaxL Railroad Diagrams 3-1
Anatomy of MaxL Statements 3-1
Railroad Diagram Symbols 3-2
Sample Railroad Diagram 3-3
MaxL Statements 3-4
Performance Statistics in MaxL 3-4
The Essbase Performance Statistics Tables 3-4
MaxL Script Example 3-9
Listed By Verbs 3-10
Alter 3-10
Create 3-11
Display 3-11
Drop 3-12
Execute 3-12
Export 3-12
Grant 3-12
Import 3-12
MaxL Shell Invocation 3-13
Logout 3-22
Query 3-23
Refresh 3-23
Listed by Objects 3-23
Aggregate Build 3-24
Aggregate Process 3-24
Aggregate Selection 3-24
Allocation 3-24
Application 3-24
Archive_file 3-24
Calculation 3-24
Data 3-25
Database 3-25
Dimensions 3-25
Drillthrough 3-25
Filter 3-25
Group 3-25
Location Alias 3-25
Lock 3-26
LRO 3-26
Object 3-26
iv
Outline 3-26
Partition 3-26
Privilege 3-26
Session 3-26
System 3-27
Tablespace 3-27
Trigger 3-27
Trigger Spool 3-27
User 3-27
Variable 3-27
MaxL Statement Reference 3-27
Alter Application 3-27
Alter Database 3-31
Alter Database enable | disable 3-32
Alter Database Set 3-34
Alter Database (Misc) 3-38
Alter Drillthrough 3-42
Alter Filter 3-43
Alter Object 3-45
Alter Partition 3-46
Alter Session 3-49
Alter System 3-51
Alter Tablespace (Aggregate Storage) 3-57
Alter Trigger 3-59
Create Application 3-60
Create Calculation 3-61
Create Database 3-62
Create Drillthrough 3-64
Create Filter 3-65
Create Location Alias 3-66
Create Partition 3-68
Create Replicated Partition 3-68
Create Transparent Partition 3-72
Create Trigger 3-74
Create After-Update Trigger 3-75
Create On-Update Trigger 3-76
Display Application 3-78
Display Calculation 3-80
Display Database 3-81
Display Drillthrough 3-86
Display Filter 3-87
v
Display Filter Row 3-88
Display Group 3-88
Display Location Alias 3-89
Display Lock 3-90
Display Object 3-91
Display Partition 3-92
Display Privilege 3-93
Display Session 3-94
Display System 3-96
Display Trigger 3-99
Display Trigger Spool 3-100
Display User 3-100
Display Variable 3-103
Drop Application 3-104
Drop Calculation 3-104
Drop Database 3-105
Drop Drillthrough 3-105
Drop Filter 3-106
Drop Location Alias 3-106
Drop Lock 3-107
Drop Object 3-108
Drop Partition 3-108
Drop Trigger 3-110
Drop Trigger Spool 3-110
Execute Calculation 3-110
Execute Aggregate Process (Aggregate Storage) 3-113
Execute Aggregate Build 3-114
Execute Aggregate Selection 3-116
Export Data 3-120
Export LRO 3-122
Export Outline 3-124
Grant 3-127
Import Data 3-128
Import Dimensions 3-130
Import LRO 3-132
Query Application 3-133
Query Archive_File 3-134
Query Database 3-135
Refresh Outline 3-140
Refresh Replicated Partition 3-142
MaxL Definitions 3-143
vi
MaxL Syntax Notes 3-143
Numbers in MaxL Syntax 3-145
Terminals 3-145
ACTION 3-145
ALT-NAME-SINGLE 3-146
APP-NAME 3-146
AREA-ALIAS 3-148
BUFFER-ID 3-149
CALC-NAME 3-149
CALC-NAME-SINGLE 3-150
CALC-STRING 3-150
COLUMN-WIDTH 3-151
COMMENT-STRING 3-151
CONDITION 3-152
CUBE-AREA or MDX-SET 3-152
DATE 3-153
DBS-EXPORT-DIR 3-153
DBS-NAME 3-154
DBS-STRING 3-156
DIM-NAME 3-156
EXPORT-DIR 3-156
FILE-NAME 3-157
FILE-NAME-PREFIX 3-157
FILTER-NAME 3-158
FULL-EXPORT-DIR 3-158
GROUP-NAME 3-159
HOST-NAME 3-160
ID-RANGE 3-160
ID-STRING 3-160
IMPORT-DIR 3-161
IMP-FILE 3-161
LOCATION-ALIAS-NAME 3-162
LOC-ALIAS-SINGLE 3-163
LOG-TIME 3-163
ALLOC-NUMERIC 3-163
MEMBER-EXPRESSION 3-164
MEMBER-NAME 3-165
OBJ-NAME 3-165
OBJ-NAME-SINGLE 3-166
OUTLINE-ID 3-166
PASSWORD 3-166
vii
PATHNAME_FILENAME 3-167
PRECISION-DIGITS 3-167
PROPS 3-167
RNUM 3-168
RTSV-LIST 3-168
RULE-FILE-NAME 3-169
SESSION-ID 3-169
SIZE-STRING 3-170
SPOOL-NAME 3-170
STOPPING-VAL 3-171
TABLSP-NAME 3-171
TRIGGER-NAME 3-172
URL-NAME 3-172
USER-NAME 3-173
VARIABLE-NAME 3-174
VIEW-FILE-NAME 3-175
VIEW-ID 3-175
VIEW-SIZE 3-176
Privileges and Roles 3-176
Application-Level System Roles 3-176
Database-Level System Roles 3-177
Quoting and Special Characters Rules for MaxL Language 3-177
Tokens enclosed in Single Quotation Marks 3-178
Tokens Enclosed in Double Quotation Marks 3-178
Use of Backslashes in MaxL 3-178
Use of Apostrophes (Single Quotation Marks) 3-179
Use of Dollar Signs 3-179
MaxL Shell Commands 3-179
Overview of MaxL Shell 3-180
MaxL Shell Invocation 3-180
Login 3-188
MaxL Shell Invocation 3-189
MaxL Shell Syntax Rules and Variables 3-199
Semicolons 3-199
Variables 3-200
Quoting and Special Characters Rules for MaxL Shell 3-203
MaxL Shell and Unicode 3-205
MaxL Shell Command Reference 3-205
Spool on/off 3-205
Set Display Column Width 3-207
Set Message Level 3-208
viii
Set Timestamp 3-208
Echo 3-209
Nesting 3-209
Error Checking and Branching 3-210
Version 3-212
Logout 3-212
Exit 3-212
ESSCMD Script Conversion 3-213
ESSCMD Script Utility Usage 3-213
Things to Note About the ESSCMD shell Script Utility 3-214
ESSCMD to MaxL Mapping 3-214
MaxL Reserved Words List 3-221
MaxL BNF 3-230
MaxL Statements (Aggregate Storage) 3-251
Alter Application (Aggregate Storage) 3-253
Alter Database (Aggregate Storage) 3-256
Alter System (Aggregate Storage) 3-263
Create Application (Aggregate Storage) 3-269
Create Database (Aggregate Storage) 3-270
Create Outline (Aggregate Storage) 3-272
Display Tablespace (Aggregate Storage) 3-273
Execute Allocation 3-274
Execute Calculation (Aggregate Storage) 3-278
Export Data (Aggregate Storage) 3-280
Export Query Tracking (Aggregate Storage) 3-283
Import Data (Aggregate Storage) 3-284
Import Query Tracking (Aggregate Storage) 3-288
Query Application (Aggregate Storage) 3-289
Query Database (Aggregate Storage) 3-291
Outline Paging Dimension Statistics 3-300
Aggregate Storage Runtime Statistics 3-301
Aggregate Storage Slice Information Output 3-303
Aggregate Storage Group ID Information Output 3-303
Aggregate Storage Uncommitted Transaction Information Output 3-304
MaxL Use Cases 3-304
Creating an Aggregate Storage Sample Using MaxL 3-304
Loading Data Using Buffers 3-305
Using Aggregate Storage Data Load Buffers 3-307
Forcing Deletion of Partitions 3-308
Metadata Filtering 3-309
ix
Examples of Triggers 3-311
x
Accessibility and Support
11
1
Scripting Reference Overview
You can use MaxL and the Essbase Command Line Interface (CLI) to perform
operations in Essbase using scripts and shell-interfaces. This reference is intended
for advanced users who need detailed information and examples.
MaxL is a language interface for administering Essbase, and the CLI is a command
interface. MaxL statements begin with a verb, and enable you to perform actions on
Essbase artifacts. CLI commands have a variety of options to help you specify what
you want to do.
• About the Scripting Reference
• About Aggregate Storage Cubes
1-1
Chapter 1
About Aggregate Storage Cubes
1-2
2
Essbase Command-Line Interface (CLI)
The command-line interface is a nongraphical interface in which you enter shell
commands to perform administrative actions on Essbase.
• Download and Use the Command-Line Interface
• CLI Command Reference
set HTTPS_PROXY=www-proxy.example.com:80
esscs.bat login -u MyAdmin -p mypass7YG -url https://192.0.2.1/
essbase
2-1
Chapter 2
CLI Command Reference
For Linux:
export HTTPS_PROXY=www-proxy.example.com:80
esscs.sh login -u MyAdmin -p mypass7YG -url https://192.0.2.1/
essbase
For more examples and details, see the login command topic.
If the CLI was installed correctly, a list of supported commands is displayed.
9. To execute multiple CLI commands, add them to any shell script and execute it.
In any script you run that contains CLI commands, Oracle recommends you
include the following directive before the CLI login statement:
For Windows:
set ESSCLI_ID=%USERNAME%_%random%
For Linux:
export ESSCLI_ID=`whoami`_$PPID
This helps store session information and prevent execution errors when multiple
scripts are run concurrently.
2-2
Chapter 2
CLI Command Reference
• listvariables
• login, logout
• setpassword
• start
• stop
• unsetpassword
• upload
• version
To display help for all commands, enter esscs -h. To display help for a specific
command, enter esscs command -h.
To turn on verbose output for any command, meaning that extended information (if
available) is displayed, enter esscs command -v command arguments.
Syntax (login)
2-3
Chapter 2
CLI Command Reference
Example 1 (login)
Example 2 (login)
In the following example, the user logging in, [email protected] is an Identity Cloud
Service administrator who was set as the initial Essbase administrator during Essbase
stack deployment on Oracle Cloud Infrastructure. As the password is not entered in
this example, the administrator will be prompted to provide it next. The URL is the
essbase_url from the job outputs resulting from the stack deployment.
Syntax (logout)
logout
Example (logout)
esscs logout
Syntax
Example
2-4
Chapter 2
CLI Command Reference
You can also run calculation scripts using the Calculate option in Cube Designer or
Smart View, Jobs in the Essbase web interface or REST API, or execute calculation
in MaxL.
Syntax
Example
You can also clear data using the Load Data option in Cube Designer, Jobs in the
Essbase web interface or REST API, or alter database DBS-NAME reset in MaxL.
2-5
Chapter 2
CLI Command Reference
Description
You must use this command to create and save the local connection before you can
use the CLI dataload or dimbuild commands with the streaming option. You must also
set an environment variable EXTERNAL_CLASSPATH to point to the .jar file for your
database driver; for example:
export EXTERNAL_CLASSPATH=/scratch/db/jars/db2jcc.jar
Syntax
jdbc:oracle:thin:@host:port:SID
jdbc:oracle:thin:@host:port/service_name
See Examples.
-user -u User name
-driver -D JDBC driver. If not provided, Oracle
Database is considered the default, as
oracle.jdbc.driver.OracleDriver
-password -p Password (optional)
Examples
The following examples reflect various data sources.
If the -driver option and jdbcDriver parameter are not provided, Oracle database is the
assumed database by default.
2-6
Chapter 2
CLI Command Reference
esscs createLocalConnection -N
OracleDBConnection2 -cs jdbc:oracle:thin:@host1.example.com:1521/
ORCL.esscs.host1.oraclecloud.com -u OracleUser
DB2
MySQL
Teradata
If you have network connectivity between an external source of data and Essbase,
it is most efficient to define application-level or global connections and Datasources
in the Essbase web interface. These definitions help you to easily "pull" data from
the external source. If you have no network connectivity between Essbase and the
external source of data, then you can stream data loads or dimension builds using
the CLI by first using this command to create a local connection, and then issuing the
dataload or dimbuild command with the stream option; this "push" method is slower.
2-7
Chapter 2
CLI Command Reference
Syntax
2-8
Chapter 2
CLI Command Reference
Examples
You can also load data using Cube Designer, Jobs in the Essbase web interface
Essbase web interface or REST API, or import data in MaxL.
Syntax
Examples
2-9
Chapter 2
CLI Command Reference
You can also manage files in Cube Designer, the Essbase web interface, or REST
API.
Syntax
2-10
Chapter 2
CLI Command Reference
Examples
You can also deploy cubes using Cube Designer, or by using the Import option in the
Applications section of the Essbase web interface.
Syntax
2-11
Chapter 2
CLI Command Reference
Examples
You can also load dimensions using Cube Designer, Jobs in the Essbase web
interface Essbase web interface or REST API, or import dimensions in MaxL.
2-12
Chapter 2
CLI Command Reference
Syntax
Examples
You can also manage files in Cube Designer, the Essbase web interface, or REST
API.
Syntax
[command] -help | -h
Examples
esscs -help
esscs -h
2-13
Chapter 2
CLI Command Reference
Syntax
Notes
This command, like other CLI commands, can be used from outside the Essbase
machine, whereas the LCM utility must be run on the Essbase machine.
Example
Syntax
2-14
Chapter 2
CLI Command Reference
# ------------IMPORT-----------------
import @Provisions
import @Databases/Basic
#import @Databases/Basic/Audit
import @Databases/Basic/Text_files
import @Databases/Basic/Xml_files
import @Databases/Basic/Calc_scripts
import @Databases/Basic/
Open_XML_Excel_files
import @Databases/Basic/
ScenarioManagement
import @Databases/Basic/Provisions
import @Databases/Basic/Rule_files
Notes
• This command, like other CLI commands, can be used from outside the Essbase
machine, whereas the LCM utility must be run within the Essbase machine.
• When partitions exist between cubes being migrated, you must import the data
source before the data target. Otherwise, partition definitions may not be restored.
Example
2-15
Chapter 2
CLI Command Reference
Syntax
Example
Syntax
Example
2-16
Chapter 2
CLI Command Reference
Syntax
Examples
You can also manage files in Cube Designer, the Essbase web interface, or REST
API.
Syntax
2-17
Chapter 2
CLI Command Reference
Example
Syntax
Example
Syntax
2-18
Chapter 2
CLI Command Reference
Examples
Cube level
Application level
Global level
esscs listvariables
Syntax
Example
Syntax
2-19
Chapter 2
CLI Command Reference
Example
Syntax
Example
Syntax
Example
2-20
Chapter 2
CLI Command Reference
Syntax
-ca gzip
-ca lz4
Examples
You can also manage files in Cube Designer, the Essbase web interface, or REST
API.
2-21
Chapter 2
CLI Command Reference
Syntax
version
Example
esscs version
2-22
3
MaxL
Using MaxL, you can administer and query Essbase through a scripting language.
MaxL is the multi-dimensional database access language for Essbase. MaxL is a
practical, expressive interface for administering and querying the Essbase system.
With the MaxL language, you use statements to make requests. MaxL statements
begin with a verb, such as Create, Alter, and Display.
As a prerequisite to using MaxL, follow the client setup instructions in Manage
Essbase Using the MaxL Client.
• How to Read MaxL Railroad Diagrams
• MaxL Statements
• MaxL Definitions
• MaxL Shell Commands
• Reserved Words List
• MaxL BNF
• MaxL Statements (Aggregate Storage)
• MaxL Use Cases
3-1
Chapter 3
How to Read MaxL Railroad Diagrams
Symbol Definition
Statement begins here.
3-2
Chapter 3
How to Read MaxL Railroad Diagrams
Symbol Definition
Alternatives: selection of one keyword is
required.
Keywords and variables on the main line (with arrow markings) are required; optional
grammar is recessed (lower than the main line). A vertical stack of words represents
alternatives. Bold words indicate defaults when no word is chosen.
Valid sentences parse-able by the example grammar may include:
• The fox jumps over the dog. Bold letters indicate a default value when no option is
entered; therefore, entry of this statement would be interpreted as The brown fox
jumps over the dog.
3-3
Chapter 3
MaxL Statements
MaxL Statements
The MaxL data-definition language has its own grammar that you use to create
statements. In this document, the syntax for the MaxL DDL is illustrated using railroad
diagrams.
The MaxL grammar is case-insensitive. Semicolon statement-terminators are required
when using the MaxL Shell.
Key words of the MaxL grammar are represented in this document in lower-case.
Terminals, represented in upper-case, are to be replaced by the appropriate names,
numbers, privileges, or strings. For more information about components of MaxL
statements, see MaxL Definitions.
Topics covered in this section:
• Performance Statistics in MaxL
• Listed By Verbs
• Listed by Objects
• MaxL Statement Reference
3-4
Chapter 3
MaxL Statements
Note:
Depending on the calculations you choose to perform, if any, some tables
may or may not be displayed in your output log.
Kernel I/O Read (OS reads from disk) Write (OS writes to disk)
# Index I/O Number of reads that occurred Number of writes that occurred
through the index cache. through the index cache.
# Data I/O Number of reads that occurred Number of writes that occurred
through the data cache. through the data cache.
# Fground I/O Number of data reads that occurred Number of data writes that occurred
in the foreground (while a process in the foreground (while a process
waited for data to be read). waited for data to be written).
# Index bytes Number of bytes read from .IND files. Number of bytes written to .IND files.
# Data bytes Number of bytes read from .PAG Number of bytes written to .PAG files.
files.
Av byte/dat I/O Average byte size of data reads. A Average byte size of data writes. A
high number is preferable. high number is preferable.
3-5
Chapter 3
MaxL Statements
The Kernel Cache Statistics table assists you in determining how to size Essbase
caches. The Essbase kernel uses these caches to manage memory. As a rule,
data that is useful to processes should be kept in memory rather than on a disk.
Replacements occur when something needed for a process is moved from disk to
cache and something in the cache is thrown away to make room for it.
Use this table to help you decide how to size your caches. Make the caches as small
as possible; however, if replacements for a cache are greater than 0, the cache may
be too small. Appropriate sizing of the Index cache is the most important for optimal
performance; appropriate sizing of the Data cache is the least important.
Persistence/Scope of this table: long/db
3-6
Chapter 3
MaxL Statements
Data Read Number of times the Number of bytes the Total amount of time Average amount of
An occurrence of OS went to the disk OS read from .PAG the OS took to time the OS took to
the OS reading to read to a .PAG file. files. complete data reads. complete one data
information from read. This equals
a .PAG file on the Ttotal (ms)/Count.
disk.
Data Write Number of times the Number of bytes the Total amount of time Average amount of
An occurrence of the OS wrote information OS wrote to .PAG the OS took to time the OS took to
OS writing data to to a .PAG file. files. complete data writes. complete one data
a .PAG file. write. This equals
Ttotal (ms)/Count.
Note:
Bandwidth = bytes/Ttotal. Average bandwidth = bytes/Tave.
3-7
Chapter 3
MaxL Statements
Index Write Number of times Number of bytes Time elapsed Average time Wait time if the
An occurrence of the OS wrote the OS wrote between request elapsed between OS had not
the OS writing information to to .IND files. for an index write, requests for completed index
index information a .IND file. and verification of index writes and writes at the time
to a .IND file. its completion. verification of polled.
their completion.
Data Read Number of times Number of bytes Time elapsed Average time Wait time if the
An occurrence of the OS went to the OS read between request elapsed between OS had not
the OS reading the disk to read to from .PAG files. for a data read, requests for completed data
information from a .PAG file. and verification of data reads, and reads at the time
a .PAG file on the its completion. verification of polled.
disk. their completion.
Data Write Number of times Number of bytes Time elapsed Average time Wait time if the
An occurrence of the OS wrote the OS wrote between request elapsed between OS had not
the OS writing information to to .PAG files. for a data write, requests for completed data
data to a .PAG a .PAG file. and verification of data writes and writes at the time
file. its completion. verification of polled.
their completion.
Note:
(1) Because asynchronous I/O is ideally no-wait, and happens at an
unknown time, you cannot determine how long reads and writes actually
took to complete. (2) You cannot determine the bandwidth (bytes per
microsecond). Effective bandwidth, as seen by the application, is determined
by bytes/Twait.
3-8
Chapter 3
MaxL Statements
/* to execute:
essmsh scriptname username password
*/
login $1 $2;
spool on to 'c:\mxlouts\pstatsouts.txt';
alter database sample.basic set performance statistics enabled;
execute calculation
'SET MSG ERROR;
CALC ALL;'
on Sample.basic;
alter database sample.basic set performance statistics mode to medium
persistence server scope;
query database sample.basic get performance statistics kernel_io table;
alter database sample.basic set performance statistics mode to long
3-9
Chapter 3
MaxL Statements
Listed By Verbs
alter
create
display
drop
execute
export
grant
import
login
logout
query
refresh
Alter
application
database
drillthrough
filter
object
partition
session
system
tablespace
3-10
Chapter 3
MaxL Statements
trigger
Create
application
calculation
database
drillthrough
filter
location alias
outline
partition
trigger
Display
application
calculation
database
drillthrough
filter
filter row
group
location alias
lock
object
partition
privilege
session
system
tablespace
trigger
trigger spool
user
variable
3-11
Chapter 3
MaxL Statements
Drop
application
calculation
database
drillthrough
filter
location alias
lock
object
partition
trigger
trigger spool
Execute
aggregate process
aggregate selection
aggregate build
allocation
calculation
custom calculation (aggregate storage)
Export
data
LRO
outline
query_tracking
Grant
Grant
Import
data
dimensions
lro
3-12
Chapter 3
MaxL Statements
query_tracking
You can start the shell to be used interactively, to read input from a file, or to read
stream-oriented input (standard input from another process). You can log in after you
start the shell, interactively or using a login statement in the input file. You can also log
in at invocation time, by using the -l flag (see -l Flag: Login).
To start the essmsh shell, do not invoke it directly. In order for the environment to be
set correctly, you must start essmsh using startMAXL.bat (Windows) or startMAXL.sh
(UNIX).
• Prerequisites for Using MaxL
• MaxL Invocation Summary
• Interactive Input
• File Input
• Standard Input
• Login
• LoginAs
• Encryption
• Query Cancellation
3-13
Chapter 3
MaxL Statements
Note:
The following help text is for essmsh shell; however, in order for the
environment to be set correctly, you must start essmsh using startMAXL.bat
(Windows) or startMAXL.sh (UNIX). You can pass the same arguments to
startMAXL as you would formerly pass to essmsh. For example, instead of
essmsh -l username password, you should now use startMAXL.bat -l
username password.
essmsh(1)
NAME
essmsh -- MaxL Shell
SYNOPSIS
essmsh [-hlsmup] [-a | -i | file] [arguments...]
DESCRIPTION
This document describes ways to invoke the MaxL Shell.
The shell, invoked and nicknamed essmsh, takes input in the
following
ways: interactively (from the keyboard), standard input (piped
from another
program), or file input (taken from file specified on the command
line).
The MaxL Shell also accepts any number of command-line arguments,
which can be used to represent any name.
OPTIONS
essmsh accepts the following options on the command line:
-h
Prints this help.
-l <user> <pwd>
Logs in a user name and password to the local Essbase Server
instance.
-u <user>
Specifies a user to be logged in to an Essbase Server instance.
If omitted but the '-p' or '-s' flags are used, essmsh will
prompt for the username.
-p <pwd>
Specifies a password of the user set by the '-u' option to
be logged in to an Essbase Server instance. If omitted, essmsh
will prompt for the password, and the password will be hidden
on the screen.
-s <server>
Used after -l, or with [-u -p], logs the specified user into a
named
3-14
Chapter 3
MaxL Statements
-m <msglevel>
Sets the level of messages returned by the shell. Values for
<msglevel>
are: all (the default), warning, error, and fatal.
-i
Starts a MaxL session which reads from <STDIN>, piped in from
another program.
The end of the session is signalled by the EOF character in that
program.
-a
Allows a string of command-line arguments to be referenced from
within the
subsequent INTERACTIVE session. These arguments can be referenced
with positional
parameters, such as $1, $2, $3, etc. Note: omit the -a when using
arguments with
a file-input session.
NOTES
EXAMPLES
3-15
Chapter 3
MaxL Statements
Interactive Input
You can log into the MaxL Shell for interactive use (typing statements at the keyboard)
in the following ways. See MaxL Invocation Summary for more descriptions of login
flags.
No Flag
-a Flag: Arguments
-l Flag: Login
-u, -p, and -s Flags: Login Prompts and Hostname Selection
-m Flag: Message Level
No Flag
Invoked without a flag, file name, or arguments, the MaxL Shell starts in interactive
mode and waits for you to log in. Note to UNIX users: In the following examples,
replace startMAXL.bat with startMAXL.sh.
Example:
startMAXL.bat
-a Flag: Arguments
With the -a flag, the MaxL Shell starts in interactive mode and accepts space-
separated arguments to be referenced at the keyboard with positional parameters.
3-16
Chapter 3
MaxL Statements
Note:
If interactive arguments are used with spooling turned on, variables
are recorded in the log file just as you typed them (for
example, $1, $2, $ARBORPATH).
Example:
C:\Hyperion\products\Essbase\EssbaseClient
3-17
Chapter 3
MaxL Statements
C:\Hyperion\products\Essbase\EssbaseClient
-l Flag: Login
When the -l flag is used followed by a user name and password, the MaxL Shell logs
in the given user name and password and starts in interactive or non-interactive mode.
The user name and password must immediately follow the -l, and be separated from it
by a space.
Example:
Entered at the command prompt, this starts the MaxL Shell in interactive mode and
logs in user Fiona, who can henceforth issue MaxL statements at the keyboard.
startMAXL.bat -s localhost
Enter UserName> admin
Enter Password> ********
startMAXL.bat -u smith
Enter Password > ******
3-18
Chapter 3
MaxL Statements
startMAXL.bat -p password
Enter Username > smith
startMAXL.bat -m error
Values for <messageLevel> include: default, all, warning, error, and fatal. The
default value is all (same as specifying default).
Values for the <messageLevel> include: default, all, warning, error, and fatal. The
default value is all (same as specifying default).
File Input
You invoke the MaxL Shell to run scripts (instead of typing statements at the keyboard)
in the following ways. See MaxL Invocation Summary for a complete description of
login flags.
File Only
File Only
File Only
If you type startMAXL.bat followed by a file name or path, the shell takes input from
the specified file.
Examples:
startMAXL.bat
C:\Hyperion\products\Essbase\EssbaseClient\scripts\filename.msh
Entered at the command prompt, this starts the shell, tells it to read MaxL statements
from a file, and terminates the session when it is finished.
startMAXL.bat filename
Starts the shell to read MaxL statements from filename, located in the current
directory (the directory from which the MaxL Shell was invoked).
3-19
Chapter 3
MaxL Statements
Example:
Starts the shell to read MaxL statements from filename.msh, located in the current
directory.
spool on to $HOME\\output\\filename.out;
login $1 $2 on $3;
echo "Essbase is installed in $ESSBASEPATH";
spool off;
exit;
Standard Input
With the -i flag, essmsh uses standard input, which could be input from another
process. For example,
program.sh | startMAXL.bat -i
When program.sh generates MaxL statements as output, you can pipe program.sh
to startMAXL.bat -i to use the standard output of program.sh as standard input for
essmsh. Essmsh receives input as program.sh generates output, allowing for efficient
co-execution of scripts.
Example:
The MaxL Shell takes input from the echo command's output. User Fiona is logged in,
and user privileges are displayed.
3-20
Chapter 3
MaxL Statements
Login
Before you can send MaxL statements from the MaxL Shell to Essbase Server, you
must log in to an Essbase Server session.
As a prerequisite to using MaxL, follow the client setup instructions in Manage
Essbase Using the MaxL Client.
Note:
Before logging in to an Essbase Server session, you must start the MaxL
Shell (see MaxL Invocation Summary).Or, you can start the MaxL Shell and
log in (see -l Flag: Login) at the same time.
• USER-NAME
• PASSWORD
• HOST-NAME
Example
LoginAs
To facilitate creating scheduled reports with user-appropriate permissions,
administrators can log in as another user from MaxL.
Example of "log in as" statement:
3-21
Chapter 3
MaxL Statements
Interactive example:
MAXL>loginas;
Enter UserName> username
Enter Password> password
Enter Host> machine_name
Enter UserName to Login As> mimicked_user_name
Encryption
You can encrypt user and password information stored in MaxL scripts.
The following MaxL Shell invocation generates a public-private key pair that you can
use to encrypt a MaxL script.
essmsh -gk
The following MaxL Shell invocation encrypts the input MaxL script, obscuring user
name and password, and changing the file extension to .mxls.
Nested scripts are also encrypted. To avoid this and encrypt only the base script, use
-Em.
The following MaxL Shell invocation decrypts and executes the MaxL script.
The following invocation encrypts input data and returns it in encrypted form. This is
useful if there is a need to manually prepare secure scripts.
The following invocation enables you to encrypt the base script while saving any
nested scripts for manual encryption.
Query Cancellation
You can use the Esc key to cancel a query running from MaxL Shell.
Logout
Log out from Essbase without exiting the interactive MaxL Shell.
Syntax
logout;
3-22
Chapter 3
MaxL Statements
Example
logout;
Query
database
database backup archive file
application (for aggregate storage)
application (for block storage)
Refresh
outline
replicated partition
Listed by Objects
aggregate_build
aggregate_process
aggregate_selection
application
archive_file
calculation
data
database
dimensions
drillthrough
filter
group
location alias
lock
lro
object
outline
partition
privilege
3-23
Chapter 3
MaxL Statements
session
system
tablespace
trigger
trigger spool
user
variable
Aggregate Build
execute aggregate build
Aggregate Process
execute aggregate process
Aggregate Selection
execute aggregate selection
Allocation
execute allocation
Application
alter
create
display
drop
query (for aggregate storage only)
Archive_file
query
Calculation
create
display
drop
execute
execute custom (aggregate storage)
3-24
Chapter 3
MaxL Statements
Data
export
import
Database
alter
create
display
drop
query
Dimensions
import
Drillthrough
alter
create
display
drop
Filter
alter filter
create filter
display filter
display filter row
drop filter
Group
display
Location Alias
create
display
drop
3-25
Chapter 3
MaxL Statements
Lock
display
drop
LRO
export
import
Object
alter
display
drop
Outline
create
refresh
see also Dimensions
Partition
alter
create
display
drop
refresh replicated
refresh outline for outline synchronization
Privilege
display
grant
Session
alter
display
alter system to stop a session
3-26
Chapter 3
MaxL Statements
System
alter
display
Tablespace
alter
display
Trigger
alter
create or replace
display
drop
Trigger Spool
display
drop
User
display
grant to assign permissions
Variable
display variable
To add, drop, or set substitution variables:
alter application
alter database
alter system
Alter Application
Click here for aggregate storage version
Change application-wide settings.
3-27
Chapter 3
MaxL Statements
Syntax
• APP-NAME
• INTEGER
• SIZE-STRING
• DBS-SYSTEM-ROLE
• VARIABLE-NAME
• DBS-STRING
• COMMENT-STRING
Use alter application to change the following application-wide settings:
Keywords
set lock_timeout
Change the maximum time interval that locks on data blocks can be held by Smart
View (or other grid clients') users. When a client data-block lock is held for more than
the time out interval, Essbase removes the lock and the transaction is rolled back.
The default interval is 60 minutes. This setting affects all databases in the application.
set max_lro_file_size
Specify a maximum file size for Linked Reporting Objects (LRO) attachments. There
is no default. There is no minimum or maximum value, excepting limitations imposed
by your system resources.
3-28
Chapter 3
MaxL Statements
set variable
Assign a string value to an existing substitution-variable name. If the variable does not
exist, first create it using add variable. Substitution variables may be referenced by
calculations in the application.
set cache_size
Set the maximum size to which the application cache may grow. The application
cache grows dynamically until it reaches this limit. The application cache is used for
hybrid aggregation in block storage databases, and can help you manage memory
usage for retrievals. This setting takes effect after you restart the application. To check
the currently set limit, use the following MaxL statement:
load database
Start (by loading into memory) an idle database. The statement will fail if you do not
have at least read privilege for the database.
unload database
Stop (by unloading from memory) an active database. The statement will fail if you do
not have at least read privilege for the database.
enable startup
Permit all users to load (start) the application. This only applies to users who have at
least read privilege for the application. Startup is enabled by default.
disable startup
Prevent all users from loading (starting) the application. Startup is enabled by default.
enable autostartup
Start the application automatically when Essbase Server starts. By default,
autostartup is disabled.
disable autostartup
Do not start the application automatically when Essbase Server starts. By default,
autostartup is disabled.
enable commands
Allow all users with sufficient permissions to make requests to databases in the
application. Use to reverse the effect of disable commands. The disable commands
setting remains in effect only for the duration of your session. By default, commands
are enabled.
disable commands
Prevent all requests to databases in the application, including non-data-specific
requests, such as viewing database information or changing database settings. All
users are affected, including other administrators. Administrators are affected by this
3-29
Chapter 3
MaxL Statements
Caution:
If performing maintenance operations that require disabling commands, you
must make those maintenance operations within the same session and the
same script as the one in which commands were disabled.
enable updates
Allow all users with sufficient permissions to make requests to databases in the
application. Use to reverse the effect of disable updates. Disabling updates remains
in effect only for the duration of your session. By default, updates are enabled.
disable updates
Prevent all users from making requests to databases in the application. Use before
performing update and maintenance operations. The disable updates setting remains
in effect only for the duration of your session.
Caution:
If performing maintenance operations that require updates to be disabled,
you must make those maintenance operations within the same session and
the same script as the one in which updates were disabled. By default,
updates are enabled.
enable connects
Allow all users with sufficient permissions to make connections to databases in the
application. Use to reverse the effect of disable connects. By default, connections
are enabled.
disable connects
Prevent any user with a permission lower than Application Managers from making
connections to the databases that require the databases to be started. This includes
starting the databases or performing the ESSCMD shell SELECT command on the
databases. Database connections remain disabled for all databases in the application,
until the application setting is re-enabled by the administrator.
By default, connections are enabled.
enable security
When security is disabled, Essbase ignores all security settings in the application and
treats all users as Application Managers. By default, security is enabled.
disable security
When security is disabled, Essbase ignores all security settings in the application and
treats all users as Application Managers. By default, security is enabled.
3-30
Chapter 3
MaxL Statements
comment
Enter an application description (optional). The description can contain up to 80
characters.
clear logfile
Delete the application log located in the application directory. A new log is created for
entries recording subsequent application activity.
add variable
Create an application-level substitution variable by name, and optionally assign a
string value for the variable to represent. You can assign or change the value later
using set variable. A substitution variable acts as a global placeholder for information
that changes regularly. Substitution variables may be referenced by calculations and
report scripts.
If substitution variables with the same name exist at server, application, and database
levels, the order of precedence for the variables is as follows: a database level
substitution variable supersedes an application level variable, which supersedes a
server level variable.
drop variable
Remove a substitution variable and its corresponding value from the application.
rename to
Rename the application. When you rename an application, the application and the
application directory (ARBORPATH\app\appname) are renamed.
Example
Alter Database
Click here for aggregate storage version
Select a subset of alter database:
3-31
Chapter 3
MaxL Statements
Syntax
DBS-NAME
Use alter database to change the following database-wide settings:
Keywords
enable two_pass_calc
Recalculate (after a default calculation) database outline members tagged as Two
Pass, so they will be recalculated after other database members have been
consolidated. This setting is enabled by default.
Members that usually require a two-pass calculation are those members of the
Accounts dimension that are calculated by a formula rather than by hierarchical
consolidation. These members are typically ratios, such as "Profit % Sales" (profit
percentage of sales), which has a member formula.
This setting is ignored during a calculation script; it is used only during a default
calculation. To use two-pass calculation in a non-default calculation, use the CALC
TWOPASS command in the calculation script.
disable two_pass_calc
Do not recalculate database outline members tagged as Two Pass after a default
calculation. Two-pass calculation is enabled by default.
enable aggregate_missing
Consolidate #MISSING values along with the regular database consolidation. If
you never load data at parent levels, aggregating #MISSING values can improve
calculation performance, depending on the ratio between upper level blocks and input
blocks in the database.
3-32
Chapter 3
MaxL Statements
If this setting is enabled and you load values directly at the parent level, these parent-
level values will be replaced by the results of the consolidation, even if the results are
#MISSING values. The aggregate missing setting is disabled by default.
disable aggregate_missing
Do not consolidate #MISSING values. This is the default. Data that is loaded at parent
levels is not overwritten by #MISSING values of children below it. However, if any of
the child data values are not #MISSING, these values are consolidated and overwrite
the parent values.
enable startup
Enable users to start the database directly or as a result of requests requiring the
database to be started. Startup is enabled by default.
disable startup
Prevent all users from starting the database directly or as a result of requests that
would start the database. Startup is enabled by default.
enable autostartup
Automatically start the database when the application to which it belongs starts.
Autostartup is enabled by default. This setting is applicable only when startup is
enabled.
disable autostartup
Prevent automatic starting of the database when the application to which it belongs
starts. Autostartup is enabled by default.
enable compression
Enable data compression. By default, Bitmap compression is enabled. To switch to a
different compression type, use alter database set compression.
disable compression
Disable data compression. By default, Bitmap compression is enabled.
enable create_blocks
Allow Essbase to create a data block when you assign a non-constant value to a
member combination for which a data block does not already exist. Block creation on
equation is disabled by default, because it can result in a very large database.
When you assign a constant to a member on a sparse dimension, you do not need
to enable Create Blocks on Equation, because Essbase would create a data block
anyway. For example, "West = 5;" would result in the creation of data blocks, with or
without the Create Blocks on Equation setting enabled.
You do need to check this option if you want blocks created when you assign anything
other than a constant to a member on a sparse dimension for which a data block does
not already exist. For example, if no data exists for Actuals, a member of a sparse
Scenario dimension, then you need to enable Create Blocks on Equation in order to
perform the following allocation:
disable create_blocks
Turn off the Create Blocks on Equation setting. The setting is disabled by default.
3-33
Chapter 3
MaxL Statements
enable committed_mode
Set the database isolation level to committed access, meaning that only one
transaction at a time can update data blocks. Essbase holds read/write locks on
all data blocks until the transaction and the commit operations are performed. If pre-
image access is enabled, users (or transactions) can still have read-only access to
data at its last commit point. For more information, see the enable pre_image_access
setting. The default isolation-level mode is Uncommitted.
disable committed_mode
Turn off the Committed Mode setting, reverting to the default isolation level of
Uncommitted for the database.
Note:
Smart View and other grid clients' data-update operations are always in
committed mode.
enable pre_image_access
Allow users (or other transactions) read-only access to data at its last commit point,
when the database is in committed mode (meaning that data blocks may be locked
for the duration of a concurrent transaction). Pre-image access is enabled by default
when the database is in committed mode.
See also the enable committed_mode setting.
disable pre_image_access
Disable pre-image access, disallowing read-only access to locked blocks of data
at their last commit point (this setting is only applicable while the database is in
committed mode). Pre-image access is enabled by default when the database is in
committed mode.
Example
3-34
Chapter 3
MaxL Statements
Syntax
• DBS-NAME
• SIZE-STRING
• DBS-STRING
• MEMBER-NAME
• DBS-SYSTEM-ROLE
• INTEGER
• VARIABLE-NAME
• CALC-NAME-SINGLE
• CALC-STRING
• ALT-NAME-SINGLE
• COMMENT-STRING
Use alter database set to change the following database-wide settings:
Keywords
retrieve_buffer_size
Change the database retrieval buffer size. This buffer holds extracted row data
cells before they are evaluated by the RESTRICT or TOP/BOTTOM Report Writer
commands. The default size is 20 KB. The minimum size is 2 KB. Increasing the size
may improve retrieval performance.
3-35
Chapter 3
MaxL Statements
retrieve_sort_buffer_size
Change the database retrieval sort buffer size. This buffer holds data until it is sorted.
The Report Writer and Essbase Query Designer use the retrieval sort buffer. The
default size is 20 KB. The minimum size is 2 KB. Increasing the size may improve
retrieval performance.
data_cache_size
Change the data cache size. The data cache is a buffer in memory that holds
uncompressed data blocks. Essbase Server allocates memory to the data cache
during data load, calculation, and retrieval operations as needed. The default and
minimum size is 3072 KB.
index_cache_size
Change the index cache size. The index cache is a buffer in memory that holds index
pages. When a data block is requested, Essbase looks at the index pages in the
index cache to find its location on disk.
• Minimum value: 1 MB (1,048,576 bytes)
• Maximum value: 256 TB
Default value for buffered I/O: 1 MB (1,048,576 bytes)
Buffered I/O is the default for this release.
currency_database
Link the database with a currency database. A currency database enables you to
convert currency values in a database from one currency into another currency.
currency_member
Specify the member to use as a default value in currency conversions. You can
specify any valid member of the dimension defined as "Currency Type" in the
currency database.
currency_conversion
Specify whether during currency conversion, the calculation method multiplies the
currency database exchange rates with the main database values, or that the
currency database exchange rates are divided by the main database values.
minimum permission
Set a level of permission that all users or groups can have to the database. Users
or groups with higher granted permissions than the minimum permission are not
affected.
compression rle
Set the database to use run-length encoding (RLE) compression. Essbase
compresses repetitive, consecutive values, including zeros and #MISSING values.
The default compression type is bitmap.
When a compressed data block is brought into the data cache, Essbase expands the
block to its full size, regardless of the scheme that was used to compress it.
compression bitmap
Set the database to use bitmap compression, the default. Essbase stores only non-
missing values and uses a bitmapping scheme.
When a compressed data block is brought into the data cache, Essbase expands the
block to its full size, regardless of the scheme that was used to compress it.
3-36
Chapter 3
MaxL Statements
lock_timeout
Change the interval to wait for blocks to be unlocked when the database is in
committed mode. If a transaction request is made that cannot be granted in the
allotted time, the transaction is rolled back until a lock can be granted.
Note:
Smart View and other grid clients' data-update operations are always in
committed mode.
variable
Change the value of an existing substitution variable on the database. The value must
not exceed 256 bytes. It may contain any character except a leading ampersand (&).
default calculation
Change the default calculation (which, by default, is CALC ALL;) to the stored
calculation script you specify, or to an anonymous (unstored) calculation string.
active alias_table
Set an alias table as the primary table for reporting and any additional alias requests.
Only one alias table can be used at a time. This setting is user-specific; it only sets
the active alias table for the user issuing the statement.
3-37
Chapter 3
MaxL Statements
note
Create an informational note about the database that Smart View or other grid client
users can see from the login dialog box. For example, 'Calc in progress: do not
update.' Database notes can be up to 64 kilobytes long.
Example
Syntax
3-38
Chapter 3
MaxL Statements
• DBS-NAME
• FILE-NAME
• ALT-NAME-SINGLE
• USER-NAME
• DATE
• LOG-TIME
• ID-RANGE
• DBS-STRING
• COMMENT-STRING
Use alter database to change the following database-wide settings:
Keywords
reset
Clear all data and linked-reporting objects from the database, but preserve the outline.
reset all
Clear all data, Linked Reporting Objects, and the outline.
reset data
Same as using reset.
force restructure
Explicitly restructure the database to eliminate or reduce fragmentation. By
default, this statement is run in serial. To enable parallel restructuring, use the
RESTRUCTURETHREADS configuration setting.
3-39
Chapter 3
MaxL Statements
load alias_table
Load an alias table from a file to the current database. The feeder file (FILE-NAME)
must follow these rules:
• Must be correctly formatted.
• Must be located on the Essbase Server computer, not on a client computer.
• FILE-NAME must include the full path.
Sample contents of a feeder file for loading an alias table:
$ALT_NAME
"400-10" Guava
"400-20" Tangerine
"400-30" Mango
$END
unload alias_table
Delete the specified alias table.
add variable
Create a database-level substitution variable by name, and optionally assign a string
value for the variable to represent. You can assign or change the value later using
set variable. A substitution variable acts as a global placeholder for information
that changes regularly. Substitution variables may be referenced by calculations and
report scripts.
If substitution variables with the same name exist at server, application, and database
levels, the order of precedence for the variables is as follows: a database level
substitution variable supersedes an application level variable, which supersedes a
server level variable.
drop variable
Remove a substitution variable and its corresponding value from the database.
delete lro
Delete Linked Reporting Objects linked to the active database for a given user name
or modification date.
3-40
Chapter 3
MaxL Statements
• Creates a file containing a list of files that need to be backed up. Unless a
different path is specified, the file is stored in the database directory.
Begin archive and end archive do not perform the backup; they simply protect the
database during the backup process.
Note:
Using the begin archive to file and end archive grammar is the only
supported way to initiate backup and recovery of a database using MaxL.
end archive
Return the database to read-write mode after backing up the database files.
This statement requires the database to be started.
End archive achieves the following outcomes:
• Returns the database to read-write mode.
• Re-opens database files in exclusive, read-write mode.
Note:
Using the begin archive to file and end archive grammar is the only
supported way to initiate backup and recovery of a database using MaxL.
replay transactions
Replays the database transactions that were logged after the last replay request was
originally executed or after the last restored backup's time (whichever occurred later).
Transactions that are executed and logged after the restore operation are not
replayed, unless you replay those transactions using their sequence IDs. After
restoring a database, Oracle recommends that you finish replaying the transactions
that were logged after the backup and before the restore and that are needed to fully
recover the database; then you can continue executing new transactions.
3-41
Chapter 3
MaxL Statements
Note:
You can skip replaying a transaction if you are absolutely sure that the
transaction results are not required to recover the database.
rename to
Rename the database. When you rename a database, the database directory is also
renamed.
comment
Create a description of the database. The maximum number of characters is 80.
This description is available to database administrators. To annotate the database for
Smart View or other grid client users, use set note.
Example
Related Topics
• Alter Database enable | disable
• Alter Database Set
Alter Drillthrough
Edit drill-through URL definitions used to link to content hosted on Oracle ERP and
EPM applications.
3-42
Chapter 3
MaxL Statements
Syntax
• URL-NAME
• FILE-NAME
• MEMBER-EXPRESSION
Use alter drillthrough to edit a URL definition in the following ways:
Keywords
alter drillthrough
Edit drill-through URL metadata.
The number of drill-through URLs per database is limited to 255.
from xml_file
Indicate the path to the local URL XML file that defines the link information.
The URL XML is created by the ERP or EPM application that deployed the Essbase
database. The XML contains the drill-through URL display name as well as a URL
enabling the hyperlink from a cell to a Web interface to occur. For a sample URL XML
file, see Create Drillthrough.
on {<member-expression>,...}
Define the list of drillable regions, using the same Essbase member-set calculation
language that is used to define security filters. The list of drillable regions must be
enclosed in {brackets}.
The number of drillable regions in a drill-through URL is limited to 256. The number of
characters per drillable region is limited to 65536.
allow_merge
Optional: Merge the drillable-region definition instead of replacing it on update.
Example
Alter Filter
Add filter rows to a database security filter. Filters control security for database objects.
Use grant to assign filters to users and groups.
Minimum permission required: Database Manager.
3-43
Chapter 3
MaxL Statements
Syntax
• FILTER-NAME
• MEMBER-EXPRESSION
Use alter filter in the following ways to edit a filter:
Keywords
Notes
• Filters created using MaxL must be valid. For information about filter syntax, see
Designing and Maintaining Essbase Cubes.
• MEMBER-EXPRESSION must be enclosed in single quotation marks. It can be a
comma-separated list.
Example
3-44
Chapter 3
MaxL Statements
Alter Object
Rename, unlock, or copy a database-related artifact.
Syntax
• OBJ-NAME
• OBJ-NAME-SINGLE
Use alter object to edit artifacts in the following ways:
Keywords
rename to
Rename the artifact. Not applicable for partition files, worksheets, or outlines.
unlock
Unlock an artifact that is locked by another user or process. Not applicable for alias
tables and worksheets. Unlocking an artifact of type lro is applicable for stored
linked-reporting objects only; that is, files with the .LRO extension.
Note:
To unlock all database artifacts, use alter database DBS-NAME unlock all
objects;.
copy to
Make a copy of a server artifact. Not applicable for partition files, worksheets, or
outlines. If an artifact of the new name already exists, it is replaced.
force copy to
Make a copy of a server artifact. Not applicable for partition files, worksheets, or
outlines. If an artifact of the new name already exists, it is replaced. If an administrator
issues the statement with the force keyword, locked artifacts are unlocked, copied,
and re-locked.
Notes
• Specified artifacts must be persisted in the database directory.
• Attempting to rename or copy an artifact of type "partition_file" returns an error.
Example
3-45
Chapter 3
MaxL Statements
Alter Partition
Fix invalid or dangling partition references. Change the authorized user who can
connect to both cubes. Change the name of an application, cube, or host (in the event
that something was renamed).
Syntax
• DBS-NAME
• HOST-NAME
• USER-NAME
• PASSWORD
• APP-NAME
• DBS-STRING
Use alter partition to edit partitions in the following ways:
Keywords
...set connect
Change the user authorized to access the partitioned cubes.
3-46
Chapter 3
MaxL Statements
...set hostname
Edit the partition definition to include the correct URL for the partition source cube,
target cube, or both.
...set application as
Edit the partition definition to include a corrected application name. This is useful if
one application name was changed; if both application names changed, the partition
definition cannot be corrected and you must re-create it.
...set database as
Edit the partition definition to include a corrected cube name. This is useful if one
cube name was changed; if both cube names changed, the partition definition cannot
be corrected and you must re-create it.
...direction single
See Examples 2, 4, and 5.
...direction all
See Example 3.
Notes
• The first DBS-NAME is the local cube, and the second DBS-NAME is the remote
cube.
• Directing a partition to the remote site means the current cube is the source.
Creating a partition from the remote site means the current cube is the target.
• To change the authorized partition user, you must change the user for both
partitioned cubes, as shown in Example 1.
• If a partitioned host, application, or cube is renamed, the rename does not
propagate to the partition definition, so you must use alter partition to change
the name in the partition definition. As shown in Examples 2 through 5, you must
give the old name and the new name. If both names were changed, the partition
definition is not recoverable, and must be re-created.
Example
3-47
Chapter 3
MaxL Statements
where direction single indicates that only the target URL needs to be changed.
where direction all indicates that the host-name change needs to be made on both
the target and source halves of the partition definition.
where direction single indicates that only one half of the partition definition needs to
be corrected.
Note:
The old application name can be discovered by issuing the display
partition statement prior to correcting the partition definition.
3-48
Chapter 3
MaxL Statements
where direction single indicates both halves of the partition definition need to be
corrected.
Alter Session
Set MDX display options.
Syntax
PRECISION-DIGITS
Use alter session to change the following MDX output settings:
Keywords
default
Revert to the default MDX display settings in the MaxL Shell. The default settings are:
alias ON, metadata_only OFF, cell_status OFF.
3-49
Chapter 3
MaxL Statements
alias on|off
Set whether to use aliases instead of member names.
metadata_only on|off
Set whether to show only the metadata, with no data.
cell_status on|off
Set whether to display cell status. Cell status is additional information returned with
each cell value in MDX query outputs.
Note:
Every cell consists of one member from each dimension. Up to four cell-
status types may be returned with the output:
• DC: Dynamic Calc. If any of the members defining the cell is Dynamic Calc, this
status is on.
• RO: Read Only. If the cell cannot be written to (for example, by lock-and-send),
this status is on. Security filters in the database might cause cells to be read-only.
Dynamic Calc cells are automatically read-only.
• CM: Calculated Member. If any of the members defining the cell is a calculated
member, this status is on.
• LO: Linked Object. If the cell has any associated Linked Reporting Objects, this
status is on.
precision <precision-digits>
Set the number (0-15) of decimal places to include for the data values in MDX query
output.
formatted_value on|off
Set whether to return formatted values for all cells of type text or date, or cells
associated with a format string. By default, this setting is on.
get_missing_cells on|off
Set whether to return #Missing valued cells for all cells of type text or date, or cells
associated with a format string. By default, this setting is on.
get_meaningless_cells on|off
Set whether to return #Meaningless for cells that are empty only because they are
unassociated with the context attribute or varying attribute. By default, this setting is
off, and the empty cells display as #Missing.
The following example query gets sales for all products, but the aggregation is
specified by the slicer context only for Ounces_12.
SELECT
{Sales, Cogs}
3-50
Chapter 3
MaxL Statements
ON COLUMNS,
{Product.Levels(0).Members}
ON ROWS
FROM Sample.Basic
WHERE (Ounces_12)
;
A value of #Meaningless is displayed for any members not associated with the
attribute Ounces_12.
Alter System
Click here for aggregate storage version
Change the state of Essbase Server. Start and stop applications, change system-wide
variables, manage password and login activity, disconnect users, end processes, or
shut down the server.
Permission required: Administrator.
Syntax
3-51
Chapter 3
MaxL Statements
• APP-NAME
• INTEGER
• VARIABLE-NAME
• EXPORT-DIR
Use alter system to change the following system-wide settings:
Keywords
load application
Start an application, or start all applications on the Essbase Server.
unload application
Stop an application, or stop all applications on the Essbase Server. Unloading an
application cancels all active requests and database connections, and stops the
application. If Essbase encounters a problem when trying to cancel active requests
and database connections, and stopping the application, an error is logged in the
application log.
If you do not want to stop an application if it has active requests and database
connections, use the no_force grammar. When using no_force:
• If the application has active requests and database connections, the application is
not stopped; it continues running
• If the application does not have active requests and database connections, the
application is stopped, as if you used unload application without specifying
no_force
set session_idle_limit
Set the interval of time permitted for a session to be inactive before Essbase Server
logs off the user. The minimum limit that you can set is five minutes (or 300 seconds).
When the session idle limit is set to none, all users can stay logged on until the
Essbase Server is shut down.
The default user idle logout time is 60 minutes. When a user initiates a calculation in
the background, after 60 minutes the user is considered idle and is logged out, but the
calculation continues in the background.
Because the user may mistakenly assume that the calculation stopped because he or
she was logged out, you can do one of the following to correct the user experience:
• Run the calculation in the foreground
• Increase the session idle limit in to a time that exceeds the duration of the
calculation, or to none
set session_idle_poll
Set the time interval for inactivity checking and security-backup refreshing. The time
interval specified in the session idle poll gives Essbase instructions:
• Tells it how often to check whether user sessions have passed the allowed
inactivity interval indicated by session_idle_limit in the alter system statement.
• Tells it how often to refresh the security backup file. If session_idle_poll is set to
zero, the security backup file is still refreshed every five minutes.
3-52
Chapter 3
MaxL Statements
set invalid_login_limit
Set the number of unsuccessful login attempts allowed by any user before the system
disables it. When you change this setting, the counter resets to 0. When the invalid
login limit is set to none, there is no limit. By default, there is no limit.
set inactive_user_days
Set the number of days a user account may remain inactive before being disabled
by the system. The counter resets when the user logs in, is edited, or is activated by
an administrator. When the inactive days limit is set to none, user accounts remain
enabled even if they are not used. By default, there is no limit.
set password_reset_days
Set the number of days users may retain passwords. After the allotted number of
days, users are prompted at login to change their passwords. The counter resets
for a user when the user changes the password, is edited, or is activated by an
administrator. When the password reset days limit is set to none, there is no built-in
limit for password retention. By default, there is no limit.
set variable
Change the value of an existing substitution variable on the system. The value must
not exceed 256 bytes. It may contain any character except a leading ampersand (&).
set server_port
Expand a port range specified Essbase configuration properties. Each Essbase
application uses two ports from this range. If no more ports are available, an error
message is displayed.
Note:
You can expand port ranges only so that the beginning port range is
less than SERVERPORTBEGIN and the ending port range is greater than
SERVERPORTEND.
delete export_directory
Delete directories created for linked reporting objects exported from a database to a
directory created in ARBORPATH\app. Use this grammar after the exported LROs are
migrated into a database using import lro, and the directories containing the exported
LRO information are not needed.
Note:
This process works only for directories created in ARBORPATH\app using the
DBS-EXPORT-DIR option of the export lro statement. It does not work for
directories created elsewhere using the FULL-EXPORT-DIR option of the
export lro statement.
3-53
Chapter 3
MaxL Statements
add variable
Create a system-level substitution variable by name, and optionally assign a string
value for the variable to represent. You can assign or change the value later using
set variable. A substitution variable acts as a global placeholder for information
that changes regularly. Substitution variables may be referenced by calculations and
report scripts.
If substitution variables with the same name exist at server, application, and database
levels, the order of precedence for the variables is as follows: a database-level
substitution variable supersedes an application-level variable, which supersedes a
server-level variable.
drop variable
Remove a substitution variable and its corresponding value from the system.
logout session...force
Terminate a session (or sessions) even if it is processing a request. The request is
allowed to proceed to a safe point, and then the transaction is rolled back.
shutdown
Shut down the Essbase Server.
Note:
To terminate your own active request in MaxL Shell, press the ESC key.
3-54
Chapter 3
MaxL Statements
enable unicode
Set the Essbase Server to allow the creation of Unicode-mode applications and the
migration of non-Unicode-mode applications to Unicode-mode applications.
disable unicode
Prevent the Essbase Server from allowing the creation of Unicode-mode applications
or the migration of non-Unicode-mode applications to Unicode-mode applications.
reconcile
When Essbase is started using a security backup file (essbase_timestamp.bak)
instead of essbase.sec, reconcile the security file to match the state of Essbase on
an external disk. This grammar displays discrepancies in application and database
information between the security file and the external disk:
• If an application folder is on the disk but not in the security file, display a message
indicating the discrepancy. (Essbase checks for the presence of a appname.app
file in the ARBORPATH/app/appname directory.)
The force option does not apply in this scenario.
• If an application file is in the security file but not on the disk, display a message
indicating the discrepancy.
The force option removes the application from the security file.
• If an application database folder is on the disk but not in the security file, display
a message indicating the discrepancy. (Essbase checks for the presence of a
dbname.otl file in the ARBORPATHapp/appname/dbname/cube directory.)
The force option does not apply in this scenario.
• If an application database file is in the security file but not on the disk, display a
message indicating the discrepancy.
The force option removes the database from the security file.
Notes
SESSION SPECIFICATION
A session is a single user connection to Essbase Server. The session can be identified
by keywords and names indicating context, or by a unique session ID number.
A request is a query sent to Essbase Server by a user or by another process; for
example, starting an application or restructuring a database outline. Only one request
at a time can be processed in each session.
If a session is processing a request at the time that an administrator attempts to
terminate the session, the administrator must either terminate the request first, or
use the force kewyord available with alter system to terminate the session and the
current request.
3-55
Chapter 3
MaxL Statements
• SESSION-ID
• USER-NAME
• APP-NAME
• DBS-NAME
Example
3-56
Chapter 3
MaxL Statements
Syntax
• TABLSP-NAME
• SIZE-STRING
Use alter tablespace to edit tablespaces in the following ways:
Keywords
add file_location
Add a new file location to the tablespace.
Note:
FILE-NAME is case sensitive in this statement.
alter file_location
Change the maximum file-size or disk-size value for the specified file location.
Note:
FILE-NAME is case sensitive in this statement.
3-57
Chapter 3
MaxL Statements
set max_file_size
Specify a value for the maximum size that a data file may attain before Essbase
creates a new file.
The largest possible value that the aggregate storage kernel can handle is 134217727
MB. This is also the default value. If operating system limits take effect before this
value is reached, the kernel creates a new file. If you enter a value that is larger than
134217727 MB, the kernel ignores the setting and caps file size at 134217727 MB.
The minimum value is 8MB (8388608b), and any values you enter are rounded up to
the next 8MB interval.
Note:
Some operating system platforms may enforce a maximum file size limit.
set max_disk_size
Specify the value for the maximum amount of disk space to be allocated to the file
location.
The largest possible value that the aggregate storage kernel can handle is
4294967295 MB. This is also the default value. If operating system limits take effect
before this value is reached, the kernel attempts to use another file location in the
tablespace. If you enter a value that is larger than 4294967295 MB, the kernel ignores
the setting and caps disk size at 4294967295 MB.
The minimum value is 8MB (8388608b), and any values you enter are rounded up to
the next 8MB interval.
drop file_location
Delete the specified file location from the tablespace. When a file location is deleted,
all files in the file location are deleted, as well as the subdirectory containing the files.
You cannot delete a file location if it contains data. You cannot delete the tablespace
itself.
Note:
FILE-NAME is case sensitive in this statement.
Notes
• This statement requires the application to be started.
• On Windows, you can specify tablespace file locations using Uniform Naming
Convention (UNC) syntax, which is \\ComputerName\SharedFolder\Resource.
Including the escape characters required by MaxL Shell, the UNC file name
specification would look like the following:
'\\\\ComputerName\\SharedFolder\\Resource'
Example
3-58
Chapter 3
MaxL Statements
Alter Trigger
Enable or disable a trigger created to track state changes over a selected cube area.
Syntax
• TRIGGER-NAME
• DBS-NAME
Use alter trigger to edit triggers in the following ways:
Keywords
enable
Essbase monitors the trigger during data load, calculation, or lock and send, and
performs the trigger action when the condition is met on the specified cube area.
disable
Essbase does not monitor the trigger.
3-59
Chapter 3
MaxL Statements
was issued (all the triggers disabled using alter trigger on database DBS-NAME
disable are re-enabled).
Example
Create Application
Click here for aggregate storage version
Create or re-create an application, either from scratch or as a copy of another
application on the same system. See APP-NAME for information on the maximum
length of and special characters that are allowed in an application name. Application
names are not case-sensitive.
Syntax
• APP-NAME
• COMMENT-STRING
Use create application to create an application in the following ways:
Keywords
create application
Create a new application. Application names are not case-sensitive.
...type nonunicode_mode
Create a Non Unicode-mode application. This is also the default if these keywords are
omitted.
...type unicode_mode
Create a Unicode-mode application.
create application as
Create an application as a copy of another application. Application names are not
case-sensitive.
3-60
Chapter 3
MaxL Statements
comment
Create an application description (optional). The description can contain up to 80
characters.
Example
Create Calculation
Create, replace, or copy a stored calculation.
Permissions required:
• Database Manager to create database-level calculations.
• Application Manager to create application-level calculations.
Syntax
• CALC-NAME
• CALC-STRING
Use create calculation to create a calculation in the following ways:
Keywords
create calculation
Create a calculation script, the body of which is specified by CALC-STRING.
3-61
Chapter 3
MaxL Statements
create calculation as
Create a calculation as a copy of another stored calculation.
Notes
• When creating database-level calculations, this statement requires the database to
be started.
• A stored calculation can be associated with an application/database, or with
an application only. To create an application-level calculation, use two tokens
for CALC-NAME. To create a database-level calculation, use three tokens. See
CALC-NAME for more details.
• Calculations created using MaxL must be valid. For information about calculation
syntax, see Designing and Maintaining Essbase Cubes.
Example
Create Database
Click here for aggregate storage version
Create or re-create a database. Optionally create the database as a copy of another
database on the same system. See DBS-NAME for information on the maximum
length of and special characters that are allowed in a database name. Database
names are not case-sensitive.
Permission required: Application Manager. To copy a database, Manager permission
on the source database is additionally required.
Syntax
3-62
Chapter 3
MaxL Statements
• DBS-NAME
• COMMENT-STRING
Use create database to create a database in the following ways:
Keywords
create database
Create a new database. Database names are not case-sensitive.
create database as
Create a database as a copy of another database. Database names are not case-
sensitive.
comment
Create a database description (optional). The description can contain up to 80
characters.
Example
3-63
Chapter 3
MaxL Statements
Create Drillthrough
Create a drill-through URL within the active cube outline.
For each drillable region of a cube, you can enable drill-through access by means of a
URL to Web content hosted on Oracle ERP and EPM applications.
Syntax
• URL-NAME
• FILE-NAME
• MEMBER-EXPRESSION
Use create drillthrough to create a drill-through URL definition in the following ways:
Keywords
create drillthrough
Create a drill-through URL as metadata.
The number of drill-through URLs per database is limited to 255.
from xml_file
Indicate the path to the local URL XML file that defines the link information.
The URL XML is created by the ERP or EPM application that deployed the cube. The
XML contains the drill-through URL display name and a URL enabling the hyperlink
from a cell to a Web interface to occur.
The following is a sample URL XML file:
3-64
Chapter 3
MaxL Statements
on {<member-expression>,...}
Define the list of drillable regions, using the same member-set calculation language
that is used to define security filters. The list of drillable regions must be enclosed in
{brackets}.
The number of drillable regions in a drill-through URL is limited to 256. The number of
characters per drillable region is limited to 65536.
level0 only
Optional: Restrict the URL definition to level-0 data.
Example
Create Filter
Create or re-create a database security filter, either from scratch or as a copy of
another filter on the same system. Filters control security for database objects. Use
grant to assign filters to users and groups.
Minimum permission required: Database Manager.
Syntax
• FILTER-NAME
• MEMBER-EXPRESSION
Use create filter to create a filter in the following ways:
Keywords
create filter
Create a security filter to restrict or permit access to specified database cells.
3-65
Chapter 3
MaxL Statements
Notes
The member expression must be enclosed in single quotation marks. It can be a
comma-separated list.
Example
3-66
Chapter 3
MaxL Statements
Syntax
• LOC-ALIAS-SINGLE
• LOCATION-ALIAS-NAME
• DBS-NAME
• HOST-NAME
• USER-NAME
• PASSWORD
Use create location alias to create a location alias in the following ways:
Keywords
...from <dbs-name>
Specify the name of the current database (the database on which the location alias is
being created).
...to <dbs-name>
Specify the name of the remote database to log in to.
...at <host-name>
Specify where the remote database resides (using discovery URL).
Notes
• This statement requires the database to be started.
• Location aliases created using MaxL must be valid.
• Location aliases are used by the @XREF calculation function for cross-database
calculations.
3-67
Chapter 3
MaxL Statements
Example
Create Partition
Create or validate a partition definition between two databases.
Permission required: Database Manager at both sites.
Select the type of partition to create:
• transparent
• replicated
Partitions created using MaxL must be valid. To validate a partition, use the validate
only clause. For information about partition definitions, see Designing and Maintaining
Essbase Cubes.
Syntax
3-68
Chapter 3
MaxL Statements
• DBS-NAME
• HOST-NAME
• USER-NAME
• PASSWORD
• AREA-ALIAS
• MEMBER-NAME
• COMMENT-STRING
• MEMBER-EXPRESSION
Use create replicated partition to create a partition in the following ways:
Keywords
area...
Define the partition areas to share with the other cube. Optionally nickname the area
using an area-alias .
to <dbs-name>
Create a partition definition between the current source cube and the second cube
(the target).
3-69
Chapter 3
MaxL Statements
from <dbs-name>
Create a partition definition between the current target cube and the second cube (the
source).
at <host-name>
Specify the discovery URL of the remote cube.
mapped...
Define the member-name mapping for shared sections of both cubes, if member
names for sections that map are different in the two cubes.
outline...
Specify the direction in which outline synchronization should proceed, if necessary.
The default direction is the same as the data-refresh direction.
update...
Allow or disallow the updating of data in a replicated-type partition target. If you do not
specify update allow, by default, the replicated partition cannot be updated.
comment
Create a comment to describe the source half of the partition definition.
remote comment
Create a comment to describe the target half of the partition definition.
validate only
Validate the existing partition definition described by this statement, without actually
creating it.
Notes
• Multiple area specifications are allowed, provided they are separated by
whitespace. Multiple mappings are allowed, provided they are separated by
whitespace. All area aliases used in a mapping should be associated with the
target, and the direction of the mapped clause should go from source to target.
• The first DBS-NAME is the local cube, and the second DBS-NAME is the remote
cube.
• Creating a partition tothe remote site means the current cube is the source.
Creating a partition fromthe remote site means the current cube is the target.
• Aggregate storage cubes can be the target, but not the source, of a replicated
partition.
3-70
Chapter 3
MaxL Statements
Example
3-71
Chapter 3
MaxL Statements
Syntax
• DBS-NAME
• HOST-NAME
• USER-NAME
• PASSWORD
• AREA-ALIAS
• MEMBER-NAME
• COMMENT-STRING
• MEMBER-EXPRESSION
Use create transparent partition to create a partition in the following ways:
Keywords
3-72
Chapter 3
MaxL Statements
stored at the data source, which can be in another application, in another cube, or on
another Essbase instance.
area...
Define the partition areas to share with the other database. Optionally nickname the
area using an area-alias.
to <dbs-name>
Create a partition definition between the current source cube and the second cube
(the target).
from <dbs-name>
Create a partition definition between the current target cube and the second cube (the
source).
at <host-name>
Specify the discovery URL of the remote cube.
mapped...
Define the member-name mapping for shared sections of both cubes, if member
names for sections that map are different in the two cubes.
outline...
Specify the direction in which outline synchronization should proceed, if necessary.
The default direction is the same as the data-refresh direction.
comment
Create a comment to describe the source half of the partition definition.
remote comment
Create a comment to describe the target half of the partition definition.
validate only
Validate the existing partition definition described by this statement, without actually
creating it.
Notes
• Multiple area specifications are allowed, provided they are separated by
whitespace. Multiple mappings are allowed, provided they are separated by
3-73
Chapter 3
MaxL Statements
whitespace. All area aliases used in a mapping should be associated with the
target, and the direction of the mapped clause should go from source to target.
• The first DBS-NAME is the local cube, and the second DBS-NAME is the remote
cube.
• Creating a partition to the remote site means the current cube is the source.
Creating a partition from the remote site means the current cube is the target.
• Aggregate storage cubes can be the source, the target, or the source and target of
a transparent partition. Outline synchronization (refresh outline statement) is not
currently enabled for partitions that involve aggregate storage cubes.
Example
Create Trigger
Create or replace a trigger to track state changes over a selected cube area.
Select the type of trigger to create:
3-74
Chapter 3
MaxL Statements
• on-update
• after-update
Note:
You cannot create or replace a trigger during a calculation, data update, or
data load.
Note:
If a calculation assigns the same value to a given cell as was already present
before the calculation, then triggers for that cell will not activate. In other
words, if cell values are not changed, blocks are not marked as dirty, and
triggers for those blocks are not activated, even if the trigger condition was
otherwise met.
Syntax
• TRIGGER-NAME
• CUBE-AREA
• CONDITION
• ACTION
Use create after update trigger to create a trigger in the following ways:
3-75
Chapter 3
MaxL Statements
Keywords
when <condition>
Define the condition to be tested for using the keyword WHEN followed by a valid
MDX conditional expression.
then <action>
Define the action to be taken if the WHEN condition is met. See examples in
Examples of Triggers.
end
The END keyword must terminate every create trigger statement.
Example
3-76
Chapter 3
MaxL Statements
Note:
If a calculation assigns the same value to a given cell as was already present
before the calculation, then triggers for that cell will not activate. In other
words, if cell values are not changed, blocks are not marked as dirty, and
triggers for those blocks are not activated, even if the trigger condition was
otherwise met.
Note:
You cannot create or replace a trigger during a calculation, data update, or
data load.
Syntax
• TRIGGER-NAME
• CUBE-AREA
• CONDITION
• ACTION
Use create on update trigger to create a trigger in the following ways:
Keywords
log_value OFF
Optional. Log no data values to the trigger spool file. This is the default.
log_value ON
Optional. Log new and old data values to the trigger spool file.
3-77
Chapter 3
MaxL Statements
when <condition>
Define the condition to be tested for using the keyword WHEN followed by a valid
MDX conditional expression.
then <action>
Define the action to be taken if the WHEN condition is met. See examples in
Examples of Triggers.
else <action>
Optional. Define an action to be taken if the WHEN condition is not met. See
examples in Examples of Triggers.
end
The END keyword must terminate every create trigger statement.
Example
Display Application
View information about current application-wide settings.
Syntax
APP-NAME
Use display application to display application information in the following ways:
Keywords
all
Display all applications on the system.
<app-name>
Display the named application.
3-78
Chapter 3
MaxL Statements
<app-name> message_level
Display the message-level settings for the named application.
Sample output:
component message_level
+-------------------+-------------------+
Sample info
Output Columns
application
String. Name of the application.
comment
String. Optional description of the application.
startup
TRUE or FALSE. Whether all users who have at least read permission can start the
application.
autostartup
TRUE or FALSE. Whether the application starts when Essbase Server starts.
minimum permission
String. Minimum level of permission all users can have to databases in the
application.
connects
TRUE or FALSE. Whether any user with a permission lower than Application Manager
can make connections to the databases in this application which would require the
databases to be started.
commands
TRUE or FALSE. Whether users with sufficient permissions can make read requests (or
higher) to databases in the application.
updates
TRUE or FALSE. Whether users with sufficient permissions can make write requests (or
higher) to databases in the application.
security
TRUE or FALSE. If FALSE, the Essbase security settings are disabled for the
application, and all users are treated as Application Managers.
lock_timeout
Number. Maximum time interval (in seconds) that locks on data blocks can be held by
clients.
max_lro_file_size
Number. If 0, there is no limit on the size of LRO attachments. All other sizes are
displayed in kilobytes.
3-79
Chapter 3
MaxL Statements
application_type
The type of encoding for the application.
application_locale
The language of the character set in use by the application.
server
The name of the computer hosting the Essbase Server.
application_status
0 Not Loaded
1 Loading
2 Loaded
3 Unloading
elapsed_time
How long the application has been loaded.
users_connected
The number of users currently connected to the application.
storage_type
The data storage type of the application.
number_of_databases
The number of databases in the application namespace.
Example
display application;
Display Calculation
View a list of stored calculations on the system.
3-80
Chapter 3
MaxL Statements
Syntax
• CALC-NAME
• DBS-NAME
• APP-NAME
Use display calculation to display calculations in the following ways:
Keywords
all
Display all stored calculations on the system.
<calc-name>
Display the named calculation.
on application
Display all calculations on the specified application.
on database
Display all calculations on the specified database.
Example
display calculation;
Display Database
View information about current database-wide state and settings.
Syntax
• DBS-NAME
• APP-NAME
Use display database to display database information in the following ways:
3-81
Chapter 3
MaxL Statements
Keywords
all
Display information for all databases on the system.
<dbs-name>
Display information about the specified database.
on application
Display information about all databases on the specified application.
request_history
Display information about recent requests for the database. Information about the last
three requests is returned.
Output Columns
application
Name of the application
database
Name of the database
comment
Text of the database comment, if present
startup
Whether the database is set to start when a user attempts retrievals against it
autostartup
Whether the database is set to start when the application starts
minimum permission
Minimum permission setting for the database.
aggregate_missing
Whether Essbase aggregates missing values during database calculations
two_pass_calc
Whether Two-Pass calculation is enabled
create_blocks
Whether create blocks on equations is enabled
data_cache_size
The size setting of the data cache for holding uncompressed data blocks
file_cache_size
The size setting of the file cache
index_cache_size
The size setting of the index cache, a buffer in memory that holds index pages
index_page_size
The size setting for the index page, a subdivision of an index file that contains index
entries that point to data blocks. This setting is not changeable
3-82
Chapter 3
MaxL Statements
cache_pinning
Whether cache memory locking is enabled (no longer supported)
compression
Compression type. Field values are numeric, and translate as follows:
1 Run-length encoding
2 Bitmap
3 (no longer supported)
retrieve_buffer_size
The size of the retrieval buffer, used to process and optimize retrievals from grid
clients
retrieve_sort_buffer_size
The size of the retrieval sort buffer, used to hold data to be sorted during retrievals
io_access_mode
The current I/O access mode. Only buffered I/O is supported.
pending_io_access_mode
Values are numeric, and translate as follows:
0 Invalid / Error
1 Buffered
2 Direct /* no longer supported
no_wait
Whether Essbase is set to wait to acquire a lock on data blocks that are locked by
another transaction
committed_mode
Whether Essbase is set to enable transactions to hold read/write locks on all data
blocks involved with a transaction until the transaction completes and commits
pre_image_access
Whether Essbase is set to allow users read-only access to data blocks that are locked
for the duration of another concurrent transaction
lock_timeout
The maximum number of minutes that data blocks can be locked by users
commit_blocks
The number of data blocks updated before Essbase performs a commit (The default
is 3000)
commit_rows
The number of rows of a data file processed during a data load before Essbase
performs a commit (The default is 0)
currency_database
Name of a linked currency database, if one exists
3-83
Chapter 3
MaxL Statements
currency_member
The member to use as a default value in currency conversions
currency_conversion
The method of currency conversion.
Values are numeric, and translate as follows:
1 division
2 multiplication
note
Annotation accessible from the login dialog box
db_type
Database type. Values are numeric, and translate as follows:
0 Normal
1 Currency /* no longer supported
read_only_mode
Values are numeric, and translate as follows:
db_status
Running status of the database. Values are numeric, and translate as follows:
0 Not Loaded
1 Loading
2 Loaded
3 Unloading
elapsed_time
How long the database has been running, in hours:minutes:seconds
users_connected
Number of connected users
blocks_locked
How many data blocks are locked
number_dimensions
Number of dimensions
number_disk_volume
Number of disk volumes
3-84
Chapter 3
MaxL Statements
data_status
Values are numeric, and translate as follows:
0 No Data
1 Data Loaded without Calculation
2 Data is Calculated
current_data_cache
Current size of the data cache
current_file_cache
Current size of the file cache
current_index_cache
Current size of the index cache
current_index_page
Current size of the index page
currency_country_dim
For currency databases, the country dimension
currency_time_dim
For currency databases, the time dimension
currency_category_dim
For currency databases, the accounts dimension where currency categories are
defined
currency_type_dim
For currency databases, the currency type dimension, which contains members that
identify various currency scenarios
0 Data Load
1 Calculation
2 Outline Update
Unknown
Example
display database;
3-85
Chapter 3
MaxL Statements
Display Drillthrough
View drill-through URL definitions used to link to content hosted on Oracle ERP and
EPM applications.
Syntax
• DBS-NAME
• FILE-NAME-PREFIX
• URL-NAME
• FILE-NAME
Use display drillthrough to display URL information in the following ways:
Keywords
<dbs-name>
Display all drill-through URL definitions on the database.
The number of drill-through URLs per database is limited to 255.
<dbs-name> to <file-name-prefix>
Display all drill-through URL definitions on the database, writing the URL XML content
to file names prefixed with the string given as input for FILE-NAME-PREFIX.
<url-name>
Display the specified drill-through URL definition.
The number of drillable regions in a drill-through URL is limited to 256. The number of
characters per drillable region is limited to 65536.
<url-name> to <file-name>
Display the specified drill-through URL definition, writing the URL XML content to the
specified file name.
Example
3-86
Chapter 3
MaxL Statements
Display Filter
View a specific filter or a list of all filters on the system.
Syntax
• FILTER-NAME
• DBS-NAME
Use display filter to display filters in the following ways. Use display filter row to
display the contents of filters.
Keywords
all
Display all filters on the system.
<filter-name>
Display a filter by name.
3-87
Chapter 3
MaxL Statements
on database
Display all filters associated with the specified database.
Example
display filter;
Syntax
• FILTER-NAME
• DBS-NAME
You can display filter contents in the following ways using display filter row.
Keywords
all
Display all filters (and their contents) defined on the system.
<filter-name>
Display a filter and its contents by name.
on database
Display all filters (and their contents) associated with the specified database.
Example
Display Group
View a specific group or a list of all groups on the system. To view group membership
information, use display user.
3-88
Chapter 3
MaxL Statements
Syntax
GROUP-NAME
Use display group to display groups in the following ways:
Keywords
all
Display all security groups on the system.
Note:
This MaxL grammar is deprecated. Oracle recommends using Java API or
Oracle Enterprise Manager to get a list of all groups.
<group-name>
Display a security group by name.
Syntax
• LOCATION-ALIAS-NAME
• APP-NAME
• DBS-NAME
You can display location aliases in the following ways using display location alias.
3-89
Chapter 3
MaxL Statements
Keywords
all
Display all location aliases defined on the system.
<location-alias-name>
Display a location alias by name.
on application
Display all location aliases defined for the specified application.
on database
Display all location aliases defined for the specified database.
Example
Display Lock
View information about locks currently held by users or processes on data blocks.
Note:
Data locks do not apply to aggregate storage applications.
Syntax
• APP-NAME
• DBS-NAME
You can display locks in the following ways using display lock.
Keywords
all
Display all locks on the specified scope. If all is omitted, this is the default.
3-90
Chapter 3
MaxL Statements
on system
Display all locks on the system.
on application
Display all locks associated with the specified application.
on database
Display all locks associated with the specified database.
Display Object
View a list of database-related file objects stored in database directories.
Syntax
• APP-NAME
• DBS-NAME
• OBJ-NAME
You can display objects in the following ways using display object.
Keywords
all
Display all stored objects on the specified scope.
locked
Display only locked objects on the specified scope.
of type...
Display only the objects of type specified by OBJ-TYPE ::=.
3-91
Chapter 3
MaxL Statements
OBJ-NAME of OBJ-TYPE
Display a specific object by name and type.
on system
Display all stored objects on the system.
on application
Display all objects associated with the specified application.
on database
Display all objects associated with the specified database.
Example
Display Partition
View information about a specific partitioned database or all partitioned databases
on the system. Only displays partition information for applications which are currently
started.
Syntax
DBS-NAME
You can display partition information in the following ways using display partition.
Keywords
all
Display all partitions defined on the system.
on database
Display all partitions associated with the specified database.
advanced
Display full information including areas and member mappings for local and remote
pieces of partitions.
3-92
Chapter 3
MaxL Statements
Notes
If a partition definition is invalid, the same partition may be displayed twice, one time
for each half. Each half will show the connection information of the other half.
Example
Display Privilege
View a list of privileges, calculations, or filters held by users or groups.
Syntax
• USER-NAME
• GROUP-NAME
You can display security permissions in the following ways using display privilege.
Keywords
user...
Display security permissions for all users, or for a specified user.
group...
Display security permissions for all groups, or for a specified group.
The values returned for the type field are numeric, and translate as follows:
Column Description
1 System-level system privileges (no longer
supported in MaxL)
2 System-level system roles (no longer
supported in MaxL)
3-93
Chapter 3
MaxL Statements
Column Description
3 Execute calculation
4 Filter
Example
Display Session
View active login sessions on the current server, application, or database, including:
• The user that owns each session
• A session ID for each session
• How long the sessions have been active
• Information about outstanding requests (description, time started, name of
computer originating the request, and status).
Syntax
• APP-NAME
• DBS-NAME
• USER-NAME
• SESSION-ID
3-94
Chapter 3
MaxL Statements
You can display login and request information in the following ways using display
session.
Keywords
all
Display information about all current user sessions and active requests.
<session-id>
Display information about a particular user session, indicated by the numeric session
ID.
by user
Display information about all current sessions by a particular user.
by user on application
Display information about all current sessions by a particular user on the specified
application.
by user on database
Display information about all current sessions by a particular user on the specified
database.
on application
Display information about all current sessions on the specified application.
on database
Display information about all current sessions on the specified database.
3-95
Chapter 3
MaxL Statements
Example
display session;
Display System
View information about current system-wide settings.
Syntax
DBS-NAME
You can display server-wide information in the following ways using display system.
Keywords
display system
Display current connections and system-wide settings.
3-96
Chapter 3
MaxL Statements
1 Non-Unicode mode
2 Unicode mode
sample-basic-dir1
sample-basic-dir2
but it would not list export directories created elsewhere by providing a full directory
path when using the export lro statement, such as:c:\MyExports\MyExportDir
3-97
Chapter 3
MaxL Statements
message_level
Display the values that are set for the system message level.
Sample output:
component message_level
+-------------------+-------------------+
system info
Example
display system;
KEYWORDS SETTINGS
+---------------------------------------
+---------------------------------------
NETDELAY 1500
NETRETRYCOUNT 2000
3-98
Chapter 3
MaxL Statements
KEYWORDS SETTINGS
+---------------------------------------
+---------------------------------------
CALCCACHE TRUE
CALCCACHEDEFAULT 1250000
CALCCACHEHIGH 1750000
CALCCACHELOW 40000
DLSINGLETHREADPERSTAGE FALSE
DLTHREADSPREPARE 4
DLTHREADSWRITE 4
DYNCALCCACHEMAXSIZE DB[41943040], SV[41943040]
SSPROCROWLIMIT 250000
Display Trigger
View details about a trigger created to track state changes over a selected cube area.
Note:
The application containing the trigger must be started in order to use display
trigger.
Syntax
APP-NAME
Column Description
application The name of the application that contains the
database.
database The name of the database that contains the
trigger. Essbase lists only databases that
contain triggers.
3-99
Chapter 3
MaxL Statements
Column Description
name The name of the trigger.
definition The MaxL trigger statement (for example,
create or replace trigger)
enabled Whether Essbase is set to monitor the trigger.
Values: TRUE or FALSE. To change the value,
use alter trigger.
Example
Syntax
• APP-NAME
• DBS-NAME
• SPOOL-NAME
Display User
View a specific user or a list of all users defined on the system. View account and
group membership information.
3-100
Chapter 3
MaxL Statements
Syntax
• USER-NAME
• GROUP-NAME
You can display user information in the following ways using display user.
Keywords
all
Display information about all users on the system.
Note:
This MaxL grammar is deprecated. Oracle recommends using Java API or
Oracle Enterprise Manager to get a list of all users.
<user-name>
Display information about the specified user.
in group all
Display membership information for all groups on the system.
in group <group-name>
Display membership information for the specified group.
Output Columns
user
String. Name of the user.
description
No longer supported.
logged in
Values: TRUE or FALSE.
password_reset_days
Integer. The number of days before the password expires, or 0 if no expiration is set.
3-101
Chapter 3
MaxL Statements
enabled
Values: TRUE if the user account is active, or FALSE if the account has been disabled
by an administrator.
change_password
Values: TRUE if the user must change the password at the next login; FALSE
otherwise.
type
Values:
protocol
If the user is externally authenticated, this field contains the value OPSS. This field is
blank if the type field is 0 (the user is not externally authenticated).
conn param
This field is blank.
application_access_type
Values:
0 No access
1 Essbase access
2 Planning access
3 Essbase and Planning access (requires 2 licenses)
Example
display user;
Displays all users on the system and shows whether they are
logged in, whether their accounts are enabled, and whether
their passwords are set to expire.
3-102
Chapter 3
MaxL Statements
Display Variable
View a list of substitution variables defined on the system.
Syntax
• VARIABLE-NAME
• APP-NAME
• DBS-NAME
You can display substitution variables in the following ways using display variable.
Keywords
all
Display all substitution variables defined on the Essbase Server, including those
associated with applications and databases.
<variable-name>
Display a substitution variable by name.
Permission required:
• Read access for the applicable database or application.
• Administrator for system-defined variables.
on application
Display only substitution variables defined on the specified application.
Permission required: Read access for the application.
on database
Display only substitution variables defined on the specified database.
Permission required: Read access for the database.
on system
Display only the substitution variables associated with the Essbase Server.
Permission required: Administrator.
Notes
To manage substitution variables, use alter database (containing add, drop, and set
variable).
3-103
Chapter 3
MaxL Statements
Example
display variable;
Drop Application
Delete an empty application from the system. To remove an application with
databases, use cascade. To remove an application that has locked objects in a
constituent database, you can use force.
Minimum permission required: Application Manager.
Syntax
APP-NAME
You can delete applications in the following ways using drop application.
Keywords
cascade
Delete an application along with its constituent databases.
force
Delete an application that may have locked objects in a constituent database.
Drop Calculation
Delete a stored calculation from a database.
Minimum permission required: Database Manager.
Syntax
You can delete calculations using drop calculation.
CALC-NAME
3-104
Chapter 3
MaxL Statements
Keywords
Example
Drop Database
Delete a database from the sytsem. If the database has outstanding locks, clear them
first, or use force to drop with locks.
Minimum permission required: Database Manager.
Syntax
You can delete databases using drop database.
DBS-NAME
Keywords
force
Delete a database that may have locked objects.
Example
Drop Drillthrough
Delete a drill-through URL definition used to link to content hosted on Oracle ERP and
EPM applications.
Syntax
3-105
Chapter 3
MaxL Statements
URL-NAME
Example
Drop Filter
Delete a security filter from the database.
Minimum permission required: Database Manager.
Syntax
FILTER-NAME
You can delete filters using drop filter.
Keywords
Example
Syntax
LOCATION-ALIAS-NAME
You can delete location aliases using drop location alias.
3-106
Chapter 3
MaxL Statements
Keywords
Example
Drop Lock
Remove locks acquired through a grid client operation.
Note:
Data locks do not apply to aggregate storage applications.
Syntax
• APP-NAME
• USER-NAME
• DBS-NAME
Keywords
drop lock
Same as "drop lock on system all"
3-107
Chapter 3
MaxL Statements
Drop Object
Remove database-related file objects stored in database directories.
Syntax
OBJ-NAME
Keywords
...force
If the object is locked by a user or proecess, unlock it and delete it.
Notes
To drop a partition, use drop partition.
Drop Partition
Delete from the system a partition definition between two cubes. Database Manager
permission for each cube is required.
3-108
Chapter 3
MaxL Statements
Syntax
• DBS-NAME
• HOST-NAME
You can delete partition definitions in the following ways using drop partition.
Keywords
drop...partition...from
Remove a partition definition between the current target cube and a source cube.
drop...partition...to
Remove a partition definition between the current source cube and a target cube.
at <host-name>
Optionally specify the host location, if removing a partition definition associated with a
remote instance.
Use the discovery URL to indicate the location. For example, "https://myEssbase-
myDomain.analytics.us2.example.com/essbase/agent".
force
Specify that the source half of a partition definition should be dropped regardless
of whether the target half is missing or invalid. For more information, see Forcing
Deletion of Partitions.
Notes
If the create partition statement used was of the format:
Then the only permutations of the drop partition statement that will have effect are:
Example
3-109
Chapter 3
MaxL Statements
Drop Trigger
Remove a trigger created to track state changes over a selected cube area.
Syntax
TRIGGER-NAME
Example
Syntax
• SPOOL-NAME
• DBS-NAME
Execute Calculation
Click here for aggregate storage version
Execute a stored calculation, the stored default calculation (determined by alter
database), or an anonymous (non-stored) calculation string.
Minimum permissions required:
• For stored calculations (CALC-NAME): Granted access to the calculation.
• For anonymous calculations (CALC-STRING) and the default calculation:
Database Update
Syntax
3-110
Chapter 3
MaxL Statements
• CALC-NAME
• DBS-STRING
• RTSV-LIST
• CALC-STRING
• DBS-NAME
You can run calculations in the following ways using execute calculation.
Keywords
<calc-name> on database
Run the specified stored calculation script against the specified database.
<calc-string> on <dbs-name>
Run an anonymous calculation, whose body is contained in <calc-string>, against the
specified database.
default on <dbs-name>
Run the default calculation against the specified database.
'a=100;b=@CHILDREN("100");c="Actual"->"Final";d="New York";'
3-111
Chapter 3
MaxL Statements
Note:
Runtime substitution variables used in a calculation script must be declared
in the SET RUNTIMESUBVARS calculation command, with a name and
default value. If a different value is declared in the RTSV-LIST, the default
value is overwritten at runtime.
If you include a runtime substitution variable in RTSV-LIST that has
not been declared in SET RUNTIMESUBVARS, Essbase ignores the
undeclared runtime substitution variable (no warnings or exceptions are
generated).
Runtime substitution variables that are used in a calculation script can
be logged in the application log file, using the ENABLERTSVLOGGING
configuration setting. See "Logging Runtime Substitution Variables" in the
Designing and Maintaining Essbase Cubes.
If the name of a runtime substitution variable that is declared in the
SET RUNTIMESUBVARS calculation command is the same as a runtime
substitution variable declared in RTSV-LIST, the value specified in RTSV-
LIST overwrites the default value in SET RUNTIMESUBVARS.
Notes
• A stored calculation can be associated with a specific database in an application
(database level), or with an application only (application level). To execute a
calculation stored at the application level, you must specify which database in
the application to calculate using the on database STRING grammar.
• A calculation script can reference runtime substitution variables using the with
runtimesubvars grammar.
Example
execute calculation
'SET MSG ERROR;
CALC ALL;'
on Sample.basic;
3-112
Chapter 3
MaxL Statements
Syntax
• DBS-NAME
• STOPPING-VAL
You can aggregate an aggregate storage database in the following ways using
execute aggregate process.
3-113
Chapter 3
MaxL Statements
Keywords
based on query_data
Aggregate whichever views Essbase selects, based on collected user querying
patterns. This option is only available if query tracking is turned on, using alter
database with the enable query_tracking grammar.
enable|disable alternate_rollups
If enabled, secondary hierarchies (with default level usage) are considered for view
selection. Default: disabled (no secondary hierarchies are considered).
Notes
View selection (step 1) can be performed independently of aggregation by using
execute aggregate selection. Aggregation (step 2) can be performed without built-in
view selection by using execute aggregate build.
Example
Related Topics
• Execute Aggregate Build
• Execute Aggregate Selection
3-114
Chapter 3
MaxL Statements
You can also configure Essbase to generate aggregate views automatically. For more
information about aggregate views, see Aggregating an Aggregate Storage Database.
Syntax
• DBS-NAME
• VIEW-ID
• VIEW-SIZE
• OUTLINE-ID
• VIEW-FILE-NAME
You can materialize aggregations in the following ways using execute aggregate
build.
Keywords
using views...
Builds an aggregation based on a previously selected view (or views) and the
associated outline ID.
using view_file...
Builds an aggregation based on a saved view selection stored in an aggregation
script.
Omit the .csc file extension from the view file name when you issue the execute
aggregate build statement.
Notes
• Although it is possible to pass arbitrary view-id and view-size arguments, this
practice is not supported.
• Passing view-size arguments other than those returned by the execute aggregate
selection command may cause unpredictable results.
Example
3-115
Chapter 3
MaxL Statements
Related Topics
• Execute Aggregate Process (Aggregate Storage)
• Execute Aggregate Selection
Note:
View selection and aggregation can be performed by Essbase in a single
step by using execute aggregate process. However, the use of the two
separate statements execute aggregate selection and execute aggregate
build enables you more control of the selection criteria.
You can also configure Essbase to generate aggregate views automatically. For more
information about aggregate views, see Aggregating an Aggregate Storage Database.
Syntax
3-116
Chapter 3
MaxL Statements
• DBS-NAME
• OUTLINE-ID
• VIEW-ID
• INTEGER
• STOPPING-VAL
• VIEW-FILE-NAME
You can select views in the following ways using execute aggregate selection.
Keywords
Note:
This parameter does not create views.
3-117
Chapter 3
MaxL Statements
based on query_data
Selects views based on previously collected query-tracking data. You must have
already enabled query tracking. After enabling query tracking, allow sufficient time to
collect user data-retrieval patterns before performing an aggregate selection based on
query data.
Query tracking records information about every query executed on the database, so
that it can be used as a basis for view selection. Query-based view selection helps to
improve query performance when the distribution of user queries is skewed.
For every level combination, the cost of retrieving cells is recorded. The recording
continues until the application is shut down or until the recording is explicitly turned
off using alter database <dbs-name> disable query_tracking. In both cases, all the
query cost data is discarded, and the recording stops (and will not continue when the
application starts again).
All query cost data becomes invalid when additional views are built.
To create views based on tracked query patterns,
1. Enable query tracking using alter database <dbs-name> enable
query_tracking.
2. Run all production queries once, and then select the first set of views based
on the query cost data. To select the views, run this MaxL statement (execute
aggregate selection…based on query_data…).
3. Build the selected aggregate view using execute aggregate build.
4. Repeat the previous two steps at least twice. Selecting and building multiple
views iteratively helps ensure there are enough usage-tracking data to form a
pattern. Each new view you build decreases the rate at which query costs grow.
dump to view_file
Saves the view selection to an aggregation script. If the specified script name already
exists, an error is returned. To overwrite an existing script, use the force_dump
keyword.
The aggregation script contains information derived during the aggregate view
selection. You can materialize the aggregation at a different time by running the
aggregation script. For example:execute aggregate build on database <dbs-name>
using view_file <view-file-name>
force_dump to view_file
Saves the view selection to an aggregation script. If the specified script name already
exists, the force_dump keyword causes it to be overwritten.
enable|disable alternate_rollups
If enabled, secondary hierarchies (with default level usage) are considered for view
selection. Default: disabled (no secondary hierarchies are considered).
Example
3-118
Chapter 3
MaxL Statements
Related Topics
• Execute Aggregate Build
3-119
Chapter 3
MaxL Statements
Export Data
Click here for aggregate storage version
Export all data, level-0 data, or input-level data, which does not include calculated
values. Export data files are written to the application/cube directory. To use Report
Writer, export the data using a report file.
Minimum permission required: Read.
Syntax
• DBS-NAME
• FILE-NAME
You can export data from a database in the following ways using export data.
Keywords
Note:
Exporting data does not clear the data from the database.
3-120
Chapter 3
MaxL Statements
Note:
Exporting data does not clear the data from the cube.
Notes
• This statement requires the database to be started.
• To export data in parallel, specify a comma-separated list of export files, up to a
maximum of 1024 file names. The number of file names determines the number of
export threads. The number of available block-address ranges limits the number of
export threads that Essbase actually uses. Essbase divides the number of actual
data blocks by the specified number of file names (export threads). If there are
fewer actual data blocks than the specified number of export threads, the number
of export threads that are created is based on the number of actual data blocks.
For example, if the block storage database is very small, with only 100 data
blocks, Essbase will use only 100 threads, even if you specify a higher number.
This approach results in a more even distribution of data blocks between export
threads.
Note:
In specifying the number of export files, it is important to consider the
number of available CPU cores and I/O bandwidth on the computer on
which Essbase Server runs. Specifying too large a number can result in
poor performance.
If the data for a thread exceeds 2 GB, Essbase may divide the export data into
multiple files with numbers appended to the file names.
3-121
Chapter 3
MaxL Statements
The naming convention for additional export files is as follows: _1, _2, etc. are
appended to the additional file names. If the specified output file name contains
a period, the numbers are appended before the period. Otherwise, they are
appended at the end of the file name.
For example, if the given file name is exportfile.txt, the next additional file is
exportfile_1.txt.
• To export data in column format, use the optional "in columns" grammar.
• During a data export, the export process allows users to connect and perform
read-only operations.
• When MaxL exports data from a Unicode-mode application, the export file is
encoded in UTF-8. You cannot use UTF-8-encoded export files from a Unicode-
mode application to import data to a non-Unicode-mode application.
• MaxL cannot export databases with names containing hyphens (-).
Example
Export LRO
Export linked-reporting-object information, and binary files if the database has file-type
LROs, to a directory.
Syntax
• DBS-NAME
• DBS-EXPORT-DIR
• FULL-EXPORT-DIR
You can export LRO information from a database in the following ways using export
lro.
Keywords
to server directory
Export the LRO information to a directory you specify on the Essbase Server to which
you are connected.
to local directory
Export the LRO information to a directory you specify.
3-122
Chapter 3
MaxL Statements
Notes
• This statement requires the database to be started.
• MaxL creates exactly one export directory; it does not create a directory structure.
For example, if c:\temp exists, MaxL will create c:\temp\exports, but not
c:\temp\exports\to\this\long\path.
• If the specified export directory already exists, the export LRO statement will fail.
This is a safeguard against overwriting existing export directories.
• If you do not specify a full path for an export directory to be created on the client
or server, MaxL uses your short directory specification (DBS-EXPORT-DIR) as a
suffix, and creates the destination export-directory in the ARBORPATH\app directory
with a prefix of appname-dbname-. If you do specify a full path, MaxL creates
whatever directory you specify.
• When MaxL exports LROs from a database, if the database is from a Unicode-
mode application, the exported LRO-catalog file is encoded in UTF-8. You cannot
use UTF-8-encoded export files from a Unicode-mode application to import LROs
to a non-Unicode mode application.
Example
3-123
Chapter 3
MaxL Statements
Export Outline
Export metadata, either from the active database outline or an input outline file, to a
specified XML file. Export outline files must be written to a location on the Essbase
Server or client computer on which the export outline MaxL statement is run.
Permission required: Database Manager.
Syntax
• DBS-NAME
• FILE-NAME
• DIM-NAME
• ALT-NAME-SINGLE
You can export metadata information from a database in the following ways using
export outline.
Keywords
DBS-NAME
Specify the database name instead of the outline file path.
FILE-NAME
Specify the outline file path instead of the database name.
all dimensions
Export information about all dimensions in the database.
list dimensions
Export information about only the listed dimensions. Specify each dimension name
within curly braces, and separated by commas.
tree
Export only the member names in the hierarchy, omitting full metadata details.
with alias_table
Export using only the member names indicated in the specified alias table.
to xml_file
Specify the full path to the output XML file.
3-124
Chapter 3
MaxL Statements
Notes
• This statement requires the database to be started.
• The following general outline information is included in the XML export:
– Case sensitiveness
– Outline Type
– Duplicate Member Names allowed
– Typed Measures Enabled
– Date Format
– Varying Attributes Enabled
– Alias Table count and list
– Active Alias Table
– Attribute information
– Auto configure
– Text list definitions
– Universal member comments
– Locale, if it exists
– Query hint list (if aggregate storage)
• The following dimension information is included in the XML export:
– Name
– Two pass calc
– Type
– Text list, if text typed
– Formula
– Format String
– Comment
– Extended member comment
– Dimension category
– Attribute type
– Data Storage
– Dimension Storage
– Alias Names, if any
– UDAs, if any
– Consolidation
– Attribute dimension associated
– Independent dimensions, if any
– Time balance
3-125
Chapter 3
MaxL Statements
– Skip options
– Variance reporting
– Currency conversion
– Currency conversion member
– Dynamic Time Series enabled list
– Attachment level, if linked attribute dimension
– Dimension solve order
– Is Non Unique dimension?
– Hierarchy type
– Level usage for aggregation (for aggregate storage hierarchies)
– Is Compression dimension? (if aggregate storage)
– Storage category
• The following member information is included in the XML export:
– Name
– Two pass calc
– Type
– Text list, if text typed
– Is shared?
– Shared member name, if shared
– Formula
– Format string
– Comment
– Extended member comment
– Attribute type
– Data storage
– Dimension storage
– Alias names, if any
– UDAs, if any
– Consolidation
– Attribute member associated
– Validity sets, if any
– Time balance
– Skip options
– Variance reporting
– Currency conversion
– Currency conversion member
– Member solve order (if aggregate storage)
3-126
Chapter 3
MaxL Statements
Example
Grant
Grant a a filter or a stored calculation to a user or a group.
Syntax
• FILTER-NAME
• USER-NAME
• GROUP-NAME
• CALC-NAME
You can grant permissions to users and groups in the following ways using grant.
3-127
Chapter 3
MaxL Statements
Keywords
Notes
Granting filters:
Users may be granted multiple filters per database.
Granting calculations:
A user or group may have any number of calculations per database. Therefore,
granting a calculation adds it to the user or group's list of calculations. Grant execute
any gives the user or group permission to execute all calculations, including the
default calculation.
Example
Import Data
Click here for aggregate storage version
Import data from data files, with or without a rules file.
3-128
Chapter 3
MaxL Statements
Syntax
• DBS-NAME
• INTEGER
• IMP-FILE
• FILE-NAME
You can import data to a database in the following ways using import data.
Keywords
3-129
Chapter 3
MaxL Statements
To import from multiple files in parallel, use the wildcard characters * and/or ? in the
IMP-FILE name so that all intended import files are matched.
• * substitutes any number of characters, and can be used anywhere in the
pattern. For example, day*.txt matches an entire set of import files ranging from
day1.txt - day9.txt.
• ?* substitutes one occurrence of any character, and can be used anywhere in the
pattern. For example, 0?-*-2011.txt matches data source files named by date,
for the single-digit months (Jan to Sept).
Notes
• This statement requires the database to be started.
• When using the import statement, you must specify what should happen in case of
an error.
• To import from a SQL data source, you must connect as the relational user name,
and use a rules file.
Example
Import Dimensions
Import dimensions from data files, using a rules file.
Minimum permission required: Write.
Syntax
3-130
Chapter 3
MaxL Statements
• DBS-NAME
• IMP-FILE
• FILE-NAME
You can import dimensions to a database in the following ways using import
dimensions.
Keywords
...enforce verification
Verify the outline resulting from the dimension build. This is the default behavior.
...suppress verification
Do not verify the outline resulting from the dimension build.
Caution:
Using this option defers restructuring.
...on error...
Tell Essbase what to do in case of errors during the dimension build: abort the
operation, or write or append to an error log.
3-131
Chapter 3
MaxL Statements
Notes
• This statement requires the database to be started.
• When using the import statement, you must specify how error logs should be
handled.
• When multiple files are included in the same statement, restructure is deferred
until all files have been processed. The deferred-restructure type of dimension
build has been called an incremental dimension build.
• When the suppress verification option is used, restructure is deferred.
• When multiple files are included in the same statement, be sure verification is
enforced for the last file.
• To import from a SQL data source, you must connect as the relational user name,
and use a rules file.
Example
Import LRO
Import Linked Reporting Objects (LROs) from the specified output directory created
by export lro. The directory contains an ASCII .exp file containing LRO-catalog
information, and LRO binary files (if the database from which LROs were exported
contained file-type LROs).
Minimum permission required: Write.
Syntax
• DBS-NAME
• IMPORT-DIR
You can import exported LRO information to a database using import lro.
3-132
Chapter 3
MaxL Statements
Keywords
Notes
• This statement requires the database to be started.
• The specified import directory must come from the results of the export lro
operation. The exported LRO-catalog file contains a record of the LRO file
locations, cell notes, or URL text, and database index locations to use for re-
importing to the correct data blocks.
• In the paths in the second two examples, double quotation marks are used to
allow variable expansion in the string IMPORT-DIR, and single quotation marks
are required because there are special characters (see MaxL Syntax Notes) in the
path name.
Example
Windows Example
UNIX Example
From the subdirectory created by export lro in the app directory on the server,
both the Windows and UNIX example statements above re-import the LRO-catalog
information (and file-type LROs if applicable) that were exported to that location.
Query Application
Click here for aggregate storage version
Get information about the current state of the application.
This statement requires the application to be started.
Syntax
3-133
Chapter 3
MaxL Statements
APP-NAME
You can query application state information using keywords.
Keywords
get cache_size
Check the current maximum size setting to which the application cache may grow.
The application cache grows dynamically until it reaches this limit. The application
cache is used for hybrid aggregation in block storage databases, and can help you
manage memory usage for retrievals.
Example
The following MaxL statement:
returns the maximum size (in kilobytes) to which the application cache may grow.
Query Archive_File
Retrieve information about the database backup archive file.
Minimum permission required: Read.
The database must be running.
Syntax
FILE-NAME
You can query archive file information using keywords.
Keywords
get overview
Retrieve the following overview information:
• Application name
• Database name
• Time when the archive was performed
3-134
Chapter 3
MaxL Statements
Example
Query Database
Click here for aggregate storage version
Get advanced information about the current state of the database.
Minimum permission required: Read.
This statement requires the database to be started.
Syntax
3-135
Chapter 3
MaxL Statements
• DBS-NAME
• MEMBER-NAME
• kernel_io
• kernel_cache
• end_transaction
• database_synch
• database_asynch
• dynamic_calc
• ALT-NAME-SINGLE
• USER-NAME
• DATE
• LOG-TIME
• PATHNAME_FILENAME
You can query for database information in the following ways using query database.
Keywords
get attribute_info
Get attribute member, dimension, and name information for the specified attribute
member.
get attribute_spec
Display the current attribute specifications for the database. These specifications
include attribute member name format, Attribute Calculation dimension member
names, Boolean and date member names, and numeric range specifications.
get currency_rate
Display the currency rate for every currency partition.
0 Dense
1 Sparse
3 None (database is aggregate storage)
3-136
Chapter 3
MaxL Statements
0 Array
1 AVL (or "B+ Tree")
0 Add
1 Subtract
2 Multiply
3 Divide
4 Percent
5 NoRollUp
0 SkipNone
16384 SkipMissing
32768 SkipZero
49152 SkipBoth
1 BalFirst
2 BalLast
4 TwoPass
8 Average
64 Expense
Variations are possible. The field value consists of one of the first four "skip" values
plus any/all/none of the last five values. Some examples:
0 SkipNone
77 SkipNone, BalFirst, TwoPass, Average, Expense
16385 SkipMissing and BalFirst
The first four "skip" values are base values, and added to them are combinations of 1,
2, 4, 8, and 64.
The status field values are hexadecimal, and translate as follows:
0 Normal
1 Never Share
2 Label
4 Refer Share
8 Refer Share (with different name)
16 Implicit share
3-137
Chapter 3
MaxL Statements
performance statistics...table
Display one of several choices of performance statistics tables. Before you can
use this statement, you must enable performance statistics gathering, using alter
database DBS-NAME set performance statistics enabled.
list alias_table
Get a list of alias tables that are defined for the database.
list lro
Get information about linked objects, including the object type, name, and description,
based on criteria you specify. If you specify both a user name and modification date,
objects matching both criteria are listed. If you specify no user name or date, a list of
all linked objects in the database is displayed.
list...file information
Get accurate index and data file information. Provides index and data file names,
counts, sizes, and totals, and indicates whether or not each file is presently opened
by Essbase. The file size information is accurate. Note that the file size information
provided by the Windows operating system for index and data files that reside on
NTFS volumes may not be accurate.
list transactions
Display, in the MaxL Shell window, database transactions that were logged after the
time when the last replay request was originally executed or after the last restored
backup's time (which ever occurred later).
3-138
Chapter 3
MaxL Statements
Provide the full pathname to an existing directory and the name of the output file. If
only the output file name is provided, Essbase writes the file to the ARBORPATH/app
directory.
When writing to an output file that already exists, you must use the force grammar to
overwrite the file.
Example
Example 1
Example 2
Example 3
Example 4
3-139
Chapter 3
MaxL Statements
Refresh Outline
Synchronize the outlines between partitioned databases. Use this in the event that one
outline has undergone changes to dimensions, members, or member properties, and
you wish to propagate those changes to the partitioned database.
Outline synchronization is not currently enabled for partitions that involve aggregate
storage databases.
Syntax
• DBS-NAME
• HOST-NAME
You can synchronize the outlines between partitioned databases using refresh
outline.
3-140
Chapter 3
MaxL Statements
Keywords
...to...
Use the current source outline to refresh the remote target outline.
...from...
Refresh the current target outline using the remote source outline.
apply all
Refresh all aspects of the target outline, including dimension changes, member
changes, and member property changes made to the source outline. This is the
recommended method for refreshing outlines, because if you choose to omit some
changes, those changes cannot be applied later.
apply nothing
Do not apply source outline changes to any aspects of the target outline. The target
outline will be considered synchronized to the source, and the timestamp will be
updated, although source changes were not actually applied to the target.
apply on dimension...
Refresh the target outline with all or some dimension changes made to the source
outline.
• add: Refresh with added dimensions.
• delete: Refresh by deleting dimensions.
• rename: Refresh with renamed dimensions.
• update: Refresh with dimensions that have member updates (required if the
statement will also use apply on member).
• move: Refresh the order of dimensions in the outline.
Use commas to separate the types of source dimension changes to refresh on
the target. For example, to refresh only with added or moved dimensions, use the
following phrase: apply on dimension add, move.
apply on member...
Refresh the target outline with all or some physical member changes made to the
source outline. Requires apply on dimension update.
• add: Refresh dimensions with added members.
• delete: Refresh dimensions by deleting members.
• rename: Refresh dimensions with renamed members.
• move: Refresh the order or hierarchy of members in the dimension.
Use commas to separate the types of source member changes to refresh on the
target. For example, to refresh only with added or moved members, use the following
phrase: apply on dimension update, apply on member add, move.
3-141
Chapter 3
MaxL Statements
apply on member_property...
Refresh the target outline with all or some member property changes made to the
source outline. Requires apply on dimension update.
• account_type: Refresh with changes in account type.
• alias: Refresh with changes to aliases.
• calc_formula: Refresh with changes to member formulas.
• consolidation: Refresh with changes to consolidation tags.
• currency_conversion: Refresh with changes to currency conversion flags.
• currency_category: Refresh with changes to currency categories.
• data_storage: Refresh with changes to data storage tags.
• uda: Refresh with changes to UDAs.
Use commas to separate the types of source member-property changes to refresh
on the target. For example, to refresh only with updated member formulas, use
the following phrase: apply on dimension update, apply on member_property
calc_formula.
Example
Syntax
3-142
Chapter 3
MaxL Definitions
• DBS-NAME
• HOST-NAME
You can update a replicated-partition using refresh replicated partition.
Keywords
...to...
Use the current replicated-partition source cube to refresh the remote target partition.
...from...
Refresh the current replicated-partition target cube from the remote source partition.
...updated data
Refresh a replicated-partition cube only with data that has been updated since the last
refresh.
...all data
Refresh a replicated-partition cube with all data, regardless of the last refresh.
Example
MaxL Definitions
This section contains the following topics:
• MaxL Syntax Notes
• Numbers in MaxL Syntax
• Terminals
• Privileges and Roles
• Quoting and Special Characters Rules for MaxL Language
3-143
Chapter 3
MaxL Definitions
When issued via the MaxL Shell (essmsh), statements must be terminated by
semicolons. Semicolons are used only to tell the shell when to terminate the
statement; semicolons are not part of the MaxL language itself. Therefore, when
issuing MaxL statements programmatically external programs, do not terminate with a
semicolon.
A token is a delimited sequence of characters recognized by MaxL as a single
readable unit. Tokens may be singleton names, keywords, strings, or numbers. Names
can have one, two, or three tokens, delimited by periods. The space delimiting tokens
can be any white space: spaces, tabs, new lines, or blank lines.
A keyword is a sequence of alphabetic characters that is part of the MaxL grammar.
Each keyword is recognized as one token. To be recognized as keywords, keywords
cannot be enclosed in quotation marks. However, if you wish to use MaxL keywords
outside of the grammar as terminals (for example, as database names or passwords),
they must be enclosed in single or double quotation marks.
A terminal is something referenced in the grammar for which you provide the correct
name or definition. Terminals can be names, numbers, or strings. Examples: user-
name, filter-name, size-string.
A name is a string which can be quoted or unquoted. Unquoted names must
begin with an alphabetic character. Quoted names can consist of any sequence of
characters. Names in MaxL are used to uniquely identify databases and database
objects, such as users, applications, or filters.
Names in MaxL may be one of three types:
• singletons, which are names with one token (example: Sample). Use a singleton
name for objects that have a system-wide context: for example, applications.
• doubles, which are names with two tokens. A double is two names connected by
a period (example: Sample.basic). Use doubles to name objects with application-
wide contexts, such as databases.
• triples, which are names with three tokens. A triple is three names connected
by two periods (example: Sample.Basic.Calcname). Use triples to name objects
having database-wide contexts, such as filters.
A string is unquoted or quoted. An unquoted string can be any sequence of non-
special characters. A quoted string can be any sequence of characters (special,
alphabetic, or numeric) in the MaxL Alphabet, enclosed in single or double quotation
marks.
A number is one kind of token which may be passed to Essbase by MaxL. To
have meaning, the number must be in the correct format for the Essbase value it
represents. In the MaxL grammar documentation, labels for numbers indicate whether
the allowed number is positive, negative, an integer, or a real. See Numbers in MaxL
Syntax.
The MaxL alphabet consists of the following elements:
3-144
Chapter 3
MaxL Definitions
Element Description
Special characters Valid special characters: . , ; : % $ " ' SPACE
TAB * + - = < > [ ] { } ( ) ? ! / \ | ~ ` # & @ ^
When using special characters in MaxL
terminals, note the quoting rules (see Quoting
and Special Characters Rules for MaxL
Language).
Non-special characters Alphabetic characters and numbers.
Alphabetic characters Letters of the alphabet, and the underscore.
[a-z, A-Z, _]
Numbers See Numbers in MaxL Syntax
Terminals
The following sections describe terminals in alphabetical order.
ACTION
The required action if a data-monitoring trigger is activated.
Syntax
mail [smtp],[sender],[receiver1,reciever2,...],[subject]
spool FILE-NAME
• mail - sends an email from the specified sender, to a specified email address
or addresses, with the specified subject line (optional). Enclose email addresses
containing special characters in square brackets ([]). The mail action is not
supported for after-update triggers, which are the only triggers available for use
with aggregate storage cubes.
• spool - logs a message in a specified file in the \trig folder under the cube
directory.
3-145
Chapter 3
MaxL Definitions
Type
string (see MaxL Syntax Notes)
Example
spool "trgmonitor"
Referenced By
create trigger
drop trigger
ALT-NAME-SINGLE
The name of an alias table. If the name contains special characters (see MaxL Syntax
Notes), it must be enclosed in single or double quotation marks.
Type
name (see MaxL Syntax Notes)
Example
Region
'Long Names'
Referenced By
alter database
query database
APP-NAME
The name of the application.
The application name must not exceed 8 bytes (non-Unicode-mode applications) or 30
characters (Unicode-mode applications). Avoid using spaces. Application names are
not case-sensitive.
3-146
Chapter 3
MaxL Definitions
If the name contains any allowed special characters, it must be enclosed in single or
double quotation marks. Only the following special characters are allowed by Essbase
within application names:
% (percent sign)
$ (dollar sign)
- (minus sign)
{ (open brace)
} (close brace)
( (open parenthesis)
) (close parenthesis)
! (exclamation mark)
~ (tilde)
` (accent mark)
# (pound sign)
& (ampersand)
@ (at sign)
^ (caret)
Type
name (see MaxL Syntax Notes)
Example
Sample
3-147
Chapter 3
MaxL Definitions
Referenced By
alter application
alter partition
alter system
create application
display application
display calculation
display database
display location alias
display lock
display object
display session
display trigger spool
drop application
drop lock
grant
query application
AREA-ALIAS
A shorthand name used in the in the create partition statement for referring to an
already-specified member expression that designates which areas of the databases
should be partitioned.
Type
name (see MaxL Syntax Notes)
Example
In the create partition statement below, "foo" is an area-alias for the member
expression specified in the area specification. To create area-aliases, enter the alias
names after the member expression in each area specification. To specify which
area is relevant when mapping members (if applicable), refer to its alias name in the
mapped phrase.
In the example below, the alias name as created is shown in this color, and it
specifies which area (in other words, it refers to the entire member expression string,
'@IDESCENDANTS(East) @IDESCENDANTS(Qtr1)'). The alias name as referenced is
shown in this color.
3-148
Chapter 3
MaxL Definitions
Note:
All area aliases used in a mapping should be associated with the target
(as in the example above), and the direction of member names listed in the
mapped clause should go from source to target.
Referenced By
create partition
BUFFER-ID
A number between 1 and 999,999 inclusive. To destroy a buffer before a data load is
complete, you must use the same BUFFER-ID number that was used to initialize the
buffer.
Type
number (see MaxL Syntax Notes)
Referenced By
alter database
CALC-NAME
A stored calculation.
Syntax
• Syntax for database-level calculation:
name1.name2.name3
name1.name3
• name1—Application name.
• name2—Database name (not required for application-level calcs).
• name3—Calculation script name.
Type
name (see MaxL Syntax Notes)
3-149
Chapter 3
MaxL Definitions
For calculations associated with databases, three tokens are required, to indicate
application and database context and the calculation name.
Example
Sample.basic.'alloc.csc'
Example
• Sample.'alloc.csc' is the application-level CALC-NAME.
• execute calculation Sample.'alloc.csc' on database Basic; is a way to
execute the application-level calculation on a database.
If any part of the name contains special characters (see MaxL Syntax Notes), it must
be enclosed in single or double quotation marks.
Referenced By
create calculation
display calculation
drop calculation
execute calculation
grant
CALC-NAME-SINGLE
A stored calculation name that is the third token of a database-level CALC-NAME.
If any part of the name contains special characters (see MaxL Syntax Notes), it must
be enclosed in single or double quotation marks.
Type
name (see MaxL Syntax Notes)
Example
If the full database-level calc name is sample.basic.'alloc.csc', then CALC-NAME-
SINGLE is 'alloc.csc'.
Referenced By
alter database
CALC-STRING
A calculation string. The body of an anonymous (unstored) calculation, or the string
used to specify the body of a stored calculation at create time.
3-150
Chapter 3
MaxL Definitions
Because calculations are terminated with a semicolon, and semicolons are special
characters to MaxL, CALC-STRING should be enclosed in single or double quotation
marks.
Type
string (see MaxL Syntax Notes)
Example
CALC DIM(Year, Measures, Product);
Referenced By
alter database
execute calculation
COLUMN-WIDTH
A number (at least 8) representing character-width of columns; or, the keyword
default, representing 20 characters wide.
Type
number (see MaxL Syntax Notes) or default
Example
set display column width 80
Referenced By
Set Display Column Width
COMMENT-STRING
A string of user-defined informational text. If the string contains special characters (see
MaxL Syntax Notes), it must be enclosed in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
'This is a comment.'
Referenced By
alter application
alter database
create application
create database
3-151
Chapter 3
MaxL Definitions
create partition
CONDITION
A numeric-value-expression developed in MDX. Must be enclosed in double quotation
marks. Enclose strings containing special characters in square brackets ([]).
Type
string (see MaxL Syntax Notes)
Example
"Jan>20"
Referenced By
create trigger
CUBE-AREA or MDX-SET
A cube area or other specification developed in MDX as a symmetric, syntactically-
valid set. The area specification must be static, for example it cannot contain Dynamic
Calc members or runtime functions such as Filter, TopSum, or BottomSum. Enclose
strings containing special characters in square brackets ([]).
Type
string (see MaxL Syntax Notes)
Examples
The following is a set of siblings.
The following statement clears data from a region of ASOsamp.Sample. The region is
defined using a CUBE-AREA expressed in MDX.
3-152
Chapter 3
MaxL Definitions
Referenced By
create trigger
alter database (aggregate storage)
execute allocation
execute calculation (aggregate storage)
DATE
A valid date string formatted according to these rules:
• MM/DD/YYYY or MM/DD/YY
• Any character can be used as a separator; for example, MM~DD~YY is valid.
If the string contains special characters (see MaxL Syntax Notes), it must be enclosed
in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
'04/16/03'
'04.16.2003'
04_16_2003
Referenced By
alter database
query database
DBS-EXPORT-DIR
Suffix for the name of a cube directory to contain export files, to be created (upon
export lro) in the application directory as appname-dbname-suffix.
After LRO export, the directory contains file-type LRO binary files (if applicable to the
database), and the LRO-catalog export file with file-extension .exp.
If for a Sample.Basic export, DBS-EXPORT-DIR is given as lros, then the sample-
basic-lros directory is created in the application directory. The sample-basic-lros
directory contains file-type LRO binary files and the LRO-catalog export file 'sample-
basic-lros.exp'.
Notes:
• MaxL creates exactly one export directory; it does not create a directory structure.
• If the specified export directory already exists, the export LRO statement fails, as a
safeguard against overwriting.
3-153
Chapter 3
MaxL Definitions
Type
string (see MaxL Syntax Notes)
Referenced By
export lro
DBS-NAME
The name of a database. Two tokens are required, to indicate application context.
Syntax
name1.name2
% (percent sign)
$ (dollar sign)
- (minus sign)
{ (open brace)
} (close brace)
( (open parenthesis)
) (close parenthesis)
! (exclamation mark)
~ (tilde)
` (accent mark)
# (pound sign)
& (ampersand)
@ (at sign)
^ (caret)
Type
name (see MaxL Syntax Notes)
Example
Sample.basic
3-154
Chapter 3
MaxL Definitions
Referenced By
alter database
alter partition
alter system
alter trigger
create database
create location alias
create outline
create partition
display database
display filter
display filter row
display location alias
display lock
display object
display partition
display session
display trigger spool
display variable
drop database
drop lock
drop partition
drop trigger spool
execute aggregate build
execute aggregate process
execute aggregate selection
export data
grant
import data
import dimensions
import lro
query database
refresh outline
3-155
Chapter 3
MaxL Definitions
DBS-STRING
The second token of DBS-NAME. Limit 8 characters.
If the name contains special characters (see MaxL Syntax Notes), it must be enclosed
in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
basic
Referenced By
alter application
alter database
alter partition
execute calculation
DIM-NAME
The name of a database dimension.
If the string contains special characters (see MaxL Syntax Notes), it must be enclosed
in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
Year
Market
Referenced By
query database
EXPORT-DIR
Type
string (see MaxL Syntax Notes)
3-156
Chapter 3
MaxL Definitions
Example
'sample-basic-out'
Referenced By
alter system
FILE-NAME
A file name or path. If the string contains special characters, it must be enclosed in
single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
• file01
• "errors.txt"
• '/Sample/Basic/expsamp.txt'
Referenced By
alter database
export data
import data
import dimensions
FILE-NAME-PREFIX
Prefix for one or more file names to be created (upon display drillthrough DBS-
NAME to FILE-NAME-PREFIX) on the client in the working directory of MaxL
execution.
These display output files contain the URL XML content of URL drill-through definitions
used to link to content hosted on ERP and EPM applications.
If the string contains special characters (see MaxL Syntax Notes), it must be enclosed
in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
urlxmls
3-157
Chapter 3
MaxL Definitions
Referenced By
display drillthrough
FILTER-NAME
The name of a security filter. Three tokens are required, to indicate application and
database context.
The following special characters are not permitted:
Syntax
name1.name2.name3
• name1—Application name.
• name2—Database name.
• name3—Filter name.
Type
name (see MaxL Syntax Notes)
Example
Sample.basic.filt1
Referenced By
alter filter
create filter
display filter
display filter row
drop filter
grant
FULL-EXPORT-DIR
Full path for the name of a directory for LRO export files,to be created (upon export
lro) anywhere on the client or server.
After export lro, the directory contains file-type LRO binary files (if applicable to the
database), and the LRO-catalog export file named in the format directoryname.exp.
3-158
Chapter 3
MaxL Definitions
The lros subdirectory contains file-type LRO binary files and the LRO-catalog export
file 'lros.exp'.
Notes:
• MaxL creates exactly one export directory; it does not create a directory structure.
In the above example, if the home/temp directory structure exists, MaxL creates
the lros directory as a subdirectory of home/temp, but if home/temp does not exist,
MaxL will not create home/temp/lros.
• If the specified export directory already exists, the export LRO statement will fail.
This is a safeguard against overwriting existing export directories.
Type
string (see MaxL Syntax Notes)
Referenced By
Export LRO
GROUP-NAME
The name of the Essbase security group.
Group name guidelines:
• Non-Unicode application limit: 256 bytes
• Unicode-mode application limit: 256 characters
• Group names must start with a letter or a number
• The following special characters are not permitted:
• If the group name contains any special characters (see MaxL Syntax Notes), the
name must be enclosed in single or double quotation marks.
Types
• name (see MaxL Syntax Notes)
• name@provider
• WITH IDENTITY ID-STRING
Note:
If a user or group name includes the @ character, you must specify the
provider as well. For example, if you want to log in user admin@msad which
is on a Native Directory provider, you must specify 'admin@msad@Native
Directory'.
3-159
Chapter 3
MaxL Definitions
Examples
Sales010
Sales010@Native Directory
Referenced By
alter application
display privilege
grant
HOST-NAME
Use the discovery URL instead of a host name. A discovery URL is the URL provided
by your Service Administrator, with /agent appended to the end. For example,
https://myEssbase2.oraclecloud.com/essbase/agent.
Leading or trailing spaces will be trimmed off. Maximum length is 1024 bytes (non-
Unicode application) or characters (Unicode application).
ID-RANGE
A comma-separated list of sequence ID ranges for logged sequential transactions. A
range can consist of:
• A single transaction: n to n; for example, 1 to 1
• Multiple transactions: x to y; for example, 20 to 100
Type
string (see MaxL Syntax Notes)
Example
1 to 10,20 to 100
Referenced By
alter database
ID-STRING
Unique identity attribute identifying a user or group in a directory.
To find the identities of existing users or groups, use display user or display group.
3-160
Chapter 3
MaxL Definitions
Example
native://nvid=f0ed2a6d7fb07688:5a342200:1265973105c:-7f46?USER
Referenced By
USER-NAME
GROUP-NAME
IMPORT-DIR
A string representing the full path to the directory used in the export lro statement.
Note:
If importing lros from a server directory (using from server syntax of import
lro), you can give just the full directory name instead of the full path, as
specified by EXPORT-DIR.
Type
string (see MaxL Syntax Notes)
Example
'home/exports/temp/sample-basic-lros'
For information about how IMPORT-DIR is created, see the grammar and definitions
for export lro.
Referenced By
import lro
IMP-FILE
A name or path to a server-side rules file or data file, used for import data and import
dimension statements.
If the data or rules file is specified to be on the server, the following rules apply. If the
data or rules file is specified to be local (or left unspecified, in which case it is also
local), skip the following and use FILE-NAME.
If you are using server data_file or server rules_file, you can get the file from any
application (not just the current application) by starting the IMP-FILE string using the
following pattern:
3-161
Chapter 3
MaxL Definitions
Type
name (see MaxL Syntax Notes)
Examples
Consider the MaxL statement:
Essbase looks for calcdat.txt inside the Sample.Basic cube directory, and loads the
data to Demo.Basic.
Referenced By
import data
import dimensions
LOCATION-ALIAS-NAME
The name of a location alias referencing another database.
Syntax
name1.name2.name3
• name1—Application name.
• name2—Database name.
• name3—Location alias name.
Type
name (see MaxL Syntax Notes)
Example
Sample.Basic.EasternDB
Referenced By
create location alias
3-162
Chapter 3
MaxL Definitions
LOC-ALIAS-SINGLE
The single form of a location alias name. Use if you are creating a new location alias.
Type
name (see MaxL Syntax Notes)
Example
EasternDB
Referenced By
alter database
create location alias
LOG-TIME
A specific log time after which to replay subsequent transactions. Enclose the value in
quotation marks.
Type
string (see MaxL Syntax Notes)
Example
'11_20_2007:12:20:00'
Referenced By
alter database
ALLOC-NUMERIC
An MDX numeric value expression used to specify the amount for an allocation
source. The amount value is allocated to cells in the target region. The allocation
numeric is one of the following:
• An MDX tuple
• A number
• An arithmetic expression using member names, with the following restrictions:
– All members in the expression must be from the same dimension.
– Tuples cannot be used.
– Only arithmetic operators (+, -, /, and *) can be used.
– MDX functions (such as Avg and Parent) are not allowed.
3-163
Chapter 3
MaxL Definitions
Type
string (see MaxL Syntax Notes)
Examples
• (Acc_1000, Jan_2009)
• 100.00
• (Acc_1000 + Acc_2000)/2
• AcctA + AcctB
• Balance * 1.1
Referenced By
execute allocation
MEMBER-EXPRESSION
Outline member specification of members from one or more dimensions, member
combinations separated by commas, or member sets defined with functions. Must be
enclosed in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Example
'@ANCESTORS(Qtr2)'
Referenced By
alter filter
create filter
create partition
create drillthrough
alter drillthrough
3-164
Chapter 3
MaxL Definitions
MEMBER-NAME
The name of a database outline member.
If the name contains special characters (see MaxL Syntax Notes), it must be enclosed
in single quotation marks.
Type
name (see MaxL Syntax Notes)
Example
Jan
'New York'
Referenced By
alter database
create partition
query database
OBJ-NAME
The name of a database object. Three tokens are required, to indicate application and
database context.
Syntax
name1.name2.name3
• name1—Application name.
• name2—Database name.
• name3—Object name.
Type
name (see MaxL Syntax Notes)
Example
Sample.basic.Calcdat
3-165
Chapter 3
MaxL Definitions
Referenced By
alter object
drop object
OBJ-NAME-SINGLE
A stored database object name that is the third token of a database-level OBJ-NAME.
If any part of the name contains special characters (see MaxL Syntax Notes), it must
be enclosed in single or double quotation marks.
Type
name (see MaxL Syntax Notes)
Example
If the full database object name is sample.basic.calcdat, then OBJ-NAME-SINGLE
is calcdat.
Referenced By
alter object
OUTLINE-ID
The numeric identification of an aggregate storage outline associated with a view.
The outline ID is returned by the execute aggregate selection statement. The execute
aggregate selection statement returns a set of views, including the outline ID for the
views it returns.
Type
number (see MaxL Syntax Notes)
Example
4142187876
Referenced By
execute aggregate selection
execute aggregate build
PASSWORD
A user's password. Not applicable for externally authenticated users.
Password guidelines:
• Non-Unicode application limit: 100 bytes
• Unicode-mode application limit: 100 characters
3-166
Chapter 3
MaxL Definitions
• If the string contains special characters (see MaxL Syntax Notes), the password
must be enclosed in single or double quotation marks
• Leading or trailing spaces are illegal and will be trimmed off
Type
string (see MaxL Syntax Notes)
Referenced By
alter partition
create location alias
create outline
create partition
MaxL Shell Invocation
PATHNAME_FILENAME
A path to a file. If the string contains special characters (see MaxL Syntax Notes), it
must be enclosed in single or double quotation marks.
Type
string (see MaxL Syntax Notes)
Referenced By
query database
PRECISION-DIGITS
An integer between 0 and 15, inclusive.
Type
number (see MaxL Syntax Notes)
Referenced By
alter session
PROPS
Aggregate storage data load properties that determine how missing and zero values,
duplicate values, and multiple values for the same cell in the data source are
processed.
• ignore_missing_values: Ignore missing values in the data source.
• ignore_zero_values: Ignore zeros in the data source.
• aggregate_use_last: Combine duplicate cells by using the value of the cell that
was loaded last into the data load buffer. When using this option, data loads are
significantly slower, even if there are not any duplicate values.
3-167
Chapter 3
MaxL Definitions
Caution:
The aggregate_use_last method has significant performance impact,
and is not intended for large data loads. If your data load is larger than
one million cells, consider separating the numeric data into a separate
data load process (from any typed measure data). The separate data
load can use aggregate_sum instead.
• aggregate_sum: (Default) Add values when the buffer contains multiple values for
the same cell.
If you use multiple properties and any conflict occurs, the last property listed takes
precedence.
Type
string (see MaxL Syntax Notes)
Referenced By
alter database (aggregate storage)
RNUM
Resource usage specification for temporary aggregate storage data load buffer.
Must be a number between .01 and 1.0 inclusive. If not specified, the default value
is 1.0. Only two digits after the decimal point are significant (for example, 0.029
is interpreted as 0.02). The total resource usage of all load buffers created on a
database cannot exceed 1.0 (for example, if a buffer of size 0.9 exists, you cannot
create another buffer of a size greater than 0.1). Send operations internally create load
buffers of size 0.2; therefore, a load buffer of the default size of 1.0 will cause send
operations to fail because of insufficient load buffer resources.
Type
number (see MaxL Syntax Notes)
Example
0.02
Referenced By
alter database (aggregate storage)
RTSV-LIST
A string of runtime substitution variables that can be used in calculation scripts.
Runtime substitution variables are specified as key/value pairs. The string must be
enclosed with single quotation marks, and key/value pairs must be separated by a
semicolon, including a semicolon after the last runtime substitution variable in the
string and before the terminal single quotation mark.
3-168
Chapter 3
MaxL Definitions
Type
string (see MaxL Syntax Notes)
Example
In this example of a runtime substitution variable string, the name and value of four
runtime substitution variables are specified (for example, the value of the runtime
substitution variable named "a" is 100):
'a=100;b=@CHILDREN("100");c="Actual"->"Final";d="New York";'
Referenced By
execute calculation (block storage only)
RULE-FILE-NAME
A comma separated list of strings of rules-file names. Each rules-file name should be
an 8-character object file name with no extension. The rule files must reside on the
Essbase server.
Type
string (see MaxL Syntax Notes)
Example
'h1h1h1' , 'h1h1h2'
Referenced By
import data (aggregate storage)
SESSION-ID
The unique session ID. This ID can be used to logout a user session, or kill the current
request in that session.
Type
number (see MaxL Syntax Notes)
Example
3310545319
3-169
Chapter 3
MaxL Definitions
Referenced By
alter system
display session
query database
SIZE-STRING
Syntax
number units
OR
number
• number—Any positive number. Decimals and scientific notation are permitted.
Whitespace between number and units is optional.
• units—One of the following: b, kb, mb, gb, tb (case-insensitive).If units are
unspecified, bytes are assumed.
Type
number (see MaxL Syntax Notes)
Examples
51040b
51040 b
11MB
11000kb
12.34gb
1234e-2gb
Referenced By
alter application
alter database
alter tablespace
SPOOL-NAME
The name of a trigger's output file, as specified in the THEN or ELSE section of the
create trigger statement.
Syntax
name1.name2.name3
3-170
Chapter 3
MaxL Definitions
Type
name (see MaxL Syntax Notes)
Example
In the following create trigger statement, the bold section is the spool name.
Referenced By
display trigger spool
drop trigger spool
STOPPING-VAL
Optional stopping value for the execute aggregate process statement. Use this value
to give the ratio of the growth size you want to allow during the materialization of an
aggregate storage database, versus the pre-aggregation size of the database (Before
an aggregation is materialized, the database contains only level 0 input-level data.)
Type
number (see MaxL Syntax Notes)
Example
A stopping value of 1.5 means that during the materialization of the aggregation, the
aggregate cells are allowed to occupy up to 50% of the disk space occupied by the
level-0 data.
Referenced By
execute aggregate selection
execute aggregate process
TABLSP-NAME
The name of a tablespace. Tablespaces are applicable only to aggregate storage
databases. For this release, possible names for tablespaces you can alter are default
and temp. Other tablespace names reserved by the system are metadata and log.
Syntax
name1.name2
• name1—Application name.
• name2—Tablespace name.
3-171
Chapter 3
MaxL Definitions
Type
name (see MaxL Syntax Notes)
Example
temp
Referenced By
alter tablespace
display tablespace
TRIGGER-NAME
The name of the trigger device created to track and respond to database updates.
Trigger names must be triple names, specifying application name, database name,
and trigger name (if you rename the application or database, the trigger is invalidated).
Trigger names are case-insensitive, are a maximum of 30 bytes, and cannot contain
special characters.
Syntax
name1.name2.name3
• name1—Application name.
• name2—Database name.
• name3—The name of the trigger.
Type
name (see MaxL Syntax Notes)
Example
Sample.Basic.MyTrigger
Referenced By
alter trigger
create trigger
display trigger
drop trigger
URL-NAME
The name of a drill-through URL definition used to link to content hosted on Oracle
ERP and EPM applications.
3-172
Chapter 3
MaxL Definitions
Syntax
name1.name2.name3
• name1—Application name
• name2—Database name
• name3—URL name
Type
name (see MaxL Syntax Notes)
Example
Sample.basic.MyURL
If any part of the name contains special characters (see MaxL Syntax Notes), the
name must be enclosed in single or double quotation marks.
Referenced By
create drillthrough
alter drillthrough
display drillthrough
drop drillthrough
USER-NAME
The name of the user.
User name guidelines:
• Non-Unicode application limit: 256 bytes
• Unicode-mode application limit: 256 characters
• The following special characters are not permitted:
• If the user name contains any special characters (see MaxL Syntax Notes), the
name must be enclosed in single or double quotation marks.
Types
• name (see MaxL Syntax Notes)
• name@provider
• WITH IDENTITY ID-STRING
3-173
Chapter 3
MaxL Definitions
Note:
If a user or group name includes the @ character, you must specify the
provider as well. For example, if you want to log in user admin@msad which
is on a Native Directory provider, you must specify 'admin@msad@Native
Directory'.
Examples
JWSmith
JWSmith@Native Directory
Referenced By
alter application
alter database
alter partition
alter system
create location alias
create outline
create partition
display privilege
drop lock
grant
query database
MaxL Shell Invocation
VARIABLE-NAME
The name of the substitution variable. The name can only contain alphanumeric
characters and the underscore: (a-z A-Z 0-9 _).
Type
name (see MaxL Syntax Notes)
3-174
Chapter 3
MaxL Definitions
Example
curmonth
Referenced By
alter application
alter database
alter system
display variable
VIEW-FILE-NAME
An aggregation script containing information derived during aggregate view selection.
The file is created in the cube directory, with a .csc extension.
Aggregation scripts are valid as long as the dimension level structure in the outline has
not changed.
Executing an aggregation script (using execute aggregate build) materializes the
aggregate views specified within it.
The .csc extension is optional when executing the script.
The file name can be a maximum of 8 characters in length (excluding the extension)
and must not contain any of the following characters, or whitespace: :;.,=+*?[]|
<>"'\/
Type
string (see MaxL Syntax Notes)
Referenced By
execute aggregate selection
execute aggregate build
query database
VIEW-ID
The numeric identification of an aggregate view, returned by the execute aggregate
selection statement. The concept of views applies only to aggregate storage
databases.
VIEW-IDs persist only as long as their associated OUTLINE-IDs. OUTLINE-IDs
change when changes are made to the outline.
Type
number (see MaxL Syntax Notes)
3-175
Chapter 3
MaxL Definitions
Example
8941
Referenced By
execute aggregate selection
execute aggregate build
VIEW-SIZE
Approximate view size as a fraction of input data size. For example, a view size of
0.5 means that the view is 2X smaller than the input-level view. The concept of views
applies only to aggregate storage databases.
Type
number (see MaxL Syntax Notes)
Referenced By
execute aggregate build
3-176
Chapter 3
MaxL Definitions
3-177
Chapter 3
MaxL Definitions
Result: Error.
Example: display user 'O\'Brien';
Result: Error.
Example: display user "O\'Brien";
3-178
Chapter 3
MaxL Shell Commands
Example (Windows):
Note:
Use sparingly. Apostrophes are permitted by Essbase in user and group
names, but not in application or database names.
3-179
Chapter 3
MaxL Shell Commands
• Logout
• Exit
You can start the shell to be used interactively, to read input from a file, or to read
stream-oriented input (standard input from another process). You can log in after you
start the shell, interactively or using a login statement in the input file. You can also log
in at invocation time, by using the -l flag (see -l Flag: Login).
To start the essmsh shell, do not invoke it directly. In order for the environment to be
set correctly, you must start essmsh using startMAXL.bat (Windows) or startMAXL.sh
(UNIX).
• Prerequisites for Using MaxL
• MaxL Invocation Summary
• Interactive Input
• File Input
• Standard Input
• Login
• LoginAs
• Encryption
• Query Cancellation
3-180
Chapter 3
MaxL Shell Commands
Note:
The following help text is for essmsh shell; however, in order for the
environment to be set correctly, you must start essmsh using startMAXL.bat
(Windows) or startMAXL.sh (UNIX). You can pass the same arguments to
startMAXL as you would formerly pass to essmsh. For example, instead of
essmsh -l username password, you should now use startMAXL.bat -l
username password.
essmsh(1)
NAME
essmsh -- MaxL Shell
SYNOPSIS
essmsh [-hlsmup] [-a | -i | file] [arguments...]
DESCRIPTION
This document describes ways to invoke the MaxL Shell.
The shell, invoked and nicknamed essmsh, takes input in the
following
ways: interactively (from the keyboard), standard input (piped
from another
program), or file input (taken from file specified on the command
line).
The MaxL Shell also accepts any number of command-line arguments,
which can be used to represent any name.
OPTIONS
essmsh accepts the following options on the command line:
-h
Prints this help.
-l <user> <pwd>
Logs in a user name and password to the local Essbase Server
instance.
-u <user>
Specifies a user to be logged in to an Essbase Server instance.
If omitted but the '-p' or '-s' flags are used, essmsh will
prompt for the username.
-p <pwd>
3-181
Chapter 3
MaxL Shell Commands
-s <server>
Used after -l, or with [-u -p], logs the specified user into a
named
server. When omitted, localhost is implied.
-m <msglevel>
Sets the level of messages returned by the shell. Values for
<msglevel>
are: all (the default), warning, error, and fatal.
-i
Starts a MaxL session which reads from <STDIN>, piped in from
another program.
The end of the session is signalled by the EOF character in that
program.
-a
Allows a string of command-line arguments to be referenced from
within the
subsequent INTERACTIVE session. These arguments can be referenced
with positional
parameters, such as $1, $2, $3, etc. Note: omit the -a when using
arguments with
a file-input session.
NOTES
EXAMPLES
3-182
Chapter 3
MaxL Shell Commands
Interactive Input
You can log into the MaxL Shell for interactive use (typing statements at the keyboard)
in the following ways. See MaxL Invocation Summary for more descriptions of login
flags.
No Flag
-a Flag: Arguments
-l Flag: Login
-u, -p, and -s Flags: Login Prompts and Hostname Selection
-m Flag: Message Level
No Flag
Invoked without a flag, file name, or arguments, the MaxL Shell starts in interactive
mode and waits for you to log in. Note to UNIX users: In the following examples,
replace startMAXL.bat with startMAXL.sh.
Example:
startMAXL.bat
3-183
Chapter 3
MaxL Shell Commands
-a Flag: Arguments
With the -a flag, the MaxL Shell starts in interactive mode and accepts space-
separated arguments to be referenced at the keyboard with positional parameters.
Note:
If interactive arguments are used with spooling turned on, variables
are recorded in the log file just as you typed them (for
example, $1, $2, $ARBORPATH).
Example:
C:\Hyperion\products\Essbase\EssbaseClient
3-184
Chapter 3
MaxL Shell Commands
C:\Hyperion\products\Essbase\EssbaseClient
-l Flag: Login
When the -l flag is used followed by a user name and password, the MaxL Shell logs
in the given user name and password and starts in interactive or non-interactive mode.
The user name and password must immediately follow the -l, and be separated from it
by a space.
Example:
Entered at the command prompt, this starts the MaxL Shell in interactive mode and
logs in user Fiona, who can henceforth issue MaxL statements at the keyboard.
startMAXL.bat -s localhost
Enter UserName> admin
Enter Password> ********
3-185
Chapter 3
MaxL Shell Commands
startMAXL.bat -u smith
Enter Password > ******
startMAXL.bat -p password
Enter Username > smith
startMAXL.bat -m error
Values for <messageLevel> include: default, all, warning, error, and fatal. The
default value is all (same as specifying default).
Values for the <messageLevel> include: default, all, warning, error, and fatal. The
default value is all (same as specifying default).
File Input
You invoke the MaxL Shell to run scripts (instead of typing statements at the keyboard)
in the following ways. See MaxL Invocation Summary for a complete description of
login flags.
File Only
File Only
File Only
If you type startMAXL.bat followed by a file name or path, the shell takes input from
the specified file.
Examples:
startMAXL.bat
C:\Hyperion\products\Essbase\EssbaseClient\scripts\filename.msh
Entered at the command prompt, this starts the shell, tells it to read MaxL statements
from a file, and terminates the session when it is finished.
startMAXL.bat filename
3-186
Chapter 3
MaxL Shell Commands
Starts the shell to read MaxL statements from filename, located in the current
directory (the directory from which the MaxL Shell was invoked).
Example:
Starts the shell to read MaxL statements from filename.msh, located in the current
directory.
spool on to $HOME\\output\\filename.out;
login $1 $2 on $3;
echo "Essbase is installed in $ESSBASEPATH";
spool off;
exit;
Standard Input
With the -i flag, essmsh uses standard input, which could be input from another
process. For example,
program.sh | startMAXL.bat -i
When program.sh generates MaxL statements as output, you can pipe program.sh
to startMAXL.bat -i to use the standard output of program.sh as standard input for
essmsh. Essmsh receives input as program.sh generates output, allowing for efficient
co-execution of scripts.
Example:
3-187
Chapter 3
MaxL Shell Commands
The MaxL Shell takes input from the echo command's output. User Fiona is logged in,
and user privileges are displayed.
Login
Before you can send MaxL statements from the MaxL Shell to Essbase Server, you
must log in to an Essbase Server session.
As a prerequisite to using MaxL, follow the client setup instructions in Manage
Essbase Using the MaxL Client.
Note:
Before logging in to an Essbase Server session, you must start the MaxL
Shell (see MaxL Invocation Summary).Or, you can start the MaxL Shell and
log in (see -l Flag: Login) at the same time.
• USER-NAME
• PASSWORD
• HOST-NAME
Example
LoginAs
To facilitate creating scheduled reports with user-appropriate permissions,
administrators can log in as another user from MaxL.
Example of "log in as" statement:
3-188
Chapter 3
MaxL Shell Commands
Interactive example:
MAXL>loginas;
Enter UserName> username
Enter Password> password
Enter Host> machine_name
Enter UserName to Login As> mimicked_user_name
Encryption
You can encrypt user and password information stored in MaxL scripts.
The following MaxL Shell invocation generates a public-private key pair that you can
use to encrypt a MaxL script.
essmsh -gk
The following MaxL Shell invocation encrypts the input MaxL script, obscuring user
name and password, and changing the file extension to .mxls.
Nested scripts are also encrypted. To avoid this and encrypt only the base script, use
-Em.
The following MaxL Shell invocation decrypts and executes the MaxL script.
The following invocation encrypts input data and returns it in encrypted form. This is
useful if there is a need to manually prepare secure scripts.
The following invocation enables you to encrypt the base script while saving any
nested scripts for manual encryption.
Query Cancellation
You can use the Esc key to cancel a query running from MaxL Shell.
You can start the shell to be used interactively, to read input from a file, or to read
stream-oriented input (standard input from another process). You can log in after you
start the shell, interactively or using a login statement in the input file. You can also log
in at invocation time, by using the -l flag (see -l Flag: Login).
3-189
Chapter 3
MaxL Shell Commands
To start the essmsh shell, do not invoke it directly. In order for the environment to be
set correctly, you must start essmsh using startMAXL.bat (Windows) or startMAXL.sh
(UNIX).
• Prerequisites for Using MaxL
• MaxL Invocation Summary
• Interactive Input
• File Input
• Standard Input
• Login
• LoginAs
• Encryption
• Query Cancellation
Note:
The following help text is for essmsh shell; however, in order for the
environment to be set correctly, you must start essmsh using startMAXL.bat
(Windows) or startMAXL.sh (UNIX). You can pass the same arguments to
startMAXL as you would formerly pass to essmsh. For example, instead of
essmsh -l username password, you should now use startMAXL.bat -l
username password.
essmsh(1)
NAME
essmsh -- MaxL Shell
SYNOPSIS
essmsh [-hlsmup] [-a | -i | file] [arguments...]
3-190
Chapter 3
MaxL Shell Commands
DESCRIPTION
This document describes ways to invoke the MaxL Shell.
The shell, invoked and nicknamed essmsh, takes input in the
following
ways: interactively (from the keyboard), standard input (piped
from another
program), or file input (taken from file specified on the command
line).
The MaxL Shell also accepts any number of command-line arguments,
which can be used to represent any name.
OPTIONS
essmsh accepts the following options on the command line:
-h
Prints this help.
-l <user> <pwd>
Logs in a user name and password to the local Essbase Server
instance.
-u <user>
Specifies a user to be logged in to an Essbase Server instance.
If omitted but the '-p' or '-s' flags are used, essmsh will
prompt for the username.
-p <pwd>
Specifies a password of the user set by the '-u' option to
be logged in to an Essbase Server instance. If omitted, essmsh
will prompt for the password, and the password will be hidden
on the screen.
-s <server>
Used after -l, or with [-u -p], logs the specified user into a
named
server. When omitted, localhost is implied.
-m <msglevel>
Sets the level of messages returned by the shell. Values for
<msglevel>
are: all (the default), warning, error, and fatal.
-i
Starts a MaxL session which reads from <STDIN>, piped in from
another program.
The end of the session is signalled by the EOF character in that
program.
-a
Allows a string of command-line arguments to be referenced from
within the
subsequent INTERACTIVE session. These arguments can be referenced
with positional
parameters, such as $1, $2, $3, etc. Note: omit the -a when using
3-191
Chapter 3
MaxL Shell Commands
arguments with
a file-input session.
NOTES
EXAMPLES
3-192
Chapter 3
MaxL Shell Commands
Interactive Input
You can log into the MaxL Shell for interactive use (typing statements at the keyboard)
in the following ways. See MaxL Invocation Summary for more descriptions of login
flags.
No Flag
-a Flag: Arguments
-l Flag: Login
-u, -p, and -s Flags: Login Prompts and Hostname Selection
-m Flag: Message Level
No Flag
Invoked without a flag, file name, or arguments, the MaxL Shell starts in interactive
mode and waits for you to log in. Note to UNIX users: In the following examples,
replace startMAXL.bat with startMAXL.sh.
Example:
startMAXL.bat
-a Flag: Arguments
With the -a flag, the MaxL Shell starts in interactive mode and accepts space-
separated arguments to be referenced at the keyboard with positional parameters.
Note:
If interactive arguments are used with spooling turned on, variables
are recorded in the log file just as you typed them (for
example, $1, $2, $ARBORPATH).
3-193
Chapter 3
MaxL Shell Commands
Example:
C:\Hyperion\products\Essbase\EssbaseClient
C:\Hyperion\products\Essbase\EssbaseClient
3-194
Chapter 3
MaxL Shell Commands
-l Flag: Login
When the -l flag is used followed by a user name and password, the MaxL Shell logs
in the given user name and password and starts in interactive or non-interactive mode.
The user name and password must immediately follow the -l, and be separated from it
by a space.
Example:
Entered at the command prompt, this starts the MaxL Shell in interactive mode and
logs in user Fiona, who can henceforth issue MaxL statements at the keyboard.
startMAXL.bat -s localhost
Enter UserName> admin
Enter Password> ********
startMAXL.bat -u smith
Enter Password > ******
startMAXL.bat -p password
Enter Username > smith
startMAXL.bat -m error
3-195
Chapter 3
MaxL Shell Commands
Values for <messageLevel> include: default, all, warning, error, and fatal. The
default value is all (same as specifying default).
Values for the <messageLevel> include: default, all, warning, error, and fatal. The
default value is all (same as specifying default).
File Input
You invoke the MaxL Shell to run scripts (instead of typing statements at the keyboard)
in the following ways. See MaxL Invocation Summary for a complete description of
login flags.
File Only
File Only
File Only
If you type startMAXL.bat followed by a file name or path, the shell takes input from
the specified file.
Examples:
startMAXL.bat
C:\Hyperion\products\Essbase\EssbaseClient\scripts\filename.msh
Entered at the command prompt, this starts the shell, tells it to read MaxL statements
from a file, and terminates the session when it is finished.
startMAXL.bat filename
Starts the shell to read MaxL statements from filename, located in the current
directory (the directory from which the MaxL Shell was invoked).
Example:
Starts the shell to read MaxL statements from filename.msh, located in the current
directory.
3-196
Chapter 3
MaxL Shell Commands
spool on to $HOME\\output\\filename.out;
login $1 $2 on $3;
echo "Essbase is installed in $ESSBASEPATH";
spool off;
exit;
Standard Input
With the -i flag, essmsh uses standard input, which could be input from another
process. For example,
program.sh | startMAXL.bat -i
When program.sh generates MaxL statements as output, you can pipe program.sh
to startMAXL.bat -i to use the standard output of program.sh as standard input for
essmsh. Essmsh receives input as program.sh generates output, allowing for efficient
co-execution of scripts.
Example:
The MaxL Shell takes input from the echo command's output. User Fiona is logged in,
and user privileges are displayed.
Login
Before you can send MaxL statements from the MaxL Shell to Essbase Server, you
must log in to an Essbase Server session.
As a prerequisite to using MaxL, follow the client setup instructions in Manage
Essbase Using the MaxL Client.
Note:
Before logging in to an Essbase Server session, you must start the MaxL
Shell (see MaxL Invocation Summary).Or, you can start the MaxL Shell and
log in (see -l Flag: Login) at the same time.
3-197
Chapter 3
MaxL Shell Commands
• USER-NAME
• PASSWORD
• HOST-NAME
Example
LoginAs
To facilitate creating scheduled reports with user-appropriate permissions,
administrators can log in as another user from MaxL.
Example of "log in as" statement:
Interactive example:
MAXL>loginas;
Enter UserName> username
Enter Password> password
Enter Host> machine_name
Enter UserName to Login As> mimicked_user_name
Encryption
You can encrypt user and password information stored in MaxL scripts.
The following MaxL Shell invocation generates a public-private key pair that you can
use to encrypt a MaxL script.
essmsh -gk
3-198
Chapter 3
MaxL Shell Commands
The following MaxL Shell invocation encrypts the input MaxL script, obscuring user
name and password, and changing the file extension to .mxls.
Nested scripts are also encrypted. To avoid this and encrypt only the base script, use
-Em.
The following MaxL Shell invocation decrypts and executes the MaxL script.
The following invocation encrypts input data and returns it in encrypted form. This is
useful if there is a need to manually prepare secure scripts.
The following invocation enables you to encrypt the base script while saving any
nested scripts for manual encryption.
Query Cancellation
You can use the Esc key to cancel a query running from MaxL Shell.
Semicolons
When a MaxL statement is passed to Essbase Server interactively or in batch mode
via the MaxL Shell (essmsh), it must be terminated by a semicolon. Semicolons are
used only to tell essmsh when to terminate the statement; semicolons are not part of
the MaxL language itself. Therefore, when issuing MaxL statements programmatically,
do not use semicolons.
Examples
Program Example
Interactive MaxL Shell create application Sample;
3-199
Chapter 3
MaxL Shell Commands
Program Example
MaxL Shell script:
login $1 identified by $2;
create application Sample;
create currency database
Sample.Interntl;
display database Sample.Interntl;
exit;
Variables
Overview of MaxL Shell
Environment Variables
Positional Parameters
Locally Defined Shell Variables
Quotation Marks and Variable Expansion
Exit Status Variable
set A = val_1;
echo $A;
val_1
Note:
Variables can be in parentheses. Example: if $1 = arg1, then $(1)23 =
arg123.
3-200
Chapter 3
MaxL Shell Commands
Use double quotation marks around a string when you want the string interpreted
as a single token with the variables recognized and expanded. For example,
"$ESSBASEPATH" is interpreted as C:\Hyperion\products\Essbase\EssbaseServer.
Use single quotation marks around a string to tell essmsh to recognize the string as a
single token, without expanding variables. For example, '$ESSBASEPATH' is interpreted
as $ESSBASEPATH, not C:\Hyperion\products\Essbase\EssbaseServer.
Environment Variables
You can reference any environment variable in the MaxL Shell.
Example (Windows): spool on to "$ESSBASEPATH\\out.txt";
Positional Parameters
Positional parameter variables are passed in to the shell at invocation time as
arguments, and can be referred to generically by the subsequent script or interactive
MaxL Shell session using $n, where n is the number representing the order in which
the argument was passed on the command line.
For example, given the following invocation of the MaxL Shell,
Note:
If you nest MaxL Shell scripts or interactive sessions, the nested shell does
not recognize positional parameters of the parent shell. The nested shell
should be passed separate arguments, if positional parameters are to be
used.
3-201
Chapter 3
MaxL Shell Commands
The file or process that the MaxL Shell reads from can be referred to with the
positional parameter $0. Examples:
Note:
Locally defined variables can be named using alphabetic characters,
numbers, and the underscore (_). Variable values can be any characters,
but take note of the usual quoting and syntax rules that apply for the MaxL
Shell (see MaxL Shell Syntax Rules and Variables).
Note:
Variables defined or changed in a nested script persist into the parent script
after the nested script executes.
3-202
Chapter 3
MaxL Shell Commands
See Also
Quoting and Special Characters Rules for MaxL Language
Tokens enclosed in Single Quotation Marks
3-203
Chapter 3
MaxL Shell Commands
Result: $3
Use of Backslashes
Backslashes must be enclosed in single or double quotation marks because they are
special characters.
One backslash is treated as one backslash by the shell, but is ignored or treated as an
escape character by MaxL. Two backslashes are treated as one backslash by the shell
and MaxL.
• '\ ' = \ (MaxL Shell)
• '\ ' = (nothing) (MaxL)
• '\\' = \\ (MaxL Shell)
• '\\' = \ (MaxL)
Example: spool on to 'D:\output.txt'
3-204
Chapter 3
MaxL Shell Commands
Result: Error. Import is a MaxL statement, and for MaxL, '\' is ignored.
Spool on/off
Log the output of a MaxL Shell session to a file. Send standard output, informational
messages, error messages, and/or warning messages generated by the execution of
MaxL statements to a file.
If FILE-NAME does not exist, it is created. If FILE-NAME already exists, it is
overwritten. If a directory path is not specified for FILE-NAME, FILE-NAME is created
in the current directory of the MaxL Shell. Directories cannot be created using the
spool command.
Message logging begins with spool on and ends with spool off.
3-205
Chapter 3
MaxL Shell Commands
FILE-NAME
Example
spool on to 'output.txt';
{MaxL statements}
spool off;
Sends output of MaxL statements to a file called output.txt, located in the current
directory where the MaxL Shell was invoked.
spool on to 'c:\hyperion\output.txt';
Sends output of MaxL statements to a file called output.txt, located in the pre-existing
directory specified by an absolute path.
spool on to '../../../output.txt';
Sends output of MaxL statements to a file called output.txt, located in the pre-existing
directory specified by a relative path. The file would be located three directories above
the current directory.
Description
Most operating systems support three channels for input/output:
• STDIN (standard input channel)
• STDOUT (standard output channel)
• STDERR (standard error channel)
Most operating systems also provide command-line options for re-directing data
generated by applications, depending on which of the above channels the data is
piped through.
Errors in MaxL are flagged as STDERR, allowing command-line redirection of errors
using operating-system redirection handles. Non errors are flagged as STDOUT; thus
normal output may be logged separately from error output. Here is an example of
redirecting error-output at invocation time:
3-206
Chapter 3
MaxL Shell Commands
Note:
Operating-system redirection handles vary; check the platform
documentation.
You can also redirect STDERR and STDOUT independently to different MaxL output
logs, using the corresponding options in the spool command. For example, you can
direct errors to one file and output to another by placing the following lines in your
script:
Note:
You cannot use the generic spool and the special output-channel spools in
the same script. For example, the following is not valid:
spool on to 'session.txt';
spool stderr on to 'errors.txt';
COLUMN-WIDTH
3-207
Chapter 3
MaxL Shell Commands
Example
Example
Set Timestamp
Enable or disable the display of a timestamp after execution of each MaxL statement.
By default, no timestamps are returned.
3-208
Chapter 3
MaxL Shell Commands
Notes
The timestamp information does not display after the error-control shell statements
goto, iferror, and define.
Example
Echo
Display text or expand variables to the screen or to a log file. When used in scripts
with spooling (log-file generation) turned on, echo expands variables in the log file. For
interactive sessions, variables are not expanded in the log file; instead, the variable
name you typed is recorded (for example, $1).
Syntax
Example
See examples of echo under the discussion of variables (Quotation Marks and
Variable Expansion).
Nesting
Reference (include) a MaxL script from within another MaxL script. You might use this
if variables are defined in the referenced MaxL script which are useful to the current
MaxL script.
Syntax
msh <scriptfile>;
Example
Note:
Variables defined or changed in a nested script persist into the parent script
after the nested script executes.
3-209
Chapter 3
MaxL Shell Commands
Note:
Because msh is a shell command, it is limited to the originating session.
Therefore, you should not reference MaxL scripts that contain new login
statements.
Syntax
iferror LABELNAME
goto LABELNAME
define label LABELNAME
login $1 $2;
iferror 'dimbuildFailed';
3-210
Chapter 3
MaxL Shell Commands
login $1 $2;
echo "Testing syntactic errors...";
spool on to spool.out;
msh "doesnotexistlerr.mxl";
iferror 'FileDoesNotExistError';
Example: Goto
The following example script contains a dimension build statement and a data load
statement. Goto is used to skip the data load.
login $1 $2;
3-211
Chapter 3
MaxL Shell Commands
goto 'Finished';
Notes
The MaxL Shell will skip forward in the script to LABELNAME but not backwards.
Version
To see which version of MaxL you are using, type version.
Example
version;
Returns
Logout
Log out from Essbase without exiting the interactive MaxL Shell.
Syntax
logout;
Example
logout;
Exit
Exit from the MAXL> prompt after using interactive mode. You can optionally set the exit
status variable to a non zero argument to return an exit status to the parent shell.
3-212
Chapter 3
ESSCMD Script Conversion
Note:
It is not necessary to exit at the end of MaxL script files or stream-oriented
input (using the -i switch).
Syntax
exit;
Example
exit;
exit 10;
Closes the MaxL Shell window or terminal with a return status of 10. You can use this
in combination with IfError to return a non zero error status to the parent shell.
Subsequently, the MaxL script can be executed using the MaxL Shell by the follwing
command:
essmsh %ARBORPATH%\dailyupd.mxl
3-213
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
ADDUSER ADDUSER finance essexer1; N/A. User management statements
no longer supported in MaxL.
BEGINARCHIVE beginarchive sample basic "test.txt"; alter database Sample.Basic begin
archive to file 'test.txt';
BEGININCBUILDDIM beginincbuilddim; import database Sample.Basic
dimensions from local text data_file
'c:\\data.txt' using local rules_file 'c:\
\data_rule.rul' on error write to 'c:\
\error.log';
BUILDDIM builddim 1 "c:\data_rul.rul" 3 Same as BEGININCDIMBUILD
"c:\data.txt" 4 "c:\error.log";
CALC calc "CALC ALL;"; execute calculation 'CALC ALL' on
sample.basic;
CALCDEFAULT calcdefault; execute calculation default on
Sample.Basic;
CALCLINE calcline "CALC ALL;"; execute calculation 'CALC ALL;' on
sample.basic;
COPYAPP copyapp sample sampnew; create application sampnew as
sample;
COPYDB copydb sample basic sample basic2; create or replace database
sample.basic2 as sample.basic;
COPYFILTER copyfilter sample basic westwrite create filter sample.basic.westmgr as
sample basic westmgr; sample.basic.westwrite;
3-214
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
COPYOBJECT copyobject "9" "sample" "basic" alter object sample.basic.calcdat
"calcdat" "sample" "basic" "calcdat2"; of type text copy to
'sample.basic.calcdat2';
CREATEAPP createapp finance; create or replace application finance;
CREATEDB createdb finance investor; create or replace database
finance.investor;
CREATEGROUP creategroup managers; N/A. User management statements
no longer supported in MaxL.
CREATELOCATION select sample basic; alter system load application sample;
createlocation hq hqserver finance alter application sample load
investor admin password; database basic;
create location alias hq from
sample.basic to finance.investor at
hqserver as admin identified by
'password';
CREATEUSER createuser karen password; N/A. User management statements
no longer supported in MaxL.
CREATEVARIABLE createvariable CurMnth localhost alter database sample.basic add
sample basic Jan; variable CurMnth 'Jan';
alter application sample add variable
CurMnth 'Jan';
alter system add variable CurMnth
'Jan';
DELETEAPP deleteapp sampnew; drop application sampnew cascade;
DELETEDB deletedb demo basic; drop database demo.basic;
DELETEGROUP deletegroup engg; N/A. User management statements
no longer supported in MaxL.
DELETELOCATION select finance investor; alter system load application finance;
deletelocation hq1; alter application finance load
database investor;
drop location alias
finance.investor.hq1;
DELETELOG deletelog sample; alter application sample clear logfile;
DELETEUSER deleteuser rob; N/A. User management statements
no longer supported in MaxL.
DELETEVARIABLE select sample basic; alter system load application sample;
deletevariable CurMnth "localhost"; alter application sample load
database basic;
alter database sample.basic drop
variable CurMnth;
alter application sample drop variable
CurMnth;
alter system drop variable CurMnth;
DISABLELOGIN disablelogin demo; alter application demo disable
connects;
DISPLAYALIAS select sample basic; query database sample.basic list
displayalias "default"; alias_names in alias_table 'Default';
3-215
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
ENABLELOGIN enablelogin demo; alter application demo enable
connects;
ENDARCHIVE endarchive sample basic; alter database sample.basic end
archive;
ENDINCBUILDDIM ENDINCBUILDDIM; See BEGININCBUILDDIM
ESTIMATEFULLDBSIZE select sample basic; query database sample.basic get
estimatefulldbsize; estimated size;
3-216
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
GETVERSION getversion; version;
IMPORT select sample basic; alter system load application sample;
import 1 "c:\data.txt" 4 y 3 alter application sample load
"c:\import.rul" n "c:\data_load.err"; database basic;
import database sample.basic
data from local text data_file 'c:\
\data.txt' using local rules_file 'c:\
\data_rule.rul' on error write to 'c:\
\data_load.err';
INCBUILDDIM See BEGININCBUILDDIM See BEGININCBUILDDIM
LISTALIASES select sample basic; query database sample.basic list
listaliases; alias_table;
3-217
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
LOADDATA select sample basic; alter system load application sample;
loaddata 3 "c:\data.txt"; alter application sample load
database basic;
import database sample.basic data
from local text data_file 'c:\\data.txt'
on error abort;
LOGIN login local admin password; login admin 'password' on local;
LOGOUT logout; logout;
LOGOUTALLUSERS logoutallusers y; alter system logout session all;
LOGOUTUSER Available only in interactive ESSCMD alter system logout session
shell sessions. 4294967295;
OUTPUT output 1 c:\test.log; spool on to 'c:\test.log';
output 4; spool off;
PURGELINKEDOBJECTS purgelinkedobjects "Fiona" alter database sample.basic delete
"07/07/2002"; lro by 'fiona' before '07/07/2002';
PUTALLREPLCELLS select sampeast east; alter system load application
putallreplcells svr1 samppart sampeast;
company; alter application sampeast load
database east;
refresh replicated partition
sampeast.east from
samppart.company at svr1 updated
data;
PUTUPDATEDREPLCELLS See PUTALLREPLCELLS See PUTALLREPLCELLS
REMOVELOCKS removelocks "2"; drop lock held by Fiona;
REMOVEUSER removeuser finance steve; N/A. User management statements
no longer supported in MaxL.
RENAMEAPP renameapp sample newsamp1; alter application sample rename to
newsamp1;
RENAMEDB renamedb sample basic newbasic; alter database sample.basic rename
to newbasic;
RENAMEFILTER renamefilter sample basic westmgr create or replace filter
allwest; sample.basic.westmgr as
sample.basic.allwest;
drop filter sample.basic.westmgr;
RENAMEOBJECT RENAMEOBJECT "9" "sample" alter object sample.basic.calcdat of
"basic" "calcdat" "calcdat2"; type text rename to 'calcdat2';
RENAMEUSER renameuser steve_m m_steve; N/A. User management statements
no longer supported in MaxL.
RESETDB select sample basic; alter database sample.basic reset;
resetdb;
RESETPERFSTATS resetperfstats enable; alter database sample.basic set
performance statistics enabled;
RUNCALC The only command supported is the execute calculation
server based calc script execution. Sample.Basic.one;
Select Sample.Basic;
Runcalc 2 one;
3-218
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
RUNREPT select sample basic; runrept 2 alter system load application sample;
complex "c:\complex.out"; alter application load database basic;
export database sample.basic using
server report_file 'complex' to
data_file 'c:\\complex.out';
SELECT select sample basic; alter system load application sample;
alter application load database basic;
SETALIAS select sample basic; alter database sample.basic set
setalias "long names"; active alias_table 'Long Names';
3-219
Chapter 3
ESSCMD Script Conversion
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
SETDBSTATEITEM . See the alter database statement.
SETDEFAULTCALC select sample basic; alter database sample.basic set
setdefaultcalc "CALC ALL;"; default calculation as 'CALC ALL';
Note:
This is
part of
the
separat
e MaxL
Shell
gramm
ar, not
the
MaxL
langua
ge
itself.
3-220
Chapter 3
MaxL Reserved Words List
ESSCMD shell Command ESSCMD shell Usage Example MaxL Equivalent Example
UPDATEVARIABLE updatevariable hot_product local alter system set variable
sample basic "100-10"; 'hot_product' '100-10';
alter application sample set variable
'hot_product' "100-10";
alter database Sample.Basic set
variable 'hot_product' '100-10';
VALIDATE validate; alter database sample.basic validate
data to local logfile 'validation.txt';
abort
absolute_value
account_type
active
add
administrator
advanced
after
aggregate
aggregates
aggregate_assume_equal
aggregate_missing
aggregate_storage
aggregate_sum
aggregate_view
aggregate_use_last
algorithm
alias
alias_names
alias_table
all
all_users_groups
allocation
alloc_rule
allow
allow_merge
alter
alternate_rollups
amount
amountcontext
amounttimespan
any
append
3-221
Chapter 3
MaxL Reserved Words List
application
application_access_type
apply
archive
archive_file
area
as
aso_level_info
at
attribute
attribute_calc
attribute_info
attribute_spec
attribute_to_base_member_association
auto_password
autostartup
b
backup_file
based
basis
basistimespan
basistimespanoptions
before
begin
bitmap
blocks
buffer_id
buffered
build
by
cache_pinning
cache_size
calc_formula
calc_script
calc_string
calculation
cascade
cell_status
change_file
clear
client
cnt_sempaphore
column_width
columns
combinebasis
commands
comment
commitblock
committed_mode
compact
compression
compression_info
config_values
connect
connects
3-222
Chapter 3
MaxL Reserved Words List
consolidation
copy
copy_subvar
copy_useraccess
create
create_application
create_blocks
create_user
creation
creation_user
creditmember
cube_size_info
currency
currency_category
currency_conversion
currency_database
currency_member
currency_rate
custom
data
data_block
data_cache_size
data_file
data_file_cache_size
data_storage
data_string
database
database_synch
database_asynch
days
dbstats
debitmember
debug
default
definition_only
definitions
delete
designer
destroy
dimension
dimensions
direct
direction
directory
disable
disabled
disallow
discard_errors
disk
display
divideamount
division
drillthrough
dml_output
drop
3-223
Chapter 3
MaxL Reserved Words List
dump
dynamic_calc
eas_loc
enable
enabled
encrypted
end
end_transaction
enforce
eqd
error
error_file
errors_to_highest
errors_to_location
errors_to_lowest
estimated
event
exact
excel
exceeds
excludedrange
execute
existing_views
export
export_directory
external
failed_sss_migration
fragmentation_percent
freespace
from
file
file_location
file_size
file_type
filter
filter_access
fixed_decimal
for
force
force_dump
formatted_value
function
gb
get
get_missing_cells
get_meaningless_cells
global
grant
group
group_id
ha_trace
held
high
hostname
identified
3-224
Chapter 3
MaxL Reserved Words List
identify
ignore_missing_values
ignore_zero_values
immediate
implicit_commit
import
in
inactive
inactive_user_days
including
incremental
index
index_cache_size
index_data
index_page_size
information
initialize
input
instead
invalid_block_headers
invalid_login_limit
io_access_mode
kb
kernel_io
kernel_cache
kill
level
level0
license_info
linked
list
load
load_buffer
load_buffers
load_buffer_block
local
location
lock
lock_timeout
locked
log_level
logfile
login
logout
long
lotus_2
lotus_3
lotus_4
low
lro
macro
manager
mapped
max_disk_size
max_file_size
3-225
Chapter 3
MaxL Reserved Words List
max_lro_file_size
mb
medium
member
member_alias_namespace
member_calculation
member_comment
member_data
member_fixed_length_data
member_formula
member_info
member_name_namespace
member_property
member_uda
member_uda_namespace
member_variable_length_data
merge
meta_read
metadata_only
migr_modified_access
miner
minimum
mining
minutes
missing_value
mode
model
move
multiple
multiplication
mutex
name
negativebasisoptions
never
no_access
none
non_unique_members
nonunicode_mode
note
nothing
numerical_display
object
objects
of
off
offset
on
only
opg_cache
opg_state
optional
optional_group
options
or
outline
3-226
Chapter 3
MaxL Reserved Words List
outline_id
outline_paging_file
output
override
overview
partition
partition_file
partition_size
passive
password
password_reset_days
performance
permission
persistence
perspective
physical
pmml_file
ports
pov
pre_image_access
precision
preserve
preserve_groups
private
privilege
process
project
property
protocol
purge
query
query_data
query_tracking
range
read
recover
reference_cube
reference_cube_reg
refresh
region
registration
reregister
remote
remove
remove_zero_cells
rename
repair
repeatamount
replace
replay
replicated
replication_assume_identical
report_file
request
request_history
3-227
Chapter 3
MaxL Reserved Words List
request_id
reset
resource_usage
restore
restructure
result
resync
retrieve_buffer_size
retrieve_sort_buffer_size
reverse
revoke
rle
round
row
rows
rules_file
runtime
runtime_info
save
scientific_notation
scope
score
script_file
seconds
security
security_backup
select
selecting
selection
self_session_info
semaphore
sequence_id_range
server
server_port
session
session_idle_limit
session_idle_poll
set
shared_services_native
short
shutdown
single
singlecell
size
size_limit
skip_to_next_amount
skip_missing
skip_negative
skip_zero
slice
sourceregion
spec
spinlock
splitbasis
spread
3-228
Chapter 3
MaxL Reserved Words List
SSL
sss
sss_mode
sss_name
starting
startup
statistics
status
stop
stopping
storage
storage_info
structure_file
subtract
supervisor
suppress
sync
system
table
tablespace
target
targettimespan
targettimespanoptions
task
tb
template
text
thread
to
total_size
transactions
transformation
transparent
trigger
trigger_func
trigger_spool
two_pass_calc
type
uda
unicode
unicode_mode
unlimited
unload
unlock
update
updated
updates
use
user
username_as_password
using
validate
values
variable
vector
3-229
Chapter 3
MaxL BNF
verification
version
view_file
views
volume
wait_for_resources
warn
when
with
wizard
worksheet
write
xml_file
zero_value
zeroamountoptions
zerobasisoptions
MaxL BNF
MaxL BNF diagrams are an optional alternative to railroad diagrams, for reading MaxL
syntax.
Key
alter application
alter application
{APP-Name
{set
{lock_timeout after INTEGER[!seconds!|minutes]
|max_lro_file_size {unlimited|SIZE-STRING}
|minimum permission %DBS-SYSTEM-ROLE%
|variable VARIABLE-NAME STRING
|cache_size SIZE-STRING
|type unicode_mode
}
|{load|unload} database DBS-STRING
|{enable|disable} {startup|autostartup|commands|updates|connects|
security}
|comment COMMENT-STRING
3-230
Chapter 3
MaxL BNF
|clear logfile
|add variable VARIABLE-NAME [STRING]
|drop variable VARIABLE-NAME
|rename to APP-NAME
}
DBS-SYSTEM-ROLE::=
{no_access|read|write|execute|manager}
alter application
{APP-Name
{set
{
|minimum permission %DBS-SYSTEM-ROLE%
|variable VARIABLE-NAME STRING
|cache_size SIZE-STRING
|type unicode_mode
}
|{load|unload} database DBS-STRING
|{enable|disable} {startup|autostartup|commands|updates|connects|
security}
|comment COMMENT-STRING
|clear logfile
|add variable VARIABLE-NAME [STRING]
|drop variable VARIABLE-NAME
|rename to APP-NAME
}
DBS-SYSTEM-ROLE::=
{no_access|read|write|execute|manager}
3-231
Chapter 3
MaxL BNF
retrieve_buffer_size SIZE-STRING
|retrieve_sort_buffer_size SIZE-STRING
|data_cache_size SIZE-STRING
|index_cache_size SIZE-STRING
|currency_database DBS-STRING
|currency_member MEMBER-NAME
|currency_conversion {division|multiplication}
|minimum permission %DBS-SYSTEM-ROLE%
|compression {rle|bitmap}
|lock_timeout
{
immediate
|never
|after INTEGER {[!seconds!|minutes]}
}
|implicit_commit after INTEGER {blocks|rows}
|variable VARIABLE-NAME STRING
|default calculation {CALC-NAME-SINGLE|as calc_string CALC-STRING}
|active alias_table ALT-NAME-SINGLE
|performance statistics {enabled|disabled|mode to %PST-SPEC%}
|note COMMENT-STRING
}
DBS-SYSTEM-ROLE::=
{no_access|read|write|execute|manager}
PST-SPEC::=
{
default
|{medium|long} persistence {all|database|server} scope
}
3-232
Chapter 3
MaxL BNF
3-233
Chapter 3
MaxL BNF
|comment COMMENT-STRING
|merge {all|incremental} data
|begin archive to file FILE-NAME
|end archive
}
DBS-SYSTEM-ROLE::=
{no_access|read|write|execute|manager}
LOAD-BUFFER-INIT::=
initialize load_buffer with buffer_id BUFFER-ID[,...]
[resource_usage RNUM][property PROPS][wait_for_resources]
alter drillthrough
alter drillthrough
URL-NAME from xml_file FILE-NAME
on '{'MEMBER-EXPRESSION'}'[,...]
[allow_merge]
alter filter
alter object
OBJ-TYPE::=
outline
|calc_script
|report_file
|rules_file
|text
|partition_file
|lro
|selection
|wizard
|eqd
|outline_paging_file
|worksheet
|alias_table
alter partition
3-234
Chapter 3
MaxL BNF
alter session
alter system
alter system
{
load application {all|APP-NAME}
|unload application {all|APP-NAME} [no_force]
|set
{
session_idle_limit {INTEGER[!seconds!|minutes]|none}
|session_idle_poll {INTEGER[!seconds!|minutes]|none}
|invalid_login_limit {INTEGER|none|}
|inactive_user_days {INTEGER[days]|none}
|password_reset_days {INTEGER[days]|none}
|variable VARIABLE-NAME STRING
|server_port begin at INTEGER end at INTEGER
}
|delete export_directory EXPORT-DIR
|add variable VARIABLE-NAME[STRING]
|drop variable VARIABLE-NAME
|logout session %SESSION-SPEC% [force]
|shutdown
|kill request %SESSION-SPEC%
|{enable|disable} unicode
|reconcile[force]
}
SESSION SPEC::=
all
|SESSION-ID
|by user USER-NAME
[
3-235
Chapter 3
MaxL BNF
on application APP-NAME
|on database DBS-NAME
]
|on application APP-NAME
|on database DBS-NAME
alter system
{
load application {all|APP-NAME}
|unload application {all|APP-NAME} [no_force]
|set
{
session_idle_limit {INTEGER[!seconds!|minutes]|none}
|session_idle_poll {INTEGER[!seconds!|minutes]|none}
|invalid_login_limit {INTEGER|none|}
|inactive_user_days {INTEGER[days]|none}
|password_reset_days {INTEGER[days]|none}
|variable VARIABLE-NAME STRING
|server_port begin at INTEGER end at INTEGER
}
|add variable VARIABLE-NAME[STRING]
|drop variable VARIABLE-NAME
|logout session %SESSION-SPEC% [force]
|shutdown
|kill request %SESSION-SPEC%
|reconcile [force]
}
SESSION SPEC::=
all
|SESSION-ID
|by user USER-NAME
[
on application APP-NAME
|on database DBS-NAME
]
|on application APP-NAME
|on database DBS-NAME
3-236
Chapter 3
MaxL BNF
[,...]
]
|alter file_location FILE-NAME
[
set max_file_size SIZE-STRING
|set max_disk_size SIZE-STRING
[,...]
]
|drop file_location FILE-NAME
}
alter trigger
alter trigger
{
TRIGGER-NAME {enable|disable}
|on database DBS-NAME disable
}
create application
create calculation
create database
3-237
Chapter 3
MaxL BNF
create drillthrough
create filter
3-238
Chapter 3
MaxL BNF
AREA-SPEC::=
area MEMBER-EXPRESSION [AREA-ALIAS] [ ...]
AREA-SPEC::=
area MEMBER-EXPRESSION [AREA-ALIAS] [ ...]
display application
display calculation
display calculation
[
!all!
|CALC-NAME
|on application APP-NAME
3-239
Chapter 3
MaxL BNF
display database
display database
[
!all!
|DBS-NAME
|on application APP-NAME
]
[request_history]
display drillthrough
display drillthrough
{
DBS-NAME [to FILE-NAME-PREFIX]
|URL-NAME [to FILE-NAME]
}
display filter
display group
display lock
3-240
Chapter 3
MaxL BNF
display object
OBJ-TYPE::=
outline
|calc_script
|report_file
|rules_file
|text
|patition_file
|lro
|selection
|wizard
|eqd
|outline_paging_file
|worksheet
|alias_table
display partition
display privilege
display privilege
{
user [!all!|USER-NAME]
|group [!all!|GROUP-NAME]
}
display session
display session
[
!all!
|SESSION-ID
|by user USER-NAME [on application APP-NAME|on database DBS-NAME]
|on application APP-NAME
|on database DBS-NAME
]
display system
display system
[
3-241
Chapter 3
MaxL BNF
version
|ports {in use|overview}
|export_directory
|license_info
|security mode
|configuration
{
|agent
|network
|errors
|on database DBS-NAME
}
|message_level
]
display trigger
display trigger
[
!all!
|on system
|on application APP-NAME
|on database DBS-NAME
|TRIGGER-NAME
]
display trigger_spool
[
!all!
|on application APP-NAME
|on database DBS-NAME
|SPOOL-NAME
]
display user
display user
[
in group [!all!|GROUP-NAME]
|USER-NAME
]
display variable
display variable
[
!all!
|VARIABLE-NAME
|on application APP-NAME
3-242
Chapter 3
MaxL BNF
drop application
drop calculation
drop database
drop drillthrough
drop filter
drop lock
drop lock
[
!all!
|[
!on system!
|on application APP-NAME
|on database DBS-NAME
]
[!all!|held by USER-NAME]
]
drop object
OBJ-TYPE::=
outline
|calc_script
|report_file
|rules_file
3-243
Chapter 3
MaxL BNF
|text
|patition_file
|lro
|selection
|wizard
|eqd
|outline_paging_file
|worksheet
|alias_table
drop partition
drop
{transparent|replicated}
partition DBS-NAME {from|to} DBS-NAME
[at HOST-NAME][force]
drop trigger
3-244
Chapter 3
MaxL BNF
[based on query_data]
[{dump|force_dump} to view_file VIEW-FILE-NAME]
[{enable|!disable!} alternate_rollups]
3-245
Chapter 3
MaxL BNF
|errors_to_location MDX-TUPLE
}
]
[{!override!|add|subtract} values]
}
execute calculation
execute calculation
{
CALC-NAME
|CALC-NAME on database DBS-STRING
|{CALC-STRING|default} on DBS-NAME
}
export data
export lro
3-246
Chapter 3
MaxL BNF
export outline
export query_tracking
grant
grant
{
{create_application|create_user|no_access|administrator}
[on system]
|{no_access|manager} on application APP-NAME
|{no_access||read|write|manager} on database DBS-NAME
|filter FILTER-NAME
|execute
{
CALC-NAME
|{any|default}
[
!on system!
|on application APP-NAME
|on database DBS-NAME
]
}
to {USER-NAME|GROUP-NAME}
import data
3-247
Chapter 3
MaxL BNF
}
on error {{write|append}to FILE-NAME|abort}
]
}
on error {{write|append}to FILE-NAME|abort}
import dimensions
import lro
3-248
Chapter 3
MaxL BNF
import query_tracking
query application
query database
3-249
Chapter 3
MaxL BNF
|lro
[
!all!
|by USER-NAME
|before DATE
|by USER-NAME before DATE
]
|{all|data|index} file information
|transactions
[
after LOG-TIME
[[force] write to file PATHNAME_FILENAME]
]
}
}
refresh outline
3-250
Chapter 3
MaxL Statements (Aggregate Storage)
{
purge outline change_file
|apply all
|apply nothing
|%OTL-CHANGE-SPEC%
}
OTL-CHANGE-SPEC::=
apply on dimension
{add|delete|rename|update|move}[...,]
apply on member
{add|delete|rename|move}[...,]
apply on member_property {
account_type
|alias
|calc_formula
|consolidation
|currency_conversion
|currency_category
|data_storage
|uda
}[...,]
3-251
Chapter 3
MaxL Statements (Aggregate Storage)
• create outline
• create partition
• create after-update trigger
• display application
• display calculation
• display database
• display filter
• display filter row
• display group
• display lock
• display object
• display partition
• display privilege
• display session
• display system
• display tablespace
• display trigger
• display user
• display variable
• drop application
• drop calculation
• drop database
• drop filter
• drop lock
• drop object
• drop partition
• drop trigger
• execute aggregate process
• execute aggregate build
• execute aggregate selection
• export data
• grant
• import data
• import dimensions
• login
• query application
• query database
3-252
Chapter 3
MaxL Statements (Aggregate Storage)
• refresh outline
• refresh replicated partition
The MaxL grammar is case-insensitive. Semicolon statement-terminators are required
when using the MaxL Shell. Key words of the MaxL grammar are represented in this
document in lower-case. Terminals, represented in upper-case, are to be replaced by
the appropriate names, numbers, privileges, or strings. For more information about
components of MaxL statements, see MaxL Definitions.
Note:
MaxL Shell Invocation is part of the separate command shell grammar, not
the MaxL language itself.
Syntax
• APP-NAME
• Database-Level System Roles
• VARIABLE-NAME
• SIZE-STRING
• DBS-STRING
• COMMENT-STRING
3-253
Chapter 3
MaxL Statements (Aggregate Storage)
• VARIABLE-NAME
You can change the following application-wide settings using alter application.
Keywords
set variable
Assign a string value to an existing substitution-variable name. If the variable does not
exist, first create it using add variable. Substitution variables may be referenced by
calculations in the application.
set cache_size
Set the maximum size to which the aggregate storage cache may grow. The
aggregate storage cache grows dynamically until it reaches this limit. This setting
takes effect after you restart the application. To check the currently set limit, use the
following MaxL statement:
load database
Start (by loading into memory) an idle database. The statement will fail if you do not
have at least read privilege for the database.
unload database
Stop (by unloading from memory) an active database. The statement will fail if you do
not have at least read privilege for the database.
enable startup
Permit all users to load (start) the application. This only applies to users who have at
least read privilege for the application. Startup is enabled by default.
disable startup
Prevent all users from loading (starting) the application. Startup is enabled by default.
enable autostartup
Start the application automatically when Essbase Server starts. By default,
autostartup is disabled.
disable autostartup
Do not start the application automatically when Essbase Server starts. By default,
autostartup is disabled.
enable commands
Allow all users with sufficient permissions to make requests to databases in the
application. Use to reverse the effect of disable commands. The disable commands
setting remains in effect only for the duration of your session. By default, commands
are enabled.
3-254
Chapter 3
MaxL Statements (Aggregate Storage)
disable commands
Prevent all requests to databases in the application, including non-data-specific
requests, such as viewing database information or changing database settings. All
users are affected, including other administrators. Administrators are affected by this
setting as a safety mechanism to prevent accidental updates to databases during
maintenance operations. This setting remains in effect only for the duration of your
session. The setting takes effect immediately, and affects users who are currently
logged in, as well as users who log in later during your session.
Caution:
If performing maintenance operations that require disabling commands, you
must make those maintenance operations within the same session and the
same script as the one in which commands were disabled.
enable updates
Allow all users with sufficient permissions to make requests to databases in the
application. Use to reverse the effect of disable updates. Disabling updates remains
in effect only for the duration of your session. By default, updates are enabled.
disable updates
Prevent all users from making requests to databases in the application. Use before
performing update and maintenance operations. The disable updates setting remains
in effect only for the duration of your session.
Caution:
If performing maintenance operations that require updates to be disabled,
you must make those maintenance operations within the same session and
the same script as the one in which updates were disabled. By default,
updates are enabled.
enable connects
Allow all users with sufficient permissions to make connections to databases in the
application. Use to reverse the effect of disable connects. By default, connections
are enabled.
disable connects
Prevent any user with a permission lower than Application Manager from making
connections to the databases that require the databases to be started. Database
connections remain disabled for all databases in the application, until the application
setting is re-enabled by the administrator.
By default, connections are enabled.
enable security
When security is disabled, Essbase ignores all security settings in the application and
treats all users as Application Managers. By default, security is enabled.
3-255
Chapter 3
MaxL Statements (Aggregate Storage)
disable security
When security is disabled, Essbase ignores all security settings in the application and
treats all users as Application Managers. By default, security is enabled.
comment
Enter an application description (optional). The description can contain up to 80
characters.
clear logfile
Delete the application log located in the application directory. A new log is created for
entries recording subsequent application activity.
add variable
Create an application-level substitution variable by name, and optionally assign a
string value for the variable to represent. You can assign or change the value later
using set variable. A substitution variable acts as a global placeholder for information
that changes regularly. Substitution variables may be referenced by calculations and
report scripts.
If substitution variables with the same name exist at server, application, and database
levels, the order of precedence for the variables is as follows: a database level
substitution variable supersedes an application level variable, which supersedes a
server level variable.
drop variable
Remove a substitution variable and its corresponding value from the application.
rename to
Rename the application. When you rename an application, the application and the
application directory (ARBORPATH\app\appname) are renamed.
Example
Prevents all users from making requests to the application scope. Use this statement
before performing application-wide update and maintenance operations.
3-256
Chapter 3
MaxL Statements (Aggregate Storage)
Syntax
• DBS-NAME
• DBS-SYSTEM-ROLE
• SIZE-STRING
• VARIABLE-NAME
• ALT-NAME-SINGLE
• CUBE-AREA
• BUFFER-ID
• RNUM
• PROPS
• DBS-STRING
3-257
Chapter 3
MaxL Statements (Aggregate Storage)
• COMMENT-STRING
• FILE-NAME
You can change the following database-wide settings using alter database.
Keywords
enable startup
Enable users to start the database directly or as a result of requests requiring the
database to be started. Startup is enabled by default.
disable startup
Prevent all users from starting the database directly or as a result of requests that
would start the database. Startup is enabled by default.
enable autostartup
Automatically start the database when the application to which it belongs starts.
Autostartup is enabled by default. This setting is applicable only when startup is
enabled.
disable autostartup
Prevent automatic starting of the database when the application to which it belongs
starts. Autostartup is enabled by default.
enable query_tracking
Begin collecting query data for this database, to be used for query-based view
optimization.
To utilize the results of query tracking, use the optional based on query_data
grammar in any of the following statements:
• query database <dbs-name> list existing_views
• execute aggregate process
• execute aggregate selection
Query tracking is disabled by default.
disable query_tracking
Stop collecting query data for query-based view optimization. Query tracking is
disabled by default.
set retrieve_buffer_size
Change the database retrieval buffer size. This buffer holds extracted row data
cells before they are evaluated by the RESTRICT or TOP/BOTTOM Report Writer
commands. The default size is 10 KB. The minimum size is 2 KB. Increasing the size
may improve retrieval performance.
set retrieve_sort_buffer_size
Change the database retrieval sort buffer size. This buffer holds data until it is sorted.
The default size is 10 KB. The minimum size is 2 KB. Increasing the size may improve
retrieval performance.
3-258
Chapter 3
MaxL Statements (Aggregate Storage)
set variable
Change the value of an existing subsitution variable on the database. The value must
not exceed 256 bytes. It may contain any character except a leading ampersand (&).
reset
Clear all data and linked-reporting objects from the database, but preserve the outline.
Note:
If kernel queries are running when a clear data operation starts, the clear
data operation waits for the kernel queries to complete and then the clear
data operation proceeds. This information also applies to the reset all and
reset data grammar.
reset all
Clear all data, Linked Reporting Objects, and the outline.
reset data
Same as using reset.
clear aggregates
Delete all aggregate views.
compact outline
Compact the outline file to decrease the outline file size. Compaction helps keeps the
outline file at an optimal size. After the outline file is compacted, the file continues to
grow as before, when members are added or deleted.
Note:
Compacting the outline does not cause Essbase to clear the data. When
a member is deleted from the outline, the corresponding record of that
member in the outline file is marked as deleted but the record remains in
the outline file. Compacting the outline file does not remove the records of
deleted members.
add variable
Create a database-level substitution variable by name, and optionally assign a string
value for the variable to represent. You can assign or change the value later using
set variable. A substitution variable acts as a global placeholder for information
that changes regularly. Substitution variables may be referenced by calculations and
report scripts.
If substitution variables with the same name exist at server, application, and database
levels, the order of precedence for the variables is as follows: a database level
substitution variable supersedes an application level variable, which supersedes a
server level variable.
3-259
Chapter 3
MaxL Statements (Aggregate Storage)
drop variable
Remove a substitution variable and its corresponding value from the database.
initialize load_buffer
Create a temporary buffer in memory for loading data.
Data load buffers are used in aggregate storage databases for allocations, custom
calculations, and lock and send operations. Multiple data load buffers can exist on a
single aggregate storage database.
You can control the share of aggregate storage cache resources the load buffer is
allowed to use and how long to wait for resources to become available before aborting
load buffer operations. You can also set properties that determine how missing and
zero values, duplicate values, and multiple values for the same cell in the data source
are processed.
• resource_usage
• property
destroy load_buffer
Destroy the temporary data-load memory buffer.
rename to
Rename the database. When you rename a database, the database directory is also
renamed.
comment
Create a description of the database. The maximum number of characters is 80.
This description is available to database administrators. To annotate the database for
Smart View or other grid client users, use set note.
3-260
Chapter 3
MaxL Statements (Aggregate Storage)
• Logical, in which the input cells in the specified region are written to a new data
slice with negative, compensating values that result in a value of zero for the
cells you want to clear. The process for logically clearing data completes in a
length of time that is proportional to the size of the data being cleared. Because
compensating cells are created, this option increases the size of the database.
Use the MaxL statement without a keyword:
The region must be symmetrical. Members in any dimension in the region must be
stored members. When physically clearing data, members in the region can be upper-
level members in alternate hierarchies. (If the region contains upper-level members
from alternate hierarchies, you may experience a decrease in performance.) Members
cannot be dynamic members (members with implicit or explicit MDX formulas), nor
can they be from an attribute dimension.
To remove cells with a value of zero, use the alter database MaxL statement with the
merge grammar and the remove_zero_cells keyword.
enable replication_assume_identical_outline
Optimize the replication of an aggregate storage database when the aggregate
storage database is the target and a block storage database is the source and the
two outlines are identical.
Replication optimization affects only the target aggregate storage application; the
source block storage application is not affected. This functionality does not apply to
block storage replication.
disable replication_assume_identical_outline
Do not optimize the replication of an aggregate storage database when the aggregate
storage database is the target and a block storage database is the source and the two
outlines are identical.
3-261
Chapter 3
MaxL Statements (Aggregate Storage)
Note:
Using the begin archive to file and end archive grammar is the only
supported way to backup and recover a database using MaxL.
end archive
Return the database to read-write mode after backing up the database files.
Note:
Using the begin archive to file and end archive grammar is the only
supported way to backup and recover a database using MaxL.
Example
3-262
Chapter 3
MaxL Statements (Aggregate Storage)
Merges all incremental data slices into the main slice in the
ASOsamp.Sample database.
Merges all incremental data slices into the main slice in the
ASOsamp.Sample database, and removes cells with a value
of zero.
Clears all Budget data for the month of Jan, using the logical
method, from the ASOsamp.Sample database.
Clears all Budget data for the month of Jan, using the physical
method, from the ASOsamp.Sample database.
Syntax
3-263
Chapter 3
MaxL Statements (Aggregate Storage)
• APP-NAME
• INTEGER
• VARIABLE-NAME
You can change the following system-wide settings using alter system.
Keywords
load application
Start an application, or start all applications on the Essbase Server.
unload application
Stop an application, or stop all applications on the Essbase Server. Unloading an
application cancels all active requests and database connections, and stops the
application. If Essbase encounters a problem when trying to cancel active requests
and database connections, and stopping the application, an error is logged in the
application log.
If you do not want to stop an application if it has active requests and database
connections, use the no_force grammar. When using no_force:
3-264
Chapter 3
MaxL Statements (Aggregate Storage)
• If the application has active requests and database connections, the application is
not stopped; it continues running
• If the application does not have active requests and database connections, the
application is stopped, as if you used unload application without specifying
no_force
Note:
Unloading an application cancels all active requests and database
connections, and stops the application, unless you explicitly specify
otherwise using the no_force option. The no_force option causes Essbase
to return an error if active requests are running on the application.
An internal logic error [200] is logged when a database is unable to shut
down gracefully when unloading an application or shutting down the system
while a process is running on the database.
set session_idle_limit
Set the interval of time permitted for a session to be inactive before Essbase Server
logs off the user. The minimum limit that you can set is five minutes (or 300 seconds).
When the session idle limit is set to none, all users can stay logged on until the
Essbase Server is shut down.
The default user idle logout time is 60 minutes. When a user initiates a calculation in
the background, after 60 minutes the user is considered idle and is logged out, but the
calculation continues in the background.
Because the user may mistakenly assume that the calculation stopped because he or
she was logged out, you can do one of the following to correct the user experience:
• Run the calculation in the foreground
• Increase the session idle limit in to a time that exceeds the duration of the
calculation, or to none
set session_idle_poll
Set the time interval for inactivity checking and security-backup refreshing. The time
interval specified in the session idle poll gives Essbase instructions:
• Tells it how often to check whether user sessions have passed the allowed
inactivity interval indicated by session_idle_limit in the alter system statement.
• Tells it how often to refresh the security backup file. If session_idle_poll is set to
zero, the security backup file is still refreshed every five minutes.
set invalid_login_limit
Set the number of unsuccessful login attempts allowed by any user before the user
account becomes disabled. When you change this setting, the counter resets to 0.
When the invalid login limit is set to none, there is no limit. By default, there is no limit.
set inactive_user_days
Set the number of days a user account may remain inactive before the system
disables it. The counter resets when the user logs in, is edited, or is activated by
an administrator. When the inactive days limit is set to none, user accounts remain
enabled even if they are not used. By default, there is no limit.
3-265
Chapter 3
MaxL Statements (Aggregate Storage)
set password_reset_days
Set the number of days users may retain passwords. After the allotted number of
days, users are prompted at login to change their passwords. The counter resets
for a user when the user changes the password, is edited, or is activated by an
administrator. When the password reset days limit is set to none, there is no built-in
limit for password retention. By default, there is no limit.
set variable
Change the value of an existing subsitution variable on the system. The value must
not exceed 256 bytes. It may contain any character except a leading ampersand (&).
set server_port
Expand a port range specified in Essbase configuration properties. Each Essbase
application uses two ports from this range. If no more ports are available, an error
message is displayed.
Note:
You can expand port ranges only so that the beginning port range is
less than SERVERPORTBEGIN and the ending port range is greater than
SERVERPORTEND.
add variable
Create a system-level substitution variable by name, and optionally assign a string
value for the variable to represent. You can assign or change the value later using
set variable. A substitution variable acts as a global placeholder for information
that changes regularly. Substitution variables may be referenced by calculations and
report scripts.
If substitution variables with the same name exist at server, application, and database
levels, the order of precedence for the variables is as follows: a database-level
substitution variable supersedes an application-level variable, which supersedes a
server-level variable.
drop variable
Remove a substitution variable and its corresponding value from the system.
logout session...force
Terminate a session (or sessions) even if it is currently processing a request. The
request is allowed to proceed to a safe point, and then the transaction is rolled back.
3-266
Chapter 3
MaxL Statements (Aggregate Storage)
shutdown
Shut down the Essbase Server.
Note:
To terminate your own active request in MaxL Shell, press the ESC key.
reconcile
When Essbase is started using a security backup file (essbase_timestamp.bak)
instead of essbase.sec, reconcile the security file to match the state of Essbase on
an external disk. This grammar displays discrepancies in application and database
information between the security file and the external disk:
• If an application folder is on the disk but not in the security file, display a message
indicating the discrepancy. (Essbase checks for the presence of a appname.app
file in the ARBORPATH/app/appname directory.)
The force option does not apply in this scenario.
• If an application file is in the security file but not on the disk, display a message
indicating the discrepancy.
The force option removes the application from the security file.
• If an application database folder is on the disk but not in the security file, display
a message indicating the discrepancy. (Essbase checks for the presence of a
dbname.otl file in the ARBORPATH/app/appname/dbname directory.)
The force option does not apply in this scenario.
3-267
Chapter 3
MaxL Statements (Aggregate Storage)
• If an application database file is in the security file but not on the disk, display a
message indicating the discrepancy.
The force option removes the database from the security file.
Notes
SESSION SPECIFICATION
A session is a single user connection to Essbase Server. The session can be identified
by keywords and names indicating context, or by a unique session ID number.
A request is a query sent to Essbase Server by a user or by another process; for
example, starting an application or restructuring a database outline. Only one request
at a time can be processed in each session.
If a session is processing a request at the time that an administrator attempts to
terminate the session, the administrator must either terminate the request first, or
use the force keyword available with alter system to terminate the session and the
current request.
Example
3-268
Chapter 3
MaxL Statements (Aggregate Storage)
Syntax
• APP-NAME
• COMMENT-STRING
You can create an application in the following ways using the aggregate storage
version of create application.
Keywords
create application
Create a new application. Application names are not case-sensitive.
3-269
Chapter 3
MaxL Statements (Aggregate Storage)
...type nonunicode_mode
Create a Non Unicode-mode application. This is also the default if these keywords are
omitted.
...type unicode_mode
Create a Unicode-mode application.
...using aggregate_storage
Create an application using an aggregate storage model. Only one database per
application is allowed. Selecting to use aggregate storage model for an application is
non-reversible.
Use the aggregate storage model if the following is true for your database:
• The database is sparse and has many dimensions, or a large hierarchical depth
of members in the dimensions.
• The database is used primarily for read-only purposes; there are few or no data
updates.
• There are no formulas on the outline except in the dimension tagged as Accounts.
• Calculation of the database is frequent and highly aggregational, with no
dependency on calculation scripts.
create application as
Create an application as a copy of another application. Application names are not
case-sensitive.
You cannot copy block storage applications to aggregate storage applications or vice
versa. The copy will always use the same storage as the original. However, you can
convert an outline from a block storage database to an aggregate storage database,
using create outline.
Before you copy an aggregate storage application, you must merge all incremental
data slices into the main database slice. Data in unmerged incremental data slices is
not copied.
comment
Create an application description (optional). The description can contain up to 80
characters.
Example
3-270
Chapter 3
MaxL Statements (Aggregate Storage)
Syntax
• DBS-NAME
• COMMENT-STRING
Use create database to create a database in the following ways:
Keywords
create database
Create a new database. Database names are not case-sensitive.
comment
Create a database description (optional). The description can contain up to 80
characters.
Notes
• You cannot create an aggregate storage database as a copy of another
aggregate storage database. Only one aggregate storage database is allowed per
application.
• You cannot copy a block storage database to an aggregate storage database.
For an example of how to create an aggregate storage application and database
based on a block storage application and database, see Creating an Aggregate
Storage Sample Using MaxL.
3-271
Chapter 3
MaxL Statements (Aggregate Storage)
Example
Creates a database called Basic within the Sample application. If a database named
Basic within the Sample application already exists, it is overwritten.
Syntax
• DBS-NAME
• HOST-NAME
• USER-NAME
• PASSWORD
You can create an outline in the following ways using create outline.
Keywords
create outline...
Create an aggregate-storage cube outline based on a block storage outline. If an
outline of the same name already exists, it is replaced.
3-272
Chapter 3
MaxL Statements (Aggregate Storage)
at HOST-NAME
If the block-storage cube you are using as a source is remote, specify its discovery
URL. For example, "https://myEssbase-myDomain.analytics.us2.example.com/
essbase/agent"
Example
Syntax
TABLSP-NAME
Example
3-273
Chapter 3
MaxL Statements (Aggregate Storage)
Execute Allocation
Allocate one or more given source amounts to a target range of cells in an aggregate
storage database. The source amount can be allocated to the target proportionately to
a given basis, or the source amount can be spread evenly to the target region.
Allocations are typically used in the budgeting process to distribute revenues or costs.
Minimum permission required: Execute.
For more information about allocations and to understand the input parameters, see
Performing Custom Calculations and Allocations on Aggregate Storage Databases.
Syntax
• DBS-NAME
• MDX-SET
• ALLOC-NUMERIC
• MDX-TUPLE
• MDX-MBR
Keywords
pov <mdx-set>
Required. Provide an MDX set defining the context region in which the allocation is
performed.
3-274
Chapter 3
MaxL Statements (Aggregate Storage)
amount <alloc-numeric>
Required. Provide an MDX numeric value expression indicating the amount to be
allocated.
amountcontext <mdx-tuple>
Optional. Provide an MDX tuple with one member from each dimension missing from
pov and amount. This clause is required when amount is an arithmetic expression
and pov does not specify two or more dimensions. It should not be used otherwise.
amounttimespan <mdx-set>
Optional. Provide an MDX set indicating one or more time periods to be considered
for the amount. The amount value is aggregated over the specified time periods, and
the aggregated amount value is allocated. Time periods must be level 0 members in a
Time dimension.
target <mdx-tuple>
Required. Provide an MDX tuple defining the database region where results are
written.
targettimespan <mdx-set>
Optional. Provide an MDX set indicating one or more time periods to be considered
for the target. Time periods must be level 0 members in a Time dimension.
targettimespanoptions
Optional, but required if targettimespan is used.
Select a method for allocating values across the target time span:
• divideamount–Divide the amount evenly across the time periods
• repeatamount–Repeat the amount across the time periods
offset <mdx-tuple>
Optional. If offsetting entries are used, provide an MDX tuple defining the location in
the database where an offsetting value is written for each source amount.
debitmember <mdx-mbr>
Optional. If double-entry accounting is used, provide an MDX member expression
indicating the member to which positive result values are written.
creditmember <mdx-mbr>
Optional. If double-entry accounting is used, provide an MDX member expression
indicating the member to which negative result values are written.
range <mdx-set>
Required. Provide an MDX set indicating the database region in which allocated
values are calculated and written.
excludedrange <mdx-set>
Optional. Provide an MDX set specifying locations in the range where you do not want
allocation values written.
basis <mdx-tuple>
Required in most cases. Provide an MDX tuple that, when combined with the range,
defines the location of basis values that determine how the amount is allocated. The
basis can consist of upper-level or level 0 members.
3-275
Chapter 3
MaxL Statements (Aggregate Storage)
Optional if the allocation method used is spread, and no values are skipped; required
otherwise. Basis must be omitted when the allocation method spread is used without
skip options.
basistimespan <mdx-set>
Optional. Provide an MDX set that indicates one or more time periods to be
considered for the basis. Time periods must be level 0 members in a Time dimension.
basistimespanoptions
Optional, but required if basistimespan is used. Select a method for using the basis
time span:
• splitbasis–Use the basis value for each time period individually
• combinebasis–Use the sum of the basis values across the time periods specified
by basistimespan
share
Optional. Specify to allocate the amount(s) proportionately to the basis values. For
syntax, see Allocation Method Specification in Notes.
spread
Optional. Specify to allocate the amount(s) evenly. For syntax, see Allocation Method
Specification in Notes. You can include one or more of the following skip options when
using spread allocation:
• skip_missing–Skip missing basis values
• skip_zero–Skip zero basis values
• skip_negative–Skip negative basis values
zeroamountoptions
Optional. If omitted, zero or #MISSING amount values are allocated. Otherwise,
specify treatment of amount values that are zero or #MISSING:
• skip_to_next_amount–Skip to the next nonzero, non-#MISSING amount value
• abort–Cancel the entire allocation operation
zerobasisoptions
Optional. For share, this option specifies the action when the sum of all basis values
is zero. For spread, this option specifies the action when all the basis values are
skipped. Select one of the following options:
• skip_to_next_amount–Skip to the next nonzero, non-#MISSING amount value
• abort–Cancel the entire allocation operation
round
Optional. Specify rounding options. The following options are available:
• Round to a specified number of decimal places, using an integer or MDX numeric
value expression. The value must be between 100 and -100, and is truncated if it
is not a whole number.
• Perform rounding, but discard rounding errors
• Add rounding errors to the highest allocated value
3-276
Chapter 3
MaxL Statements (Aggregate Storage)
override|add|subtract values
Optional. Generated allocation values can be added to (or subtracted from) existing
values, instead of overwriting them. Overwriting is the default.
Notes
• The clauses following the with keyword can be entered in any order, each
separated by white space.
• Each clause can only be entered once.
• The pov, amount , target, range, and basis clauses are mandatory; the others
are optional.
• You can specify only stored, level-0 members in all of the clauses except for
amount, amountcontext, basis, and the number of rounding digits; for all other
arguments, do not use upper-level members, attribute members, or dynamic calc
members.
Example
The following statement executes an allocation.
3-277
Chapter 3
MaxL Statements (Aggregate Storage)
Crossjoin({[USD]},
Descendants([Geography],[Geography].Levels(0)))))"
amount "Jan + Feb"
amountcontext "([100], [Beginning Balance], [Actual],
[CostCenter1])"
target "([Allocation], [CostCenter1])"
offset "([Allocation], [CostCenter1], [100], [YearNA])"
debitmember "[Debit]"
creditmember "[Credit]"
range "Crossjoin(Descendants([999], [Department].Levels(0)),
Descendants([Year], [Year].Levels(0)))"
excludedrange "{[9994], [9995], [9996]}"
basis "([SQFT], [Balance], [Actual], [CostCenter2])"
share
zeroamountoptions abort
zerobasisoptions abort
negativebasisoptions zero_value
targettimespanoptions divideamount
round "Currency.CurrentMember.CurrencyPrecision"
errors_to_location "([101], [Jan])"
add values;
Syntax
• DBS-NAME
• FILE-NAME
• MDX-SET
• MDX-TUPLE
• MDX-MBR
You can execute custom calculations with the following options:
3-278
Chapter 3
MaxL Statements (Aggregate Storage)
Keywords
local script_file
Required. Run the specified local calculation script file. Custom calculation scripts
are expressed in MDX. The following is an example of a custom calculation script,
script.txt.
(AccountA,Proj1) := 100;
([AccountB], [Proj1]) := ([AccountB], [Proj1]) * 1.1;
(AccountC,Proj1) :=
((AccountB,Proj1,2007) + (AccountB, Proj1)) / 2;
(AccountA,Proj2) :=
((AccountD,Proj1) +
(AccountB,Proj2)) / 2;
For information about writing custom calculation scripts, see Performing Custom
Calculations and Allocations on Aggregate Storage Databases.
pov <mdx-set>
Required. Provide an MDX set defining the context region in which the calculation is
performed. The calculation script will be executed once for every cross-product in the
POV region.
sourceregion <mdx-set>
Required. Provide an MDX set specifying the region of the cube referred to by the
formulas in the script. At a minimum, the source region should include all members
from the right-hand sides of the assignment statements in the custom calculation
script.
target <mdx-tuple>
Optional. Provide an MDX tuple defining the database region where results are
written. You can use only stored, level-0 members in the tuple; do not use upper-level
members, attribute members, or dynamic calc members.
debitmember <mdx-mbr>
Optional. If double-entry accounting is used, provide an MDX member expression
indicating the member to which positive result values are written. You can specify
only stored, level-0 members; do not use upper-level members, attribute members, or
dynamic calc members.
creditmember <mdx-mbr>
Optional. If double-entry accounting is used, provide an MDX member expression
indicating the member to which negative result values are written. You can specify
only stored, level-0 members; do not use upper-level members, attribute members, or
dynamic calc members.
offset <mdx-tuple>
Optional. If offsetting entries are used, provide an MDX tuple defining the location
in the database where an offsetting value for each source amount is written. You
can use only stored, level-0 members in the tuple; do not use upper-level members,
attribute members, or dynamic calc members.
3-279
Chapter 3
MaxL Statements (Aggregate Storage)
override|add|subtract values
Optional. Generated calculation values can be added to (or subtracted from) existing
values, instead of overwriting them. Overwriting is the default.
Notes
• Each clause can only be entered once.
• The script_file, pov, and sourceregion clauses are mandatory; the others are
optional.
• The optional clauses following the sourceregion specification can be entered in
any order, each separated by white space.
• You can specify only stored, level-0 members on the left side of the assignment
statement in the custom calculation script; do not use upper-level members,
attribute members, or dynamic calc members.
• You can specify only stored, level-0 members in the following clauses:
DebitMember, CreditMember, Target, and Offset.
Example
The following statement executes script.txt referenced above. For a sample use
case, see Performing Custom Calculations and Allocations on Aggregate Storage
Databases.
Syntax
3-280
Chapter 3
MaxL Statements (Aggregate Storage)
• DBS-NAME
• FILE-NAME
On aggregate storage databases, use export data to export in the following ways:
Keywords
Note:
Exporting data does not clear the data from the database.
Notes
• This statement requires the database to be started.
• Exports on aggregate storage databases are limited as follows:
– You can export level-0 data only (level-0 data is the same as input data in
aggregate storage databases).
– You cannot perform upper-level data export on an aggregate storage
database.
3-281
Chapter 3
MaxL Statements (Aggregate Storage)
Example
Example 1
The following example exports all level 0 data from ASOsamp.Sample to an export file.
Example 2
The following example uses a report script, Bottom.rep, to export a subset of sorted
data from ASOsamp.Sample to an output file, Bottom.rpt.
//Bottom.rep
<Sym
<Column (Measures, Years)
<Row (Geography, Products)
<ICHILDREN Geography
<ICHILDREN Products
<Bottom (3, @DataColumn(1))
!
3-282
Chapter 3
MaxL Statements (Aggregate Storage)
Measures Years Time Transaction Type Payment Type Promotions Age Income
Level Stores
Syntax
• DBS-NAME
• FILE-NAME
You can use export query_tracking in the following ways.
Keywords
3-283
Chapter 3
MaxL Statements (Aggregate Storage)
Notes
• To export and import query data, query tracking must be enabled for the aggregate
storage database. Use the alter database (aggregate storage) statement with the
enable query_tracking grammar. Query tracking is disabled by default.
• Do not edit the text file with the exported query data.
Example
See Also
Import Query Tracking (Aggregate Storage)
Syntax
3-284
Chapter 3
MaxL Statements (Aggregate Storage)
• DBS-NAME
• BUFFER-ID
• IMP-FILE
• RULE-FILE-NAME
• FILE-NAME
Use import data in the following ways to load data into an aggregate storage
database:
3-285
Chapter 3
MaxL Statements (Aggregate Storage)
Keywords
In specifying the list of rules files, use a comma-separated string of rules file names
(excluding the .rul extension). The file name for rules files must not exceed eight
bytes and the rules files must reside on Essbase Server.
In initializing a data load buffer for each rules file, Essbase uses the starting data load
buffer ID you specify for the first rules file in the list (for example, ID 100 for rule1) and
increments the ID number by one for each subsequent data load buffer (for example,
ID 101 for rule2).
The ODBC driver you are using must be configured for parallel SQL connections.
3-286
Chapter 3
MaxL Statements (Aggregate Storage)
Note:
Performing multiple SQL data loads in parallel to aggregate storage
databases is different than using the to load_buffer with buffer_id
grammar to load data into a buffer, and then using the from load_buffer
with buffer_id grammar to explicitly commit the buffer contents to the
database.
Notes
• This statement requires that the database is started.
• When using the import statement, you must specify what should happen in case of
an error.
• To import from a SQL data source, you must connect as the relational user name
and use a rules file.
Example
3-287
Chapter 3
MaxL Statements (Aggregate Storage)
Commits the contents of multiple data load buffers (buffer_id 1 and buffer_id 2) to the
ASOsamp.Sample database.
Commits the contents of the specified data load buffer into a new data slice in the
ASOsamp.Sample database.
Replaces the contents of the ASOsamp.Sample database with the contents of the
specified data load buffer.
Replaces the contents of all incremental data slices in the ASOsamp.Sample database
by creating a new data slice with the contents of the specified data load buffer. The
new data is created with the data load property "add values" (aggregate_sum). If there
are duplicate cells between the new data and the primary slice, their values are added
together when you query for them.
See Loading Data Using Buffers.
3-288
Chapter 3
MaxL Statements (Aggregate Storage)
aggregate views after a database refresh or restart, query data can be exported to and
then imported from a text file.
Permission required: Database Manager.
Syntax
• DBS-NAME
• FILE-NAME
You can use import query_tracking in the following ways.
Keywords
Notes
• To export and import query data, query tracking must be enabled for the aggregate
storage database. Use the alter database (aggregate storage) statement with the
enable query_tracking grammar. Query tracking is disabled by default.
• Do not edit the text file with the exported query data.
Example
See Also
Export Query Tracking (Aggregate Storage)
3-289
Chapter 3
MaxL Statements (Aggregate Storage)
Syntax
APP-NAME
Example
The following MaxL statement:
returns the maximum size (in kilobytes) to which the aggregate storage cache may
grow.
The following MaxL statement:
Note:
This statistic may
not be accurate
when parallel
data load or
parallel
calculation
operations are in
use.
Current cache size (KB) The current size of the aggregate storage
cache. See description for current cache
size limit (KB).
Current cache size limit (KB) The maximum size (in kilobytes) to which the
aggregate storage cache may grow.
Page reads since last startup Number of data blocks (pages) read from disk
since the last time the application was started.
3-290
Chapter 3
MaxL Statements (Aggregate Storage)
Syntax
3-291
Chapter 3
MaxL Statements (Aggregate Storage)
• DBS-NAME
• MEMBER-NAME
• ALT-NAME-SINGLE
• VIEW-FILE-NAME
You can query for database information in the following ways using query database:
Keywords
get attribute_info
Get attribute member, dimension, and name information for the specified attribute
member.
get attribute_spec
Display the current attribute specifications for the database. These specifications
include attribute member name format, Attribute Calculation dimension member
names, Boolean and date member names, and numeric range specifications.
get cube_size_info
Display information about input data size, aggregated data size, and number of
queries tracked (when query tracking is enabled).
This statement returns the output listed in the following table:
Column Name Contents
input_data_size_cells Number of input-level cells in the
cube.
input_data_size_bytes Number of bytes used by the input-
level data (approximate).
aggregate_data_size_cells Total number of cells in all aggregate
views in the cube.
aggregate_data_size_bytes Number of bytes used by the
aggregate cells (approximate).
kernel_queries_tracked Number of kernel queries executed
since the last time query tracking was
enabled or query tracking information
was reset.
total_query_cost Total cost of all queries executed
since the last time query tracking
information was reset.
3-292
Chapter 3
MaxL Statements (Aggregate Storage)
0 Dense
1 Sparse
3 None (database is aggregate storage)
0 Add
1 Subtract
2 Multiply
3 Divide
4 Percent
5 NoRollUp
0 SkipNone
16384 SkipMissing
32768 SkipZero
49152 SkipBoth
1 BalFirst
2 BalLast
4 TwoPass
8 Average
64 Expense
3-293
Chapter 3
MaxL Statements (Aggregate Storage)
Variations are possible. The field value consists of one of the first four "skip" values
plus any/all/none of the last five values. Some examples:
0 SkipNone
77 SkipNone, BalFirst, TwoPass, Average, Expense
16385 SkipMissing and BalFirst
The first four "skip" values are base values, and added to them are combinations of 1,
2, 4, 8, and 64.
The status field values are hexadecimal, and translate as follows:
0 Normal
1 Never Share
2 Label
4 Refer Share
8 Refer Share (with different name)
16 Implicit share
32 Virtual Member (stored)
64 Virtual Member (not stored)
2048 Attribute
32768 Referred
3-294
Chapter 3
MaxL Statements (Aggregate Storage)
Note:
This grammar applies to General Ledger cubes, not to non-general-ledger
aggregate storage databases. For normal aggregate storage databases, this
table will be empty.
This MaxL grammar is disabled for previous release Essbase MaxL clients.
3-295
Chapter 3
MaxL Statements (Aggregate Storage)
For a description of the output returned by this statement, see Aggregate Storage
Group ID Information Output.
Note:
Small incremental slices may have fewer aggregate views than the primary
slice (slice number 0). Incremental slices with less than 100,000 cells will
never have any aggregate views built. However, if an incremental slice is
larger than 100,000 cells and it is larger than the primary slice, then it will
always have the same aggregate views as the primary slice.
This MaxL grammar is disabled for previous release Essbase MaxL clients.
3-296
Chapter 3
MaxL Statements (Aggregate Storage)
For a description of the output returned by this statement, see Aggregate Storage
Slice Information Output.
Note:
This grammar applies to General Ledger cubes, not to non-general-ledger
aggregate storage databases. For normal aggregate storage databases, this
table will be empty.
This MaxL grammar is disabled for previous release Essbase MaxL clients.
3-297
Chapter 3
MaxL Statements (Aggregate Storage)
For a description of the output returned by this statement, see Aggregate Storage
Uncommitted Transaction Information Output.
3-298
Chapter 3
MaxL Statements (Aggregate Storage)
list alias_table
Get a list of alias tables that are defined for the database.
list existing_views
Display information about all aggregate views. An aggregate view is a collection of
aggregate cells based on the levels of the members within each dimension.
The optional based on query_data clause causes the returned query cost
information to be based on the collected cost of actual user queries. If this clause
is not used, the default assumption is that all possible queries happen with the same
probability.
To use the based on query_data clause, query tracking must first be enabled. To
enable query tracking, use alter database <dbs-name> enable query tracking.
3-299
Chapter 3
MaxL Statements (Aggregate Storage)
list load_buffers
Display a list and description of the data load buffers that exist on an aggregate
storage database. See Using Aggregate Storage Data Load Buffers.
list aso_level_info
Display the aggregation level count for each real dimension in the outline.
Aggregation level count is the total number of aggregation levels in a real dimension
(including associated attribute dimensions) that exist on an aggregate storage
database.
Example
Display a list and description of the data load buffers that exist on ASOsamp.Sample.
3-300
Chapter 3
MaxL Statements (Aggregate Storage)
Table 3-24 (Cont.) Outline Paging Dimension Statistics MaxL Output Columns
parameter value
+-------------------------------------------+--------------------
Dimension [Year] has [3] levels, bits used 4
Dimension [Measures] has [1] levels, bits 4
Dimension [Product] has [3] levels, bits u 5
Dimension [Market] has [3] levels, bits us 5
Dimension [Scenario] has [1] levels, bits 2
...
3-301
Chapter 3
MaxL Statements (Aggregate Storage)
Each key corresponds to a numeric value in the database. The number of bits
each dimension uses in the dimensional key is shown in the value column for each
dimension.
The number of bits used in each key may amount to less than the bytes needed for
physical storage of the key. As an example where this knowledge might be useful,
consider a case in which a key is using 65 bits. If you can reduce the key length
by one bit to 64, then you can have the key length be 8 bytes instead of 16, an
improvement which reduces the overall size of the database. Another use for these
statistics might be to examine them to see how much you gain from removing any
particular dimension.
parameter value
+-----------------------------------+----------------------
...
Max. key length (bits) 20
Max. key length (bytes) 8
Number of input-level cells 0
Number of incremental data slices 0
Number of incremental input cells 0
Number of aggregate views 0
Number of aggregate cells 0
Number of incremental aggregate cells 0
Cost of querying incr. data (ratio to total cost) 0
Input-level data size (KB) 0
Aggregate data size (KB) 0
3-302
Chapter 3
MaxL Statements (Aggregate Storage)
3-303
Chapter 3
MaxL Use Cases
login $1 $2;
spool on to 'maxl_log.txt';
3-304
Chapter 3
MaxL Use Cases
spool off;
logout;
3-305
Chapter 3
MaxL Use Cases
You can query the database for a list and description of the data load buffers that exist
on an aggregate storage database. See Using Aggregate Storage Data Load Buffers.
Examples:
• Example: Load Multiple Data Sources into a Single Data Load Buffer
• Example: Perform Multiple Data Loads in Parallel
Example: Load Multiple Data Sources into a Single Data Load Buffer
Assume there are three data files that need to be imported. With aggregate storage
databases, data loads are most efficient when all data files are loaded using one
import operation. Therefore, load buffers are useful when loading more than one data
file.
1. Use Alter Database (Aggregate Storage) to create a load buffer.
2. Load data into the buffer, using the Import Data (Aggregate Storage) statement.
3-306
Chapter 3
MaxL Use Cases
2. Simultaneously, in another MaxL Shell session, load data into a buffer with an ID
of 2:
3. When the data is fully loaded into the data load buffers, use one MaxL statement
to commit the contents of both buffers into the database by using a comma
separated list of buffer IDs:
This statement returns the following information about each existing data load buffer:
Field Description
buffer_id ID of a data load buffer (a number between 1
and 4294967296).
3-307
Chapter 3
MaxL Use Cases
Field Description
internal A Boolean that specifies whether the data
load buffer was created internally by Essbase
(TRUE) or by a user (FALSE).
active A Boolean that specifies whether the data
load buffer is currently in use by a data load
operation.
resource_usage The percentage (a number between .01 and
1.0 inclusive) of the aggregate storage cache
that the data load buffer is allowed to use.
aggregation method One of the methods used to combine multiple
values for the same cell within the buffer:
• AGGREGATE_SUM: Add values when the
buffer contains multiple values for the
same cell.
• AGGREGATE_USE_LAST: Combine
duplicate cells by using the value of the
cell that was loaded last into the load
buffer.
ignore_missings A Boolean that specifies whether to ignore #MI
values in the incoming data stream.
ignore_zeros A Boolean that specifies whether to ignore
zeros in the incoming data stream.
In the second attempt, the force keyword allows the invalid source partition to be
dropped:
3-308
Chapter 3
MaxL Use Cases
Note:
The force keyword only works to drop a partition definition when the source
half of the partition definition remains valid. In other words, if the source
database is deleted, the partition cannot be dropped from the dangling
target.
Metadata Filtering
Related MaxL statements: create filter, alter filter.
Metadata filtering provides an additional layer of security in addition to data filtering.
With metadata filtering, an administrator can remove outline members from a user's
view, providing access only to those members that are of interest to the user.
When a filter is used to apply MetaRead permission on a member,
1. Data for all ancestors of that member are hidden from the filter user’s view.
2. Data and metadata (member names) for all siblings of that member are hidden
from the filter user’s view.
Example
The following report script for Sample.Basic:
//Meta02.rep
<ROW (Market)
<ICHILDREN West
!
3-309
Chapter 3
MaxL Use Cases
In the first row, applying MetaRead to California has the effect of allowing access to
California but blocking access to its ancestors. Therefore, the MetaRead access to
West is ignored; users who are assigned this filter will have no access to West.
If you wish to assign MetaRead access to West as well as California, then the
appropriate method is to combine them into one row:
3-310
Chapter 3
MaxL Use Cases
Examples of Triggers
Related MaxL statements: alter trigger, create trigger, display trigger, drop trigger.
The following examples are based on the Sample.Basic database.
Note:
You cannot define a trigger that requires data from Dynamic Calc members
or members from another partition.
3-311
Chapter 3
MaxL Use Cases
)
When
Year.Jan > 20 and is(Year.currentmember, Jan)
then spool Trigger_Jan_Sales_20
When
Year.Feb > 20 and is(Year.currentmember, Feb)
then spool Trigger_Feb_Sales_20
When
Year.Mar > 20 and is(Year.currentmember, Mar)
then spool Trigger_Mar_Sales_20
end;
3-312