PBCSPLANNING

Going deeper in EPM Automate

Going deeper in EPM Automate

If you use Oracle PBCS (or FCCS) instances, you can use EPM Automate tool to restart your application using Windows command: EpmAutomate.

You can also go forward on the functions and use a batch file! Which is much easier to understand and use…

 

Why and What?

First, why a batch file is easier than command prompts?
It’s a text file that can be enhanced with comments, saved on your local drive and executed whenever you want (no need to be connected to Web application) and you may schedule its execution.
Furthermore, you can use all the “.bat” files facilities to improve your experience (many tutorials on the Internet).

Second, which actions can be processed is this batch?
Either audit functions or set up ones for your application! And thanks to the batch utilities, rename and archive the logs and backup files.

Here is the list of commands by application type:

https://docs.oracle.com/en/cloud/saas/enterprise-performance-management-common/cepma/epm_automate_commands_at_glance.html

 

How to proceed?

Needs:
– Install NotePad++ freeware (or use Notepad standard): https://notepad-plus-plus.org/downloads
– Install EpmAutomate: Previous post on EPM Automate
– Get a Login and Password (as Admin if possible) to an Oracle PBCS environment (DEV for your first try…)

First step: Encrypt your password for further uses.
Copy and paste the following text (6 lines) in NotePad++:

@echo off
set /p Password_Prompted="Enter your Password: "
set Password_File=C:\Users\WindowsUserName\Desktop\PASSWORD_FILE.epw
call epmautomate encrypt %Password_Prompted% KEY %Password_File%
pause
exit /b

 

This file will allow you to preserve high level security thanks to your password encryption in a dedicated file with your specific key.
This step has to be done each time your password expires (every 3 months, according to Oracle security policy).

Here are the 2 arguments to be used:
– “WindowsUserName” (line 3) is your Windows username on your computer,
– “KEY” (line 4) is the private key to encrypt the password (at least one digit, space not allowed),

Save the file as “Encrypt_Password.bat” on your desktop.
In the end, double-click on this file.

Your password will be required:

Write your password and press enter on your keyboard:

The encryption of your password is now completed.
Press any key on your keyboard to close the batch window.

Second step: Use the restart function in a batch file.
Copy and paste the following text (8 lines) in NotePad++:

@echo off
set Password_File=C:\Users\WindowsUserName\Desktop\PASSWORD_FILE.epw
call epmautomate login user %Password_File% url domain
call epmautomate resetService "Users experience unacceptably slow connections"
call epmautomate logout
echo Restart Task Completed successfully
pause
exit /b

This file will allow you to restart the application service preserving high level security.
Indeed, if your password was not encrypted, it would appear in this file!

Here are the 4 arguments to be used:
– “WindowsUserName” (line 2) is your Windows username on your computer,
– “user” (line 3) is your connection mail address to PBCS environment,
– ”url” (line 3) is the weblink to connect to the same PBCS environment (example: https://planning-test-a123456.pbcs.em2.oraclecloud.com)
– “domain” (line 3) [not mandatory but recommended] is the domain ID in the URL (in our example: a123456)

Save the file as “Restart_DEV.bat” on your desktop.
In the end, double-click on this file (ensure you’re the only one connected before restarting).

The connection is done:

A confirmation for restart is required:

Type “yes” and press “Enter” on your keyboard; restart for DEV is launched!

When completed, the sixth (6th) line of your file is displayed:

Press any key on your keyboard to close the batch window.

You don’t want the confirmation request and force the restart? Add “-f” at the end of the fourth (4th) line:

call epmautomate resetService "Users experience unacceptably slow connections"  -f

Save the file and re-execute it (ensure you’re the only one connected before restarting).
You launched another restart of service without confirmation required!

You may change the comment between quotations marks as “Daily restart” if needed.

You’ll find PBCS functions and their arguments in:
https://docs.oracle.com/en/cloud/saas/enterprise-performance-management-common/cepma/epm_automate_command_links_pbcs.html

Most used: Refresh cube, launch Business Rule or Data Load Rule, get or set substitution variables, download file or data, have an audit of users’ connections, manage structure and security (you need to be Domain Admin in this last case)…

You need to schedule this task on regular basis (day, week, month)? Use the Windows integrated “Task Scheduler” tool:

 

What has already been done?

For a customer, NEONN set up the following daily process:

  1. Upgrade of EPM Automate
  2. Restart (forced)
  3. Launch of Data Management DLR and Report
  4. Launch of Business Rule
  5. Current Substitution Variables extraction
  6. Launch of User Audit Report
  7. Download of User Audit Report on local drive
  8. Set Admin mode
  9. Launch of cubes restructuration
  10. Launch of cube refresh
  11. Repeat/Refresh the Snapshot
  12. Remove Admin mode
  13. Rename of Snapshot adding current date
  14. Move of renamed Snapshot of the day from PROD and pasting it to DEV
  15. Current Prod and DEV Snapshots downloaded on local drive
  16. Current Prod and DEV Snapshots moved in dedicated folder and TimeStamped
  17. Creation of a log file (with elapsed time for each actions)
  18. Download Log file in a dedicated folder and timestamped

 

Contact us!

You want to know more about batch abilities?
Epm Automate functions and arguments?
Tasks scheduling?
Any question on this post?
Feel free to contact us!

Previous article Change HFM rules without disconnecting users

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Comment

Your data will be safe! Your e-mail address will not be published. Also other data will not be shared with third person. Required fields marked as *

4 × 2 =