We have to regularly purge the Oracle Data Integrator (ODI) log files to reduce the size of the ODI work repository and improve the performance of the ODI studio. Before purging we can export the ODI log files and archive them. If we ever want to analyze the log history, we can re-import the logs from archive.
Exporting Log Files manually:
To export log files manually, log into ODI studio, Navigate to Operator tab, click on the ‘Connect Navigator’ icon highlighted below, Click ‘Export’
Select ‘Export the Log’ option and click ‘OK’
In ‘Export the Log’ screen mention the ‘Export to directory’ path, select the desired object type to export, and the export criteria, Click ‘OK’
Purge Log Files manually:
To Purge log files manually, log into ODI studio, Navigate to Operator tab, click on the ‘Connect Navigator’ icon highlighted below, Click ‘Purge Log’
In ‘Purge Log’ screen select the desired object type to be purged, and the purge criteria, Click ‘OK’
Archive and Purge log using ODI utility:
We can archive and purge ODI log using the ‘ODIpurgelog’ utility
To purge all logs older than 10 days, create a variable ‘END_DATE_FOR_PURGE’ and refresh the value in this variable using below query
SELECT SYSTIMESTAMP-10 FROM DUAL
Create a new package, drag and drop ‘ODIpurgelog’ utility from ‘All’ or ‘Utilities’ folder under ‘Toolbox’
Select the ‘ODIpurgelog’ utility in the Package and enter Parameters as below, Log files will be archived to the path mentioned in the ‘Target Directory’ parameter
Save package and generate scenario.
Schedule this scenario to run daily or weekly, or add this scenario as last step to the daily incremental load plan.