My Oracle Support Banner

Sql*Plus Returns Exit Code 0 from Cron Job when the Login Fails (Doc ID 463274.1)

Last updated on MAY 30, 2023

Applies to:

SQL*Plus - Version 9.2.0.6 and later
Information in this document applies to any platform.

Symptoms

Below SQL*Plus script is run from a cron job.

$cat tt.sql

export ORACLE_SID=ORCL
export ORACLE_HOME=/usr/home/10g
sqlplus username/password@connect_string
echo 'status ' $?

When the script is run from the shell prompt, the exit status is 1.

When run as a cron job, the exit status is 0.

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.