Skip to Main Content
  • Questions
  • How do you purge stdout files generated by DBMS_SCHEDULER jobs?

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, J%C3%B8rn.

Asked: February 20, 2018 - 9:01 am UTC

Last updated: February 21, 2018 - 4:04 pm UTC

Version: 11.2.04

Viewed 1000+ times

You Asked

When running scheduler jobs, logging is provided in USER_SCHEDULER_JOB_LOG and USER_SCHEDULER_JOB_RUN_DETAILS. And stdout is provided in $ORACLE_HOME/scheduler/log. The database log tables are purged either by default 30 days (log_history attribute).

But I have not found any way to purge the stdout files in $ORACLE_HOME/scheduler/log? They survive, even if the log table is purged.

Is it possible to include the generated stdout files in the purge of the scheduler log tables, or do I have to manage the cleanup of files in $ORACLE_HOME/scheduler/log on my own?

We generate about 2.000 files a day, and we never need them.

and Chris said...

You could look into using utl_file.fremove to wipe the files.

But it's easiest to set up a cron job to remove the files.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Up to the point

Jørn Hansen, February 22, 2018 - 9:37 am UTC

Answer was helpful in determining possible means to removed stdout files.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database