Reputation: 2113
I've defined a DBMS_SCHEDULER job with the logging defined to DBMS_SCHEDULER_LOGGING_OFF, as you can see in the picture:
nevertheless, when I query the DB
SELECT * from USER_SCHEDULER_JOB_RUN_DETAILS ORDER BY LOG_DATE DESC
I got all the Job details
Upvotes: 0
Views: 3221
Reputation: 805
What job class does the job belong to? While you may have defined the job with DBMS_SCHEDULER_LOGGING_OFF, if the logging_level
of the job class that the job belongs to is higher, then Oracle will put precedence on the job class logging_level
over the individual job's logging_level
.
To fix this, you can either: 1. Create a new job class with the desired logging_level
, then re-create the job using that job class, or 2. Change the logging_level
of the existing job class by using DBMS_SCHEDULER.set_attribute
. I would recommend creating a new job class, as changing the existing job class would probably result in undesired results.
To create a new job class with logging off, your code would look something like:
BEGIN
DBMS_SCHEDULER.CREATE_JOB_CLASS (
job_class_name => 'mytestjobclass',
logging_level => DBMS_SCHEDULER.LOGGING_OFF);
END;
If the job already belongs to its own job class and you just want to change the logging level, your code would look something like this:
BEGIN
DBMS_SCHEDULER.SET_ATTRIBUTE (
name => 'mytestjobclass',
attribute => 'logging_level',
value => DBMS_SCHEDULER.LOGGING_OFF);
END;
You can find more info on job classes and logging_level
here: 29.8.2.3 Precedence of Logging Levels in Jobs and Job Classes.
Upvotes: 1