External jobs execute user/group are different from externaljob.ora set

(Doc ID 2306456.1)

Last updated on SEPTEMBER 22, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.2.0.1 [Release 12.1 to 12.2]
Information in this document applies to any platform.

Symptoms

In externaljob.ora , run_user and run_group are set by nobody,

But External jobs execute user/group are different.

 

$ vi /tmp/test.sh

----

#!/bin/sh

/usr/bin/whoami >> /tmp/exec_user.txt

/usr/bin/groups >> /tmp/exec_group.txt

----

$ cd $ORACLE_HOME/rdbms/admin/

$ cat externaljob.ora

run_user = nobody

run_group = nobody

 

$ sqlplus / as sysdba

SQL> begin

         dbms_scheduler.create_job(

         job_name=>'TEST',

         job_type=>'EXECUTABLE',

         job_action=>'/tmp/test.sh',

         start_date=>SYSDATE,

         repeat_interval=>'sysdate+1/1440',

         enabled=>TRUE);

  end;

/

SQL> commit;

SQL> col job_name for a30

SQL> select job_name,STATE from user_scheduler_jobs where job_name='TEST';

JOB_NAME        STATE

--------------   ----------------

TEST               SCHEDULED

 

$ cat /tmp/exec_group.txt oinstall dba

$ cat /tmp/exec_user.txt oracle

Changes

Designed behavior

http://docs.oracle.com/database/121/ADMIN/schedover.htm#ADMIN-GUID-F739F6E5-7A0D-4B56-87A3-A41615A64B24

  => 28.3.1.2.2 About Local External Jobs

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms