Wednesday, August 12, 2020

// // Leave a Comment

Automation of 'Maintain Process Tables' System Maintenance Task

In 'FDMEE System Maintenance Tasks' blog series, we have already covered the following topics:

Manual Implementation: 

If you have not already gone through the above articles, I would suggest you read them first to get a comprehensive understanding of all the Hyperion Financial Data Quality Management (FDMEE) System Maintenance Tasks.

  • The demonstrating Hyperion environment has the 'Windows Server 2012 R2 Standard' operating system. 
  • The demonstrating Hyperion environment has 'Oracle database server (18c)' as backend database. 
  • This post has been written and associated activities have been demonstrated on Oracle FDMEE version
  • There is no outage required on the FDMEE application to execute these scripts. But it is advisable not to run any data loads during the activity.
  • Don't forget to take complete FDMEE schema backup before attempting to run these scripts. 
  • Different paths and folder names mentioned in this post may slightly vary for different Hyperion setups but at large it should be the same.
Command syntax of FDMEE batch utility executescript.bat:
executescript <username> <password> "<script name>" "<parameters>" <execution mode>

  • <username>: is your FDMEE user running the script
  • <password>: can be either the hard-coded password or a file with encoded password (-f:filename)
  • <script name>: is the name of the script registered in Script Registration page (not the python script filename). You find the script name here: Navigate-Administer-Data Management-Setup tab-Script Registration
  • <parameters>: are the script parameters in the form "Display Name=Parameter Value"
  • <execution mode>: is either SYNC (synchronous) or ASYNC (asynchronous). SYNC—Process runs immediately and control returns when process completes. ASYNC—When the ODI job is submitted, control returns. The load process continues to execute in ODI
Now the command syntax in the more detailed form will look like below:

executescript <username> <password> "<script name>" "<parameterdisplay1=value1>" "<parameterdisplay2=value2>" <SYNC | ASYNC>

If you are going to use an encrypted password (which is the recommended best practice), following will be the command syntax:

executescript <username> <password | -f:password.txt> "<script name>" "<parameterdisplay1=value1>" "<parameterdisplay2=value2>" <SYNC | ASYNC>

You will find the configuration steps for password encryption in the FDMEE admin guide as shown below:

Automation of 'Maintain Process Tables' System Maintenance Task

You need to ensure that your encrypted password.txt file is placed in the location defined in Navigate-Administer-Data Management-Setup tab-System Settings-Encrypted Password Folder.

Automating 'Maintain Process Tables' System Maintenance Task:
In this post, we will see how to automate 'Maintain Process Tables' System Maintenance Task. I suggest you to first read this post FDMEE: System Maintenance Tasks: Maintain Process Tables for theoretical understanding, manual implementation, and post-execution activities of 'Maintain Process Tables' System Maintenance Task.

When you execute ‘Maintain Process Tables’ purge script manually from Data Management console, it seeks the following input parameter: Days to keep records

To run ‘Maintain Process Tables’ purge script using executescript.bat command-line utility below is the command syntax:

executescript username password "MaintainProcessTables" "Days to keep records=EnterDaysInNumber" SYNC

You need to enter the number of days you want to retain data for, in FDMEE Process tables.

Suppose using FDMEE Admin user, you want to run 'Maintain Process Tables' purge script for 90 days (3 months) i.e. you want to delete all the FDMEE Process details keeping only last 90 days (3 months) details.

In order to achieve the above goal, create a batch script name 'MaintainProcessTable.bat' under folder E:\Admin\scripts having the following content: 

@echo off

REM Set the value for the variables  
set "username=admin"
set "password=YourAdminPassword"
set "DaysToKeepRecords=90"
set "logfile=E:\Admin\scripts\MaintainProcessTable.log"

REM Clear the content of existing logfile
rem.> %logfile%

REM Navigate the executescript.bat utility folder
cd "E:\apps\OracleEPM\Middleware\user_projects\epmsystem_fdm\FinancialDataQuality"

REM Run executescript to perform "MaintainProcessTable" for the mentioned days to keep Records 

> %logfile% (
echo call executescript %username% %password% "MaintainProcessTables" "Days to keep records=%DaysToKeepRecords%" SYNC
call executescript %username% %password% "MaintainProcessTables" "Days to keep records=%DaysToKeepRecords%" SYNC

cd E:\Admin\scripts

Change the paths and variables mentioned in the script as per your requirement and FDMEE application setup.

Now login to your FDMEE server, open an Administrator Command prompt, and run MaintainProcessTable.bat.

After completion of the script your MaintainProcessTable.log will be generated as shown below:

Automation of 'Maintain Process Tables' System Maintenance Task

To verify whether your process ID has successfully completed or not, you can navigate to Process Details page (In Data Management console, click on the Process Details link under the Workflow tab—Monitor—Process Details):

Automation of 'Maintain Process Tables' System Maintenance Task

Click on the 'Show' button against the Process ID to open the corresponding log file to see more details. 

That's all for this post.

I hope this article has helped you.
Your suggestions/feedback are most welcome.
Keep learning and Have a great day!!!


Post a Comment