Maxl Batch
HiWe are looking to have a script (preferably MaxL) to determine which Apps/DBs are loaded and then (assuming 0 connections) stop them/archive them for backups.In batch, HOW do you capture a list of Apps (or DBs) so you can query their state?
Hi John,
We are moving data from multiple system to other system. And Maxl script will be executed by the end user (business user) by each workstream. So, there will be about 30 workstream we are moving data to different system. So, all data files will be on a central folder. Here is my folder structures
D:\SI\Scripts\ - this is where the main import.bat and import.maxl resides
D:\SI\Data\ - where all the data file resides
D:\SI\CEMA\Scripts\ - this is where CEMA start_import.bat reside. this script calls import.bat that will call .maxl
D:\SI\FDM\Scripts\ - this is where FDM start_import.bat reside. this script calls import.bat that will call .maxl
and so forth...
Similar Messages
-
Verion 9.3.1
It seems that when using "export database" and the database in active use, the export fails. Is this correct?
In the beginning of the script, we use "alter system" to kill request, loggout sessions with force and disable disconnect. It seems that if the database is in active use, these commands fail and the essadmin user (system account) never gets logged off. So users can continue to do things.
This is problematic because if my data export fails, we later do a database restructure (clear data) and load the backup file back. Obviously if the export fails and the database is cleared, we are left with a database with no data. Ouch.
I doubt there is a way in Maxl to put a Planning app in maintenance mode so what are the best approaches? essadmin is the system admin which runs the maxl batch but as users are navigating form and such essadmin makes all the connections to Essbase.
It also seems we could use an iferror to just stop the script if it runs in to any errors.
Thanks,
GregGreg,
You need to push planning application into maintenance mode or stop planning server -- to stop users logging/entering data through forms
If you have single planning app or all apps can go down during nightly process then just stop planning server by calling stopplanning.cmd( not sure about file name)
after you nightly process is done call startplanning.cmd
If you have multiple applications and only a subset of them needs to be under maintenance mode
then you need to change few values in your application Relational repository ( its not recommended by Oracle)
LOGIN_LEVEL='0' - For all Users
LOGIN_LEVEL='2' - For Administrators
you need to change Login_level value to '2' to move app into maintenance mode..
this link will give you a better idea http://www.orahyplabs.com/2011/02/place-planning-under-maintenance-mode.html
just add above mentioned steps based on your requirement
KK -
FDM:Issue with Launching Essbase agg calc cript after FDM load complete
Hi experts ,
I am using a upshell batch to run FDM custom VB script to process 12 months data file which is running fine. All level 0 data is sucessfully loaded into Essbase.
But now the problem is to launch Agg calc scipt in Essbase. I tried 2 options but having following issues:
1-
If i am giving Agg script name in Validation entity and runs the load Up-To-Consolidate then FDM runs that agg script after each month load (ie: 12 times) but i just want to run that agg script after complete 12 months data load from FDM to Essbase.
Is there any way i can set Calc script to run after all data is loaded in Essbase ?
2-
If i call tha Essbase batch (which call MaxL to run the calc script) in AftLoad event script then again script is running 12 times after each load. Can you please suggest if i can modify the VB code with IFcondition here ? (ie: IF period is 12 then call \\Essbase server\***\.Batch) ? If possible please provide the sample code as i am new to VB ?
Please suggest
Thanks a lot !
VivekI guess you are using Batch Loader from your custom script??
Then you could use BatchAction to execute your maxl batch when the batch processing finishes.
In that way you would have only one execution after your 12 period file is processed.
I would suggest having a look to "Batch-Load Single Multiload File (Up To Check) Process" section in the FDM API Guide.
If your file is Multiload file you could also use MultiLoad Action Script.
For example, for multiload action you could say something like:
If Month(objLSItem.PstrTBPer) = 12 Then
That code checks period being processed is December (in case you load from Jan to Dec)
I hope that helps -
How to set set column_width
set column_width 45; doesnt work with maxl shell
when i run this i am getting the following error
parse error near column
i never get this running on any.
I have both essbase 6(windows 2003)and oracle essbase 11.1..1.1(REDHAT EL 5)
help needed.I just tested on 11.1.1.3 and the set Column_width command does not seem to work when you execute from EAS, but if you go into a MaxL batch window it seems to work just fine.
I tried:
Login ID password on localhost;
Set Column_width 100;
Display Application All;
I played with different values for the set statement and each time, changed the width of columns. I know this because when I set it small, I got a lot of truncation messages when larger I didn't and I had a lot more white space (bel in a batch window black space) -
Partitioning BSO to ASO to get around FDM limitations
FDM only currently loads to BSO Essbase cubes. However, one of our FDM-loaded BSO cube is far better suited to being ASO, not least because it has:
- Twelve dimensions.
- A huge "customer" hierarchy (over 40,000 members), which is purely aggregating.
- Most of the other dimensions are also purely aggregating (although there are a few complex calcs on specific members).
The sheer size of the BSO cube outline and the data being loaded results in prohibitive calculation times, so we are looking for a workaround.
Thoughts at present are to create an ASO cube (effectively copying and converting the current outline to ASO using the Wizard), create a replicated partition to transfer data from the BSO to ASO cube (mostly from level-0 members) and to use the BSO cube purely as a data-entry point. Users would then report from the ASO cube, which could be refreshed from the BSO cube when required.
This would then mean that upper-level members and any calculations in the BSO cube are pretty much redundant.
Does anyone agree with, or have any reservations on the above idea? Is there potentially a better method here? Also, could anyone please hazard a guess on how long the replicated partition refresh might take?Is the BSO cube only loaded from FDM / other loads? Or are users entering data? Is it an Essbase or Planning app?
While it is true that there isn't a FDM adapter to load into ASO, you do not have to go from a BSO cube to the ASO cube for the data loads. Just have FDM export to a flat file and load that into ASO using maxl / batch script.
Deanna Sunde
Sr. Director
The Hackett Group -
Using MaxL in batch script to get Essbase database size before proceeding
I have a batch script which dynamically generates some MaxL before passing it to ESSMSH. I would like to insert a command at the beginning of the MaxL script, to get and assess the size of the database before proceeding. If the database is empty I would like the script to quit. This is to prevent the script from exporting data and overwriting the previous export file if the database is empty.
The generated MaxL (modified) is currently as follows. What logic can I add to the MaxL script, to assess the database size and go to the "errorhandler" label if it is empty? Is this even possible?
login %USER% identified by %PASS% on %SERVER%;
iferror "errorhandler";
/* log file */
spool stdout on to '<directory>.log';
iferror "errorhandler";
/* error file */
spool stderr on to '<directory>.err';
iferror "errorhandler";
/* export data */
set timestamp on;
execute calculation %APP%.%DB%.C_Export;
iferror "errorhandler";
/* reset database */
alter database %APP%.%DB% reset data;
iferror "errorhandler";
/* import data */
import database %APP%.%DB% data from server data_file "<filename>.txt" on error abort;
iferror "errorhandler";
/* calculate database */
execute calculation default on %APP%.%DB%;
iferror "errorhandler";
/* error handler */
spool off;
define label "errorhandler";
logout;
exit;Hi Stuart,
Yes I was aware of display database "app"."db"; however this will output a table rather than a specific value. And what logic can I then add to the MaxL script to assess the specific value of "Db Status" and go to the "errorhandler" label if it is empty?
It would seem this needs to be done via a VBScript, to loop through the file rows to find the value before proceeding accordingly. But I was hoping there might be a way to do this within MaxL. -
Substitution variable maxl from batch dynamic
Hi,
I have set up a batch file which is calling .msh file which changes my substitution variables.
I am running this command: "alter database App2.Plan1 set variable 'ActMonth1' 'Jul';"
"alter database App2.Plan1 set variable 'ActMonth2' 'Aug';"
"alter database App2.Plan1 set variable 'ActMonth3' 'Sep';"
I want my values Jul. Aug and Sep to change dynamically. E.g. In Database i will say this forecast starts in Sep so i will get values Sep, Oct, and Nov to my values for ActMonth1, ActMonth2, ActMonth3
Is this possible? Or how can i make it automatically?Hi,
Would it be alright just to pass the values into to maxl script from a batch script.
essmsh var.mxl Jul Aug Sep
Then your maxl script picks up the values e.g
alter database App2.Plan1 set variable 'ActMonth1' $1;
alter database App2.Plan1 set variable 'ActMonth2' $2;
alter database App2.Plan1 set variable 'ActMonth3' $3;
Then you would just change the values being passed into the maxl.
The values being passed in could be generated by some logic in the batch script.
Cheers
John
http://john-goodwin.blogspot.com/ -
Automate start/stop essbase service using Maxl or batch
Hi - how would my batch or Maxl file look like if I wanted to come out with a script to stop and start my essbase service? The reason why i am doing this is because I wanted to stop the essbase service, so that I can archive the essbase.log file.
I am on essbase 7.0, I have read on some postings that stopping and starting the essbase service can potentially corrupt the sec file. If so, then is there any other way of archive the essbase.log file so that it does not grow to megs.
Thanks.Hi,
You could use the following maxl
alter system shudown;
it may be useful to stop all the applications first e.g.
alter system unload application all;
or you can use windows command line
net stop essbaseservicename
and to start
net start essbaseservicename
Another method to backup the essbase.log is to make a copy of the log then use maxl to delete the log.
alter system clear logfile;
Cheers
John
http://john-goodwin.blogspot.com/ -
I have a MaxL script that exports level0 data from various cubes. I have a batch file to call that script at daily intervals.
I want to name the output something different each day (preferably NAMEmmdd type format). I realize I can add a rename or move to the batch but wonder if there is a MaxL method that will allow me to export to a different name?
Current MaxL is simply
export database APP.DB level0 data to data_file "'$Arborpath\am1119.txt'";
Ideas or direction to go to learn answer?
T,
JHi,
You can pass in variables into maxl, so you the calling batch file can pass in a variable which holds the filename with the current day...
For example you have a batch file
essmsh c:\temp\export.mxl 'C:\temp\output%DATE:~3,2%%DATE:~0,2%.txt'
If that was run today it would pass in 'C:\temp\output1118.txt
Now in your maxl you just reference the variable with
export database sample.basic level0 data to data_file $1;
the $1 relates to the variable which was passed in, the 1 being the position it was passed in.
Cheers
John
http://john-goodwin.blogspot.com/ -
Error handling from MAXL into a batch file
Hello all
I need to know how do we pass a value to a batch file from MAXL script if an error occurs.
I have used the following in my MAXL to catch an error.
========================
login username password on server01;
Iferror 'error';
Define Label 'error';
Exit;
=======================
In the batch file I used:
If %errorlevel% NEQ 0 goto catch
:catch
echo an error occurred during MAXL script
Exit
========================
This doesnt give me any error even the login info is wrong in the MAXL script
Please correct if this is wrong and provide any help if possible
Thanks in advanceHere's the error checking code I used in my last not-DOS-but-we-call-it-that script:
REM Call MaxL script with parameters
REM The 2>&1 at the end of the below line merges CMD's STDERR into STDOUT
%hyperion_home%\products\essbase\essbaseclient\bin\essmsh.exe %batAutomation%\%esbAppName%\MaxL\%mshScriptName%.msh %esbUsername% %esbPassword% %esbServer% %esbAppName% %mshScriptName% %batDrive% %batAutomation% >>%log% 2>&1
REM Test for MaxL execution errors
IF NOT %ERRORLEVEL% == 0 (SET errormsg=Error! - MaxL script %mshScriptName%.msh failed with ERRORLEVEL %ERRORLEVEL% & GOTO ERROR)The 2>&1 command at the end of the MaxL script line merges STDOUT and STDERR into an overall log file I used for other processes as well as MaxL. It's great for that purpose, but unfortunately logs the username and password -- this would be overcome by encrypting those values. It was acceptable for the solution so I didn't lose any sleep over it.
Regards,
Cameron Lackpour -
Call Batch file from MAxl Script
Is it possible to call a windows batch file from a maxl script
If you look at the documentaion you will see there is a shell command available
-
Initiating batch scripts from Maxl Script Editor in Admin Console??
Guys,
Is it possible to initiate batch scripts from Maxl script editor in Admin Console.
I dont want to automate the scripts as my data loading process can happen at any time.
Thanks in advance
AHi A,
I'm not sure what you're asking? Do you want to run a batch of Maxl scripts, or a batch file, or a single Maxl Script? Why do you choose to use the Admin console to do this? Could you run what you're trying to run in batch from the command line?
Executing MaxL and MDX Scripts
To execute a MaxL script or an MDX script:
Open or create the script.
From the server drop-down list on the toolbar, select the Analytic Server to execute the script against.
The drop-down list contains only Analytic Servers that are displayed in your Enterprise View. For more information about connections, see Connecting to Analytic Servers in MaxL and MDX Script Editors.
Specify how errors should be handled during execution. See Setting MaxL and MDX Execution Options.
Specify how you want results to be displayed in the Results tab. See Viewing MaxL and MDX Results.
If the script contains variables, specify how undefined variables are resolved during execution. See Resolving Undefined Variables.
To execute the entire script, right-click and select Execute from the pop-up menu.
To execute only part of the script, highlight the statement or statements that you want to execute, right-click, and select Execute from the pop-up menu.
The script executes against the specified Analytic Server, and the results are displayed in the Results panel.Regards,
Robb Salzmann -
Batch/Maxl File to check user session in Essbase and delay batch by 15 m
Hi,
I want to write a maxl file which will check session for any user in Essbase.
If any session is active batch File will be delayed by 15 minutes.
Please let me know how i will achive this. (Syntax will be helpful).
Thanks,
Ajay SinghHi,
Thanks for your reply,I want to know the active users for particular Application.
If any user is active and if I am able to find it using maxl then I have batch file which suppose say runs at 10.00 AM
then that batch file i will delay by 15 min using cmd.
Can you give me maxl and cmd for it.
Thank,
Ajay Singh -
Maxl within Windows Batch File
Hello,
I am trying to schedule an Automatic Essbase Archiving command . Function is to Disable connects , Archive , Unarchive and Enable connects . I know the Maxl commands which perform this action but just wanted to make sure how to portray this within a Windows Batch file.
Within the Batch file , abc.bat can I insert those commands . To enter the shell we need essmsh command , but I didnt wanted to get into decrypting , encrypting the ID etc to do that . So is there a way to get it done within the Windows batch file ?
Thanks !!Yes its Straight forward case ,create a batch file which call the maxl script.The batch file should contain the user id and password of Essbase and the maxl script should contain the parameters of Essbase archiving
The content of batch file for Essbase archiving process
echo off
set ESSUSER=admin
Set ESSPWD=Password
set ESSSERVER=localhost
set ESSAPP=Sample
set ESSDB=Basic
SET ESSBASE SERVER PATH=D:\Hyperion\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer
set MaxlScript=D:\Hyperion\Middleware\user_projects\epmsystem1\Essbaseserver\essbaseserver1\bin
essmsh "D:\Archieve.mxl" %ESSUSER% %ESSPWD% %ESSSERVER%
===================================================================================================
Maxlscript Content for Archieving
spool on to "D:/bck.log";
set timestamp on;
login $ESSUSER $ESSPWD on $ESSSERVER;
display session all;
alter system kill request all;
alter system logout session all force;
export database $essApp.$essDB all data to server data_file 'd:\alldata.txt';
alter database $essApp.$essDB force archive to file "D:/sample.arc";
alter database $essApp.$essDB end archive;
spool off;
logout;
exit;
Similarly can you create batch files for Cube restoration .I hope the above example helps you
Thanks,
Sreekumar Hariharan -
Maxl - read file dynamically Batch
Hi,
I'm on a client currently running Essbase 11.1.2 on Windows. I'm new to the scripting part. I am trying to write a maxl script and batch script to move data to several systems in the environment. I would like to have maxl load the files load dynamically since the files name may change from time to time. Need some guidance on how to do this.
Thanks,
MattHi Matt,
Both Maxl and Batch files (.cmd .bat) accept input variables. In Maxl, if you launch the script myscript.msh:
essmsh myscript.msh myDataFile.txt myRulesFile.rul
then inside the Maxl script, you can capture those two file name passed in above (myDataFile.txt myRulesFile.rul) by using the $1 and $2 variables. in this case $1 would be assigned the value myDataFile.txt, and $2 would be myRulesFile.rul
This is known as "passing in command line arguments".
You can do the same thing with batch files use %1 %2 ...
Passing the changing name files from your batch file is a little trickier, you will need to read the files from the file system to get the new names and pass those to the MaxlScript:
CD C:\Folder\where\my\files\are
for /f %%G in ('dir /s /b /ad') do call :runMaxl %%G
goto :eof
:runMaxl
essmsh myscript.msh %1
pause
Robb Salzmann
Maybe you are looking for
-
"You can download past purchases on this computer with just one Apple ID every 90 days. This computer can be used with a different Apple ID in 63 days." How to handle this situation
-
Can we change file name in the excel report bursting in infoview
Hi, I have created a publication with email destination and excel format in infoview. By default there are some place holders which can be used to give report name during bursting process but I want to customize report name like I want to append stat
-
Preview vs. Quark-generated PDFs (hyperlinks)
MacOSX 10.4.11, Quark 7.31 Any PDF created using Quark's "Export > Layout as PDF" opens in Preview.app, but hyperlinks are scrambled. A few work properly, most go to random destinations, and the rest don't work at all. The same PDF opened in Acrobat
-
Forums : Best practices to FAX the BI publisher reports
What are the best practices to FAX the BI publisher reports in Oracle Applications? Also please let me know the advantages and disadvantages using CUPS printer/RightFax Server. Thanks for your help. Liyakath
-
How to chance the color of the JTree lines ?
Dear friends, how can I change te color of te line in a JTree? I tryied that: UIManager.getDefaults().put("Tree.line", Color.black);but it doesn�t works...