Build Reliable Oracle DRM Batch Automation

Oracle DRM action scripts help administrators automate repeatable master data changes and monitor each batch execution. This guide preserves the working batch example while highlighting the variables, logging, result-code checks, and operational controls needed for a dependable process.

Data Relationship Management is an Oracle offering for financial and analytical master data management across ERP, GL, EPM, BI, and DW solutions. It is a one-stop shop for enterprise-wide change management – providing flexibility and reducing time while ensuring data integrity, consistency, and accuracy. To do so, DRM comes with a Windows command-line utility such that many DRM operations can be automated and scheduled, and errors are monitored with ease.

Start by creating a simple batch script to run the batch client (stored in the DRMDIR mentioned below, by default) along with the configuration file.

DRMAutomation.bat

::Set Variables

SET DRMDIR=E:\Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\client\batch-client

SET SCRIPTDIR=E:\ ConfigFiles

SET ACTSCRDIR= E:\ ActionScripts

SET LOGDIR=E:\ LogFiles\

SET DateTimeString=%date:~4,2%_%date:~7,2%_%date:~10,4%

SET LogName=%LOGDIR%\DRMAutomation_%DateTimeString%.log

::run config file if a new action script exists in the action script directory

if exist %ACTSCRDIR%\ DRMAutomation.csv (call %DRMDIR%\drm-batch-client.exe /cfgfile=%SCRIPTDIR%\DRMAutomation.cfg

ren %ACTSCRDIR%\ DRMAutomation.csv DRMAutomation_%DateTimeString%.csv

move %ACTSCRDIR%\ DRMAutomation_%DateTimeString%.csv %ACTSCRDIR%\Archive\)

::Rename log with timestamp

ren %LOGDIR%\ DRMAutomation.log DRMAutomation_%DateTimeString%.log

exit

Code can be added to the sample script such that the timestamped log is monitored and sends out emails notifications to the administrators if an error occurs.

Further, schedule the batch script to run via the Windows Task Scheduler to make it even more hands off.

The last part of the process is to create the configuration file that will provide the login information, log name and further details about the order of operations and their parameters. The file is divided into named sections (within square brackets) of which the general section is mandatory for all config files and the operations section is crucial when running multiple operations from the config file. The remaining sections are added as required for each operation and have different parameters for each type of operation.

DRMAutomation.cfg

[General]

Operation=Multiple

URL=”net.tcp://localhost:5210/Oracle/Drm/ProcessManager”

LogFileName=”E:\ LogFiles\ DRMAutomation.log”

[Operations]

OperationCount=3

Operation1=BackupCurrentVersion

Operation2=RunActionScript

Operation3=ExportBook

[BackupCurrentVersion]

Operation=BackupVersion

VersionAbbrev=”CURRENT”

Connection=”ServerName”

FileName=”CurrentVersionBackup.txt”

[RunActionScript]

Operation=ActionScript

InFile= LogFileName=”E:\ ActionScripts\ DRMAutomation.csv”

Delimiter=comma

[ExportBook]

Operation=Export

ExportType=Book

BookName=”All_Exports”

CurrentVersionAbbrev=”CURRENT”

Note that the parameters for some operations are named objects that need to be created prior to running these processes. For example, to successfully run the scripts above, the external connection for a backup operation and the export books need to exist in DRM.

For further information about the configuration file commands and parameters, see the Using the Data Relationship Management Batch Client section of the Oracle DRM User Guide.

How Oracle DRM Action Scripts Improve Operations

Run Oracle DRM action scripts with a dedicated service account, protected credentials, and explicit paths for the input file, executable, and log. Test the command interactively before scheduling it, then use the returned error level to separate successful runs, warnings, and failures.

Reliable Oracle DRM action scripts also need traceable logs and predictable file handling. Retain the original action file, timestamp the output, and alert an administrator when the batch client reports a nonzero result. These controls make Oracle DRM action scripts easier to audit and troubleshoot without changing the technical sequence shown below.

Oracle DRM Automation Resources