Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Linux Script - ORACLE_BASE environment variable is not being sent

frank.anelliaMar 19 2014 — edited Mar 19 2014

Hello,

I've created a Linux script to run a SQL statement and have several variables being passed into the script.  The script executes the SQL statement with no issues but I'm seeing the following message in the log file:

/u01/app/oracle/scripts/insert_asm_disk_usage.sh[8]: .: line 87: dbhome: not found

ORACLE_HOME = [] ? ORACLE_BASE environment variable is not being set since this

information is not available for the current user ID oracle.

You can set ORACLE_BASE manually if it is required.

The script contents are:

#!/bin/ksh

# Declare variables

export ORACLE_SID=$1

export ORACLE_BASE=/u01/app/oracle

BACKUP_MOUNT=$2

export ORAENV_ASK=NO

. /usr/local/bin/oraenv

. $HOME/.env_variables

HOST_NAME=$(hostname -s)

LOG_DIR=/${BACKUP_MOUNT}/logs

umask 022

# Login to SQL Plus and execute the script

sqlplus -s / @$SCRIPT_DIR/insert_asm_disk_usage.sql ${HOST_NAME}

As I mentioned, the script and SQL statement execute without any issues. 

Is there anyway around this message?

Thanks,

Frank

This post has been answered by EdStevens on Mar 19 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2014
Added on Mar 19 2014
8 comments
18,419 views