Skip to main content

Oracle

Creating Essbase Data Backups with Data & Time Stamps

Creating Essbase Data Backups with Filename Date & Time Stamps

The Situation:

  • Planning 11.1.2.1
  • Client has 1 application with 3 databases

Creating Essbase Data Backups with Data & Time StampsRequirement:

Automate a daily backups of the Essbase data for all three cubes at 7am and 7pm.

Solution:

Used MAXL script to export the data from essbase

Batch file to execute MAXL script and rename the export files with Date & Time stamp

Windows task scheduler to execute the batch file.

MAXL script:

login ‘username‘ ‘password‘ on ‘essbase server name‘;

export database ‘application name‘.’cube1name‘ level0 data to data_file ‘FileLocation\ApplicationName_CubeName’;

For example:

login ‘admin’ ‘welcome1’ on ‘hyp-01.clientname.com’;

Oracle - Guide to Oracle Cloud: 5 Steps to Ensure a Successful Move to the Cloud
Guide to Oracle Cloud: 5 Steps to Ensure a Successful Move to the Cloud

Explore key considerations, integrating the cloud with legacy applications and challenges of current cloud implementations.

Get the Guide

export database ‘Sample’.Basic’ level0 data to data_file ‘E\Backup\Sample_Basic.txt’;

Sample MAXL Script name:  DataExport.mxl

Sample MAXL Script location: E:\Backup

Batch Files:

The batch files are run on the essbase server call the startmaxl.cmd application which may not be located in the same path as the code below shows.  Use the path where the file is located in your environment.  The startmaxl.cmd is followed by the MAXL Script we created above.

After the data is extracted and the files have been created the ren dos command renames the files created by the data export to a file name with the date & time suffic.

Note: The need for two batch files is because the AM time only has 1 digit hour and the pm time stamp has 2.  The AM time stamp will not add a 0 in front of the hour.

AM Batch File Syntax:

Call E:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\startMaxl.cmd E:\Backup\DataExport.mxl username passwordessbaseservername

ren E:\Backup\Sample_Basic Sample_Basic_%date:~4,2%-%date:~7,2%-%date:~10%_%time:~1,1%.%time:~3,2%AM.txt

PM Batch File Syntax:

Call E:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\startMaxl.cmd E:\Backup\DataExport.mxl username passwordessbaseservername

ren E:\Backup\Sample_Basic Sample_Basic_%date:~4,2%-%date:~7,2%-%date:~10%_%TIME:~0,2%-%TIME:~3,2%PM.txt

Result:

At 7am the Sample_Basic data export is created and then renamed to Sample_Basic_12-27-13_7:00AM.txt

At 7pm the Sample_Basic data export is created and then renamed to Sample_Basic_12-27-13_19:00PM.txt

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Jason Kaniss

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram