LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2006, 11:12 AM   #1
steve_brown
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
sqlplus call does not come back, want quit command


I am calling a sqlplus script to run from the linux at the command prompt. $ .test.sh

It runs the sql script but does not exit sqlplus as it is waiting for the quit command.

When called from cron thru crontab, all the sql scripts run fine and do not require the quit command to come out of sqlplus.

How do i get around this, or why is this different?
 
Old 03-08-2006, 06:13 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Please post the script.
 
Old 03-09-2006, 08:42 AM   #3
steve_brown
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Original Poster
Rep: Reputation: 0
#!/bin/bash

# CHANGE LOG
# 02-23-05, Steve Brown, created to use for testing batch schedule.
# mm-dd-yy, Name, what and why.

# SET DEFAULT ENVIRONMENT
. $HOME/.bash_profile

# CHANGE TO WORKING DIRECTORY
cd $HOME/scripts

# REMOVE TEMPORARY FILES
rm -f reid_test.out

# START
echo "********** SCHEDULE START **********, $(date +"%D %T")" > reid_test.out
echo "" >> reid_test.out
echo "RUN SHELL 1, start, $(date +"%D %T")" >> reid_test.out
sqlplus -s xxx/xxx @reid_test.sql > reid_test.sql.out
cat reid_test.sql.out >> reid_test.out
echo "RUN SHELL 1, end, $(date +"%D %T")" >> reid_test.out
echo "" >> reid_test.out
echo "" >> reid_test.out
echo "RUN SHELL 2, start, $(date +"%D %T")" >> reid_test.out
. reid_test2.sh
cat reid_test2.out >> reid_test.out
echo "RUN SHELL 2, end, $(date +"%D %T")" >> reid_test.out
echo "" >> reid_test.out
echo "********** SCHEDULE END **********, $(date +"%D %T")" >> reid_test.out

# EMAIL RESULTS
mail -s "BATCH SCHEDULE JOB RESULTS" xyz@xxx.com < reid_test.out
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sqlplus command from script Grassie Coetzee LinuxQuestions.org Member Intro 2 03-13-2005 01:01 PM
I quit Linux for now but will be back krinor1966 General 10 06-07-2004 12:59 PM
Call Back penguin Linux - Networking 0 01-20-2004 04:22 PM
SQLplus command editor under UNIX - how?? stephstellar Programming 5 05-27-2003 09:49 PM
redhat v.7.3 re-install quit B4 finish- cannot get back in2 Windoz or Linux random Linux - Newbie 8 07-04-2002 09:06 PM


All times are GMT -5. The time now is 06:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration