Database Administration (MOSC)

MOSC Banner

ORA-27369: job of type EXECUTABLE failed with exit code: 851981

edited May 28, 2019 5:02AM in Database Administration (MOSC) 8 commentsAnswered

Hi all

Have you ever met with exit code 851981 during execution of external procedure ?

I use this example 9on oracle 12.1.2 in aix power 7.1

begin

  dbms_credential.create_credential(

  credential_name   => 'ORACLE_OS_CREDS',

  username          =>  'oracle',

  password          =>  'oracle',

  comments          => 'run scripts using oracle OS account');

end;

/

declare

  l_script   VARCHAR2(32767);

begin

l_script := '#!/bin/bash

export PATH=$PATH:/bin

ls /home/oracle > /home/oracle/test.txt';

DBMS_SCHEDULER.create_job(

job_name     => 'MY_TEST',

job_type     => 'EXTERNAL_SCRIPT',

job_action     => l_script,

credential_name => 'ORACLE_OS_CREDS',

    enabled    => true);

END;

/

Thank You

Brano

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center