Ok guys,
spent my weekend on learning sed.
heres what i hv cooked up, just for fun
a shell script to get all ora errors into a SDF format, which can be
uploaded into a table using sql*loader.
issues faced and asking for answers
* how to insert a new-line. so broke the sed into next line to insert the
new line char.
* typeset was not working with /bin/ksh (maybe not ksh93), so used
/usr/dt/bin/dtksh
* how to install ksh93 on release 5.7 ?
* what are the licensing issues related to installing ksh93
* why dont i hv ksh93? why why why? :)
* its very sloooowwwww
script starts here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#/usr/dt/bin/dtksh
tmpfile=/tmp/err$$ #temporary file
errfile=err.dat #error data file
typeset -Z5 count #fixed width var
count=1
typeset -L256 errm errcause erraction #fixed width var
while [ count -ne 20001 ]
do
var=`oerr ora $count`
if [ -n "$var" ]
then
echo $var | sed 's/\/\/ \*Cause: /\
/;s/\/\/ \*Action:/\
/;s/ \/\/ / /g' >$tmpfile #remove "*Cause" "*Action" "//" and add
newline instead
errm=`sed -n 1p $tmpfile`
errcause=`sed -n 2p $tmpfile`
erraction=`sed -n 3p $tmpfile`
echo "$errm""$errcause""$erraction" >>$errfile
fi
count=`expr $count + 1`
done
<<<<<<<<<<<<<<<<<<<<<<<secript ends here
is there any oracle site where i can dump this script for everybody's use?
-Mandar
> > ____________________Reply Separator____________________
> > Author: "kaushikdas" <[EMAIL PROTECTED]>
> > Date: 3/21/2001 11:35 PM
> >
> >
> >
> > Hello I am Kaushik Das from india .I am new to your group.
> > I had a query ,i hope some one will reply to this mail.
> >
> > Just like we can store help of sql commands in HELP table in
> > oracle database.In a semilar way can we store ORACLE errors
> > in database
> >
> > for example to see oracle error 0000 in unix we write
> oerr ora 0000
> >
> > 1)what command should we write in nt to see the complete
> info of this
> > error.
> >
> > 2) How to store and retrive complete oracle error messages in oracle
> > database.
> >
> > 3) is there any sql file which dba should run to create such
> > table and toad
> > data.
> >
> > Thanks in advance.
> >
> > regards
> >
> > kaushik
> >
> >
> >
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mandar Ghosalkar
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).