Sponsored Content
Full Discussion: sqlplus -s error capture
Top Forums Shell Programming and Scripting sqlplus -s error capture Post 48393 by w33man on Friday 5th of March 2004 11:11:18 AM
Old 03-05-2004
sqlplus -s error capture

Hi folks a wee problem that requires some help.

I am writing a script that allows me to automate the changing of a password in sqlplus

the problem i encounter is that the code contains a case statement that allows the helpdesk to select whether to allow or deny access by switching the password, this works fine unless you select the password already held in the sql password field

the environment is such that I have to press the enter key three times (because of error messages)

this then throws me out of oracle db and back to my menu

is there anyway I can overcome this so that if there is an error I can return straight to the menu

this is my code
sqlplus -s the_username/${the current password} @set_password ${the new password}
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

error connecting to sqlplus

Hi, I wrote a shell script to call oracle procedure. But when i am trying to connet sqlplus with the fallowing statement It is giving me error " callproce.sh : sqlplus: not found". What could be the problem. sqlplus -s $CONNECT_STRING >$LOGFILE <<!! thank u all papachi (2 Replies)
Discussion started by: papachi
2 Replies

2. Shell Programming and Scripting

SQLPLUS error

I am running a script that invokes SQLPLUS. During the execution I get the following: SQL*Plus: Release 9.2.0.8.0 - Production on Mon Jun 11 16:12:50 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 -... (3 Replies)
Discussion started by: ssmith001
3 Replies

3. Shell Programming and Scripting

sqlplus error output to different error log file

HELLO, I am using such a command to write oracle sqlplus query result to text file: sqlplus -S xxx/xxx@xxxxxxx @\tmp\2.sql>\tmp\123.txt Is it possible to script that: If command succesfull write in \tmp\log.txt: timestamp and "succeded" and create 123.txt with results else If error... (2 Replies)
Discussion started by: tomasba
2 Replies

4. UNIX for Dummies Questions & Answers

Capture Error In SQL Plus

Hi I am trying to fetch the data from Oracle Table More my_query.sql | sqlplus -s 'scott/tiger@OrcaleSID ' | sed 's///g;s///g' > sample_file Now if the table passed in the my_query.sql is wrong or there is some other error insied SQL how i can caputure that i tried More... (1 Reply)
Discussion started by: max_hammer
1 Replies

5. Shell Programming and Scripting

SQLPLUS Error Capturing

This is my .sh file sqlplus -s my_user/my_pswd@mydb @my_sql.sql ret_code=$? if then echo "return code is $ret_code " echo "Failed" else echo "return code is $ret_code " echo "Success" fi ===================================================== and my_sql.sql is whenever... (4 Replies)
Discussion started by: emailsafath2011
4 Replies

6. 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

7. Shell Programming and Scripting

How to capture the error code a use it in error table?

Hello Everyone, I have written a file validation script in unix to compare the data and trigger file.My requirement is if the file validation fails,I need to upate the error details in a table ex:Below is the one of many validation checks i am doing if then echo "Actual count between... (3 Replies)
Discussion started by: karthik adiga
3 Replies

8. Shell Programming and Scripting

UNIX Sqlplus - Capture the sql statement about to run and execution status

Greetings Experts, I am on AIX using ksh. Created a unix script which generates the CREATE OR REPLACE VIEW ... and GRANT .. statements, which are placed in a single .txt file. Now I need to execute the contents in the file (there are around 300 view creation and grant statements) in Oracle and... (4 Replies)
Discussion started by: chill3chee
4 Replies

9. Shell Programming and Scripting

Capture error before pipe

Hi, I have a script that runs a tar command to standard out then pipes to a gzip: tar cfE - * | gzip -c > OUT.gz At the moment, even if the tar fails (e.g. because of lack of disk space), the gzip still runs successfully. Is there a way to make the whole line exit with a non-zero error... (6 Replies)
Discussion started by: Catullus
6 Replies

10. AIX

SQLoader & SQLplus error ?

Hi experts, I have got the following errors when running my sqloader script : Can anyone give me a hand ? ERROR: ORA-12154: TNS:could not resolve the connect identifier specified SP2-0306: Invalid option. Usage: CONN ] where <logon> ::= <username> <proxy> ::= <proxyuser>... (14 Replies)
Discussion started by: Jaewong
14 Replies
PCAP_ACTIVATE(3PCAP)													      PCAP_ACTIVATE(3PCAP)

NAME
pcap_activate - activate a capture handle SYNOPSIS
#include <pcap/pcap.h> int pcap_activate(pcap_t *p); DESCRIPTION
pcap_activate() is used to activate a packet capture handle to look at packets on the network, with the options that were set on the handle being in effect. RETURN VALUE
pcap_activate() returns 0 on success without warnings, PCAP_WARNING_PROMISC_NOTSUP on success on a device that doesn't support promiscuous mode if promiscuous mode was requested, PCAP_WARNING_TSTAMP_TYPE_NOTSUP on success if the time stamp type specified in a previous pcap_set_tstamp_type() call isn't supported by the capture source (the time stamp type is left as the default), PCAP_WARNING on success with any other warning, PCAP_ERROR_ACTIVATED if the handle has already been activated, PCAP_ERROR_NO_SUCH_DEVICE if the capture source specified when the handle was created doesn't exist, PCAP_ERROR_PERM_DENIED if the process doesn't have permission to open the capture source, PCAP_ERROR_PROMISC_PERM_DENIED if the process has permission to open the capture source but doesn't have permission to put it into promiscuous mode, PCAP_ERROR_RFMON_NOTSUP if monitor mode was specified but the capture source doesn't support monitor mode, PCAP_ERROR_IFACE_NOT_UP if the capture source is not up, and PCAP_ERROR if another error occurred. If PCAP_WARNING or PCAP_ERROR is returned, pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display a message describing the warning or error. If PCAP_WARNING_PROMISC_NOTSUP, PCAP_ERROR_NO_SUCH_DEVICE, or PCAP_ERROR_PERM_DENIED is returned, pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display an message giving additional details about the problem that might be useful for debugging the problem if it's unexpected. SEE ALSO
pcap(3PCAP) 5 April 2008 PCAP_ACTIVATE(3PCAP)
All times are GMT -4. The time now is 05:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy