Sponsored Content
Full Discussion: sqlplus: not found
Top Forums Shell Programming and Scripting sqlplus: not found Post 302363763 by Davinzy on Wednesday 21st of October 2009 09:44:31 AM
Old 10-21-2009
Error sqlplus: not found

Hi All ,
At the end I have to post my problem thinking I'll be able to get a clue.

I have done a shell script to access a table in our database to extract some logs .
Script is working when executed manually ,but when I set it up in cronjob it is not working. I know thins should be a environment issue but i cant correct it .I red some posts and did some adjustments to the script but still not successful.

My script is -
----------------------------------
Code:
#!/usr/bin/ksh

set -x

#export ORACLE_SID=ictprd
#export ORACLE_BASE=/opt/apps/oracle/product
#export ORACLE_HOME=${ORACLE_BASE}/10204
#export NLS_DATE_FORMAT='DD-MON-YYYY'
#export NLS_DATE_LANGUAGE=AMERICAN
#export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15
#export TNS_ADMIN=${ORACLE_HOME}/network/admin
#export ORACLE_OWNER="oracle"
#export ORACLE_LIB_DIR=lib


mlidd="emailadd@xxx.com"

prvdate=`cat pdate.log`

sdate=`date "+%Y/%m/%d %T"`

echo $sdate > pdate.log

. ${HOME}/.profile

sqlplus -s  yyyyy/dddd@xxx <<EOF

SET HEAD OFF 
SET FEEDBACK OFF
SET ECHO OFF
SET PAGESIZE 10000
SET TERMOUT ON
SET WRAP OFF
SET LINESIZE 500

spool msglg.log

SELECT *****
WHERE time_logged BETWEEN to_date('$prvdate','yyyy/mm/dd hh24:mi:ss') AND to_date('$sdate','yyyy/mm/dd hh24:mi:ss') AND fk_seve <= 8 ;
spool off
exit 
EOF

if [[ -s msglg.log ]] ; then 
cat msglg.log | mailx -s "CRITICAL AND ERROR  MESSAGE" $mlidd 
fi
rm msglg.log
exit

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

when i redirect script output from cron it says "sqlplus not found"

thanks

Last edited by pludi; 10-21-2009 at 10:45 AM.. Reason: code tags please...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies

2. Shell Programming and Scripting

Sqlplus

I am looking to loop round a load of files and execute each in sqlplus, I have looked at the forum to see what was posted in the past, but most of the examples seem to use the sql being passed in through the script, which is not really what I am looking for, can someone tell me if the code below is... (9 Replies)
Discussion started by: LiquidChild
9 Replies

3. HP-UX

sqlplus: command not found

hi, i need bash shell script run on the crontab(Unix tru64). i have write my shell. it's using sqlplus command and connect to oracle db. execute cron job when i have error messege: "sqlplus: command not found" have you any suggestion? (4 Replies)
Discussion started by: Tlg13team
4 Replies

4. Shell Programming and Scripting

sqlplus : not found

Hi, Below is my script: #!/bin/sh sqlplus uname/pwd@instance <<EOF set wrap off set feedback off set pagesize 0 set verify off set trimspool on set linesize 5000 spool /arboru02/FX/scripts/customer_profile_def.txt select... (1 Reply)
Discussion started by: ss_ss
1 Replies

5. Ubuntu

sqlplus: command not found

I installed Oracle 10.2.1.0 in Ubuntu 10.10..my installation was well,i could even open isqlplus( http://ubuntu.ubuntu-domain:5560/isqlplus/workspace.uix ) and execute some queries..But,back in terminal when i try to login to sqlplus i am getting error (20 Replies)
Discussion started by: sandy0594
20 Replies

6. UNIX for Dummies Questions & Answers

SQLPLUS not found

hi, I am new to unix and trying to connect to oracle from unix. I typed the below command and the error is sqlplus not found $ sqlplus -ksh: sqlplus: not found can someone please tell me what is missing? I see that oracle is available on this unix box in the path /opt/oracle as... (7 Replies)
Discussion started by: Vijay81
7 Replies

7. Shell Programming and Scripting

Sqlplus Help

When i run the following script am getiing the output correct but i want to get it in the form of a table, could any one help me please. the script is a s follows count=`sqlplus -s $ORACLE_ACCOUNT << EOF set heading off set wrap on set feedback off column ChangeNumber format a12 column... (9 Replies)
Discussion started by: jhon1257
9 Replies

8. Shell Programming and Scripting

Sqlplus error - sqlplus -s <login/password@dbname> : No such file or directory

i am using bash shell Whenever i declare an array, and then using sqlplus, i am getting sqlplus error and return code 127. IFS="," declare -a Arr=($Variable1); SQLPLUS=sqlplus -s "${DBUSER}"/"${DBPASS}"@"${DBASE} echo "set head off ; " > ${SQLCMD} echo "set PAGESIZE 0 ;" >> ${SQLCMD}... (6 Replies)
Discussion started by: arghadeep adity
6 Replies

9. UNIX for Dummies Questions & Answers

Unable to configure Oracle sqlplus V12 properly. Need Help. Resources could'nt be found elsewhere .

I installed Oracle sqlplus on My Ubuntu 14.04 64bit version as per the instructions on: help.ubuntu page (Unable to post the URL as i'm new user here). I'm totally new to SQL and now i'm learning queries in my college. I installed 64bit version of sqplus and run it executing the command:... (14 Replies)
Discussion started by: arjunmayilvagan
14 Replies

10. UNIX and Linux Applications

Problem on SQLplus command ""bash: sqlplus: command not found""

Hi all, i face an error related to my server ""it's running server"" when i use sqlplus command $ sqlplus bash: sqlplus: command not found the data base is up and running i just need to access the sqlplus to import the dump file as a daily backup. i already check the directory... (4 Replies)
Discussion started by: clerck
4 Replies
VDETAPLIB(1)						      General Commands Manual						      VDETAPLIB(1)

NAME
vdetaplib - Virtual Distributed Ethernet tap emulation library SYNOPSIS
No synopsis DESCRIPTION
vdetaplib is a library that emulates tap (tuntap level2 interface, see in kernel sources Documentation/networking/tun.c) and connects tap virtual interfaces to vde networks. To use it, the libvdetab.so library must be preloaded (sh, ksh or bash syntax): export LD_PRELOAD=/usr/lib/vde2/libvdetap.so (csh, tchs syntax): setenv LD_PRELOAD /usr/lib/vde2/libvdetap.so If you want to divert all tap requests to a single vde_switch set the variable VDEALLTAP to the vde socket. (sh, ksh or bash syntax): export VDEALLTAP=/tmp/vde.ctl (csh, tchs syntax): setenv VDEALLTAP /tmp/vde.ctl It is possible to set each single interface to different vde_switches by setting the environment variable with the same name of the inter- face. (sh, ksh or bash syntax): export tap0=/tmp/vde.ctl export tap1=/tmp/myvde.ctl export ppc=/tmp/ppc.ctl (csh, tchs syntax): setenv tap0 /tmp/vde.ctl setenv tap1 /tmp/myvde.ctl setenv ppc /tmp/ppc.ctl It is also possible to specify port, group or mode for a given interface setting environment variables as in the following example. (sh, ksh or bash syntax): export tap0_port=5 export tap0_group=vde-net export tap0_mode=0660 (csh, tchs, syntax): setenv tap0_port 5 setenv tap0_group vde-net setenv tap0_mode 0660 The variable to set the specific interface is checked first then VDEALLTAP. VDEALLTAP thus works as a default choice for the vde switch to be used. If VDEALLTAP is not set and there is no specific environment variable (and for tun -- IFF_TUN interfaces) the kernel provided interface is used. In this latter case access to /dev/net/tun is required, generally root access. NOTICE
Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik" i.e. the German "Association for Electrical, Electronic & Information Technologies"). SEE ALSO
vde_switch(1), vdeq(1). AUTHOR
VDE is a project by Renzo Davoli <renzo@cs.unibo.it> Virtual Distributed Ethernet December 6, 2006 VDETAPLIB(1)
All times are GMT -4. The time now is 02:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy