LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 10: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, 05:13 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Please post the script.
 
Old 03-09-2006, 07: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



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 12:01 PM
I quit Linux for now but will be back krinor1966 General 10 06-07-2004 11:59 AM
Call Back penguin Linux - Networking 0 01-20-2004 03:22 PM
SQLplus command editor under UNIX - how?? stephstellar Programming 5 05-27-2003 08: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 08:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:58 PM.

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
Open Source Consulting | Domain Registration