[SunHELP] offtopic ( oracle and "pipe")

TAG DBA dbatag at tatainfotech.com
Mon Feb 11 04:10:36 CST 2002


This is actually a Oracle related query - but maybe Unix gurus can help me with the "pipe" part of my query:

I have a script to compress export files when they are being generated using a "pipe" . The key line in the script is:

PIPEFILE=PIPE.dmp
exp $USERPASS full=y consistent=y buffer=1000000 file=${PIPEFILE} | compress < ${PIPEFILE} > $DMPFILE

I notice that when I give a invalid userid/password... I am prompted for it 3 times. And even after
that the script does not stop - it simply hangs... I need to do a Ctrl+C to stop the script.
This is how it looks : ( I have simply hit ENTER to get the script to go ahead)

-------------------------------------------------------------------
$ test1.sh PLUTO /backups/sfabkp/PLUTO/expdumps system/rakesh1

Export: Release 8.1.5.0.0 - Production on Mon Feb 11 15:38:11 2002
(c) Copyright 1999 Oracle Corporation.  All rights reserved.

EXP-00056: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied
EXP-00222:
System error message 2
Username:

EXP-00056: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied
Username:

EXP-00056: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied
EXP-00222:
System error message 10
EXP-00005: all allowable logon attempts failed
EXP-00000: Export terminated unsuccessfully


** Note - even after 3 failed attempts the "export & pipe" does not stop **
** I have to hit Ctrl C **

^Ctest1.sh[83]: /backups/sfabkp/PLUTO/expdumps/PIPE.dmp: cannot open
-------------------------------------------------------------------

Now my problem is that I am going to schedule this script as a cron job.
If the wrong password is supplied - then during cron execution - the
script will simply hang... And I will get no clue to the problem.
How can I get the line :
exp $USERPASS full=y consistent=y buffer=1000000 file=${PIPEFILE} | compress < ${PIPEFILE} > $DMPFILE
to error out immediately ?

Any ideas will be appreciated...
Thanks and Regards,
~aslam



More information about the SunHELP mailing list