04-13-2020
You need code tags, your post is hard to read
Start with only the sql, run it from the sqlplus prompt.
Next wrap JUST the sql that ran above in a shell wrapper. Execute it. Use the parameter associated with the problem.
One thing I've seen that causes hangs is the sqlplus gets what it thinks is garbage, usually caused by trying to quote or escape something so the shell will not wreck it, and passing it through the shell script to sqlplus. sqlpus hangs because it is waiting for more input, like to complete the quote for example.
As a first guess consider this is your problem, especially since it is intermittent. Intermittent == parameter problems
It a is a wait on stdin for sqlplus, I believe.
10 More Discussions You Might Find Interesting
1. Programming
Hi,
Iam calling a C program from a Unix shell script. The (C) program reads encrypted username/password from a text file , decrypts and returns the decrypted string.
Is there any way i can return the decrypted string to Unix shell program.
My shell script uses the output of the program to... (11 Replies)
Discussion started by: satguyz
11 Replies
2. Shell Programming and Scripting
I have wrriten a script to call sql script to do some work in database. However, the script couldn't be executed. The only information was: ksh: ./updt_attrib.ksh cannot execute. Please help me to identify where the problem is. I post script here for your reference. Thanks a lot.
#!/bin/ksh
... (8 Replies)
Discussion started by: duke0001
8 Replies
3. Programming
Hi,
I'm having a requirement where I need to call a C program from a shell script and return the value from the C program to shell script.
I refered a thread in this forum. But using that command in the code, it is throwing an error
clear_text_password=$(get_password)
Error: bash:... (24 Replies)
Discussion started by: venkatesh_sasi
24 Replies
4. Shell Programming and Scripting
Hi all, i'm pritty new to chell scripting
I'm trying to find a way to return a value to shell without it executing. is there a special character that will encase a sting including the command to a shell without executing, so waiting for the user to press enter.
say i wanted to return a value... (3 Replies)
Discussion started by: jvan
3 Replies
5. Shell Programming and Scripting
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Discussion started by: praka
6 Replies
6. UNIX for Dummies Questions & Answers
I want to execute a shell script from sqlplus prompt and get its output back to sqlplus. Is this possible?
if yes just give me an example for doing that. (2 Replies)
Discussion started by: boopathyvasagam
2 Replies
7. UNIX for Dummies Questions & Answers
I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies
8. Shell Programming and Scripting
Hi All,
My program flow is as below
Windows batch -- > Cygwin batch --> zsh script
There are multiple Cygwin batch scripts that are called from Windows batch file . But when i am executing the first cygwin batch script the control goes to the zsh file and executes and stoping from... (1 Reply)
Discussion started by: Hypesslearner
1 Replies
9. Shell Programming and Scripting
Hello All,
I have a UNIX script which will prepare anonymous oracle pl/sql block in a temporary file in run time and passes this file to sqlplus as given below.
cat > $v_Input_File 2>>$v_Log << EOF
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 16';
EXECUTE... (1 Reply)
Discussion started by: vikas_trl
1 Replies
10. Shell Programming and Scripting
Hello All,
I have exactly same issue @vikas_trl had in following link:
https://www.unix.com/shell-programming-and-scripting/259854-control-not-returning-sqlplus-calling-unix-shell-script.html
I wonder if he or somebody else could find the issue's cause or the solution.
Any help would... (4 Replies)
Discussion started by: RicardoQ
4 Replies
LEARN ABOUT NETBSD
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
NAME
script -- make typescript of terminal session
SYNOPSIS
script [-adfpqr] [-c command] [file]
DESCRIPTION
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Option:
-a Append the output to file or typescript, retaining the prior contents.
-c command
Run the named command instead of the shell. Useful for capturing the output of a program that behaves differently when associated
with a tty.
-d When playing back a session with the -p flag, don't sleep between records when playing back a timestamped session.
-f Flush output after each write. This is useful for watching the script output in real time.
-p Play back a session recorded with the -r flag in real time.
-q Be quiet, and don't output started and ended lines.
-r Record a session with input, output, and timestamping.
The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
ENVIRONMENT
The following environment variable is used by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism).
HISTORY
The script command appeared in 3.0BSD.
BUGS
script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
BSD
October 17, 2009 BSD