ynixon
January 20, 2010, 6:54am
1
Hi,
How can I use a regular expression that will find only errors of ORA-00600 that does not contain 12333 if the first brackets:
example text:
ORA-02999 : test message, ignore me
ORA-00600: dddd [12345] [12333] [abcdefg] sss
ORA-00600: dddd [12333] [21] [ag] sss sas
ORA-00600: internal error code, arguments: [kcrrrfswda.1], [], [], [], [], []
ORA-00600: internal error code, arguments: [1881], [25860496], [25857716], []
ORA-00600: internal error code, arguments: [723], [27324], [27324], [memory leak], [], [], [], []
ORA-00060: Deadlock detected. More info in file udump/wind_ora_18780.trc
lines that should be found are: 2,4,5,6
currenly I am using:
ORA-0*(600|7445|4[0-9][0-9][0-9])[^0-9]
unfortunately it is "catching" line number 3 ......
thanks
skmdu
January 20, 2010, 7:11am
2
To match the lines with only ORA-00600 errors and which does not contain 12333 in the first brackets.
$grep -v "ORA-00600:[^\[]*\[12333\]"
To match the lines with only ORA-00600 errors and which does not contains 12333 at anywere in a line.
$grep -v "ORA-00600:.*\[12333\]"
ynixon
January 20, 2010, 7:47am
3
I need the Perl / oracle way ... please...
Only regex matters, once you get that use it ( with simple changes if need be ).
18:25:51 : tmp :cat t
ORA-02999 : test message, ignore me
ORA-00600: dddd [12345] [12333] [abcdefg] sss
ORA-00600: dddd [12333] [21] [ag] sss sas
ORA-00600: internal error code, arguments: [kcrrrfswda.1], [], [], [], [], []
ORA-00600: internal error code, arguments: [1881], [25860496], [25857716], []
ORA-00600: internal error code, arguments: [723], [27324], [27324], [memory leak], [], [], [], []
ORA-00060: Deadlock detected. More info in file udump/wind_ora_18780.trc
18:25:52 : tmp :perl t.pl t
ORA-02999 : test message, ignore me
ORA-00600: dddd [12345] [12333] [abcdefg] sss
ORA-00600: internal error code, arguments: [kcrrrfswda.1], [], [], [], [], []
ORA-00600: internal error code, arguments: [1881], [25860496], [25857716], []
ORA-00600: internal error code, arguments: [723], [27324], [27324], [memory leak], [], [], [], []
ORA-00060: Deadlock detected. More info in file udump/wind_ora_18780.trc
18:25:55 : tmp :cat t.pl
while(<>) {
print if ( $_ !~ /ORA-00600:[^\[]*\[12333\]/ );
}
ynixon
January 20, 2010, 9:58am
5
the line contaning ORA-02999 is wrong
---------- Post updated at 05:19 PM ---------- Previous update was at 04:56 PM ----------
the target system to use this is Oracle monitoring system (Grid Control)
so the expression has to be in one line:
I do need ORA-00600 which does not contain 12333
I am practicing here
if it will work here I will be satisfied.
Thanks again
---------- Post updated at 05:58 PM ---------- Previous update was at 05:19 PM ----------
I am almost there:
ORA-0*(600|7445|4[0-9]{3})[^0-9]((?!12345).)*$
but somehow it takes the last line ORA-00060: