Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How ever with my current script , I am catching all ERROR, here is my script :ERROR at line 1: ORA-00001: unique constraint (blablablabla) violated
Can someone help? thankspackage Verify; sub chkLogs ( $ ) { my $LogFileNm = shift; open ( logHndl, "$LogFileNm" ) or die ("Failed to open $LogFileNm" +); while(<logHndl>) { # # grep for keyword ERROR or ORA-ERR # push(@errors, grep (/ERROR|ORA-ERR|Fail|Unable/i, $_)); } close(logHndl); if ( $#errors > -1 ) { print "FATAL: ended with the following errors\n"; for( my $idx = 0; $idx < $#errors + 1; $idx ++ ) { print "$errors[$idx]\n"; } exit(10); } } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Don't use SQL*Plus
by Steve_p (Priest) on Apr 16, 2004 at 18:03 UTC | |
by pelagic (Priest) on Apr 16, 2004 at 19:22 UTC | |
by Steve_p (Priest) on Apr 16, 2004 at 20:18 UTC | |
|
Re: greping erros from ORACLE
by matija (Priest) on Apr 16, 2004 at 16:25 UTC | |
by Fletch (Bishop) on Apr 16, 2004 at 16:44 UTC |