Skip to Main Content
  • Questions
  • Receiving the error: "Couldn't switch user" while executing a job

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Renato.

Asked: November 04, 2016 - 5:34 pm UTC

Last updated: November 08, 2016 - 10:26 am UTC

Version: Oracle 11g

Viewed 1000+ times

You Asked

Hi Experts,

I have a job under oracle scheduler that executes a chain. This chain has 3 steps: Step 1: executes a stored procedure Step 2: executes a unix shell and Step 3 executes another stored procedure.

The JOB used to work fine but suddenly it stopped to work. Now I'm receiving the error:
STEP2 27370 FAILED STEP_NAME="STEP2", EXTERNAL_LOG_ID="job_1428083_443352", USERNAME="XXXXXX", STANDARD_ERROR="Launching external job failed: Couldn't switch user"


The STEP1 goes well but the STEP2 (shell file) is falling all time. I've been checking the permissions either in OS, database and externaljob.ora and they look OK.

Have you ever faced this before?

Thank you in advance!

Best,
Renato R. Resende

and Chris said...

A couple of things to check:

- Do you have a credential for the external job and, if so, is this correct?

select * from DBA_SCHEDULER_CREDENTIALS;


- Check the permissions and contents of your $ORACLE_HOME/rdbms/admin/externaljob.ora file. This should set the run_user and run_group to nobody:

run_user = nobody
run_group = nobody


This should be owned by root and have the permissions 640.

For further reading, check MOS notes 557153.1 & 979186.1

Rating

  (1 rating)

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

Comments

Renato Resende, November 11, 2016 - 7:08 pm UTC


More to Explore

Security

All of the vital components for a secure database are covered in the Security guide.