hanging sql script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers hanging sql script
# 1  
Old 12-20-2001
Error hanging sql script

Need your help pls...

I have integrated my shell script with sqlplus statements that will fetch necessary data for the rest of the script. As observed, sometimes problems at the oracle database occurs wherein users can not login via sqlplus, so does the script. During execution, the logging of username and password will be rejected and will be asked 3 times before exit. But the script will only login once that is why, the scripts hangs and is unable to continue.

Is there anyway that I can specify so that at logon it will only prompt me once and if error occurs it will exit immediately?

Thanks.
inquirer
# 2  
Old 12-21-2001
I do not know how to suppress the additional connection attempts. On failure to connect, my batch script will hang when coded like this:

sqlplus scott/tiger @ myscript.sql

But if I use a redirected stdin, it will not hang:

sqlplus scott/tiger << endplus
@ myscript.sql
endplus
Jimbo
# 3  
Old 12-26-2001
Question compatibility

i've seen this before...

i'm using bourne shell is it compatible?

for example:

...
sqlplus scott/tiger << endplus
@ myscript.sql
endplus
ls -l
date
... etc.

i mean is this syntax will be compatible if combined with other syntax under bourne shell?

thanks Smilie
inquirer
# 4  
Old 12-26-2001
Sure, once the "endplus" (or whatever name you choose to assign) closes out the sqlplus, the script will continue with the following commands.
Jimbo
# 5  
Old 12-26-2001
Computer thanks

it worked like a charm... thanks
inquirer
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Shell script is hanging up every time even after it's successful

We are using a korn shell script which is meant to trigger a Oracle job to load the data from a flat file to an Oracle database . Also the same script addresses the following tasks also like triggering a SFTP job to pick the file from one path to the target location and checking the same with... (6 Replies)
Discussion started by: senmng
6 Replies

2. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

3. UNIX for Dummies Questions & Answers

Execute PL/SQL function from Unix script (.sql file)

Hi guys, I am new on here, I have a function in oracle that returns a specific value: create or replace PACKAGE BODY "CTC_ASDGET_SCHED" AS FUNCTION FN_ASDSCHEDULE_GET RETURN VARCHAR2 AS BEGIN DECLARE ASDSchedule varchar2(6); ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies

4. Shell Programming and Scripting

Perl Script Hanging

Hey, Does anyone know why my Perl script is hanging when i execute it. print "looking around ...\n"; my ($out, $err, $exit) = $scon->cmd('ls'); print "done"; i get the following error: channel 1: open confirm rwindow 131043 rmax 32768 I'm using use Net::SSH::W32Perl Module.... (4 Replies)
Discussion started by: Phi01
4 Replies

5. Shell Programming and Scripting

script hanging???

ok... this is where i am at... i need a script to call another script as a wrapper because the first script creates a sub-shell. here is what i got... i kick off the first script "CCBDEMO-threadpoolworker.sh" #!/bin/bash clear #clearing screen directory="/data1/spl/cis/CCBDEMO/bin"... (1 Reply)
Discussion started by: Dagaswolf
1 Replies

6. Shell Programming and Scripting

Script is hanging

Hello, I have the following shell script and when i execute, it keeps hanging and nothing happens Please let me know. Requirement is to read data from file and pass it to the sql and create files as shown. code /******** #!/bin/sh while read user.dat do echo "user = $1 email =... (1 Reply)
Discussion started by: rakeshsr12
1 Replies

7. Linux

Script to simulate hanging process

I want to create a script to simulate a process that hangs to test a java application. My java app executes a system command, which can also be executing scripts, etc. Any ideas on such a script? The java code is: Runtime rt = Runtime.getRuntime(); Process p = rt.exec("sh... (4 Replies)
Discussion started by: brendan76
4 Replies

8. UNIX for Dummies Questions & Answers

Help with EXPECT script hanging

I am new at developing EXPECT scripts. I'm trying to create a script that will automatically connect to a UNIX server via FTP and download a log file from the server within a specified server directory on the remote machine. I'm having problems with the EXPECT script "hanging" at the password... (0 Replies)
Discussion started by: markus2008
0 Replies

9. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

Hi- I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment... I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies

10. Shell Programming and Scripting

script hanging - remsh

Greetings to everyone, My Problem: I have a script which inturn calls couple of other scripts in different servers (solaris) to do a server startups on the respecitve boxes. My script ... #!/usr/bin/ksh siebsrvr_root=/users/siebelserver/siebsrvr cd $siebsrvr_root . ./siebenv.sh... (2 Replies)
Discussion started by: vivsiv
2 Replies
Login or Register to Ask a Question