Home
All Oracle Error Codes
Oracle DBA Forum

Frequent Oracle Errors

TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated

Re: Oracle + Unix question , Error validation for SQL statements in co process ?.

Arup Nanda

2004-07-20

Replies:
Try using SQL.SQLCODE instead.

sqlplus /nolog << EOF
connect / as sysdba
whenever sqlerror exit sql.sqlcode
select ddd from dual;
exit
EOF
RC=$?
echo Return Code = $RC

Executing the above script produces

SQL> Connected.
SQL> SQL> select ddd from dual
    *
ERROR at line 1:
ORA-00904: "DDD": invalid identifier


Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit
Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.4.0 - Production
Return Code = 136


\
----- Original Message -----
From: "Ranjeesh K R." <ranjeeshk@(protected)>
To: <undisclosed-recipients:>
Sent: Tuesday, July 20, 2004 12:25 PM
Subject: Oracle + Unix question , Error validation for SQL statements in co
process ?.


> Hi,
> If I use co process in a shell script , what is the best way to do the
error validation of the execution of any sql statements . I was trying to
change the following code to make use of co process concept. When I tried
echo $? after the execution of a "wrong statements"
> it is still giving Zero output ( meaning success)
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> cat ${CFG_DIR}/srs_indx.lst | egrep -v '^#' | egrep -v '^[   ]*$' | while
read x
> do
>
> ..
>
> echo " Processing values :: pre $pre tbl $tbl indx $indx tblspc $tblspc
cols $cols param $param" >> ${LOGS_DIR}/srs_indx.log
>
> sqlplus ${BIZSTG} << EOT >> ${LOGS_DIR}/srs_indx.log
> set verify on timing on term on echo on feedback on serveroutput on
>
> WHENEVER SQLERROR CONTINUE
> drop index $indx;
>
> WHENEVER SQLERROR EXIT FAILURE
> alter session set query_rewrite_enabled = true;
> create $pre index $indx on $tbl ($cols)
> tablespace $tblspc
> $param;
> exit
> EOT
>
>
> RC=$?
> if ( test $RC -ne 0 )
> then
> ERR_MSG="ERROR in creating index $indx for table $tbl from srs_indx.ksh of
$ENVIR : $APP by `whoami`@(protected)` "
> echo $ERR_MSG >> ${LOGS_DIR}/srs_indx.log
> process_warning ${LOGS_DIR}/srs_indx.log
> exitstat=1
> else
> echo "$indx created at `date`" >> ${LOGS_DIR}/srs_indx.log
> fi
>
> done
>
> >>>>>>>>>>>>>>>>>>>>
>
>
> Any help will be appreciated .
>
> with thanks and regards
> Ranjeesh K R
>
>
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request@(protected)
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request@(protected)
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------