Sponsored Content
Top Forums UNIX for Advanced & Expert Users grep all ORA errors except one ORA error Post 302471288 by durden_tyler on Friday 12th of November 2010 12:50:28 PM
Old 11-12-2010
Or you could use a Perl regular expression with negative lookahead assertion, as shown below with ctsgnb's test file -

Code:
$
$
$ cat alert.log
blablablablabalbala
ORA-01555 blablablabla
blablablablabalbala
ORA-01653 blablablabla
blablablablabalbala
ORA-01234 blablablabla
ORA-09430215 blablablabla
ORA-01653 blablablabla
blablablablabalbala
blablablablabalbala
blablablablabalbala
ORA-09415 blablablabla
$
$
$ perl -lne '/^ORA-(?!01653)/ && print' alert.log
ORA-01555 blablablabla
ORA-01234 blablablabla
ORA-09430215 blablablabla
ORA-09415 blablablabla
$
$

tyler_durden
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get ORA errors in alertlog file using shell script.

Hi, Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script. Thanks (3 Replies)
Discussion started by: suman_dba1
3 Replies

2. Solaris

maxuprc and maxusers - ORA-27300, ORA-27301, ORA-27302

Hi all, Am intermittently getting the following errors on one of my databases. Errors in file /oracle/HRD/saptrace/background/hrd_psp0_13943.trc: ORA-27300: OS system dependent operation:fork failed with status: 12 ORA-27301: OS failure message: Not enough space ORA-27302:... (1 Reply)
Discussion started by: newbie_01
1 Replies

3. HP-UX

ORA-27300 error because of hp ux

Dear All, i am not able to start the 9i oracle database because of the following problems. I log in into unix and then into sqlplus export oracle_sid=SATEST startup nomount i am getting the following errors ORA-27300: OS system dependent operation:semget failed with... (3 Replies)
Discussion started by: alokpattar
3 Replies

4. Shell Programming and Scripting

Shell script to capture ORA errors from Alert Log

Hi, as the title says, I am after a simple script, which will open the Alert log from an 11.2.0.1 Linux environment and mail the error message and description to a recipient email address. I can then schedule this job via cron and let it run every 15 minutes. I have searched online... (16 Replies)
Discussion started by: jnrpeardba
16 Replies

5. HP-UX

ORA-06512 Error in Oracle 10g

HI All , I am using oracle 10g and HP AIX . I am getting the below error while running the package. ORA-29280: invalid directory path ORA-06512: at "SYS.UTL_FILE", line 41 ORA-06512: at "SYS.UTL_FILE", line 478 ORA-06512: at "DW_APP.PKG_ASS_FVC", line 595 ORA-06512: at line 2 ... (4 Replies)
Discussion started by: Perlbaby
4 Replies

6. Shell Programming and Scripting

How to turn off ora errors in shell script?

I have a shell script which select total count from a table and use its value in a if condition like below connect_string="username/password@tnsname" tot=`sqlplus -s $connect_string << EOF set echo off set feedback off set head off select count(*) from test_table; EOF ` if then echo... (2 Replies)
Discussion started by: vel4ever
2 Replies

7. Shell Programming and Scripting

Extracting Sysdate-1 ORA Errors - Can you help me in this UNIX Script?

Hi Guys, I wanted to create an Unix Shell Script that should fetch a particular string from a text file on a particular date. We all know Oracle generates alert logs for each and every day for every actions in the database. I have an alert log file now where it contains for about a months... (4 Replies)
Discussion started by: raja_dba
4 Replies

8. Shell Programming and Scripting

Shell script to capture Current day ORA errors from Alert Log

Please provide Shell script to capture ORA errors from Alert Log for a given date or Current date. -Veera (1 Reply)
Discussion started by: Veera_V
1 Replies

9. Shell Programming and Scripting

Check for “errors” or “ORA-”

I want to check for "errors" or "ORA-" in Y.if there is an error then exit Y=`sqlplus -s user/passwd<< EOF exec test_Proc; exit; EOF` if ; then exit 1 fi but this doesnt work (6 Replies)
Discussion started by: haadiya
6 Replies

10. Red Hat

Ora-27603:ora-27626:

Hi, User claim that job is running slow from their end. I DBA found in database the below errors in alert log file. ORA-27603: Cell storage I/O error, I/O failed on disk o/192.168.10.3/RECO_DM01_CD_01_drm01 at offset 13335789568 for data length 1048576 ORA-27626: Exadata error: 2201 (IO... (2 Replies)
Discussion started by: Maddy123
2 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci- fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If zgrep is invoked as zegrep or zfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. For example: for sh: GREP=fgrep zgrep string files for csh: (setenv GREP fgrep; zgrep string files) AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), egrep(1), fgrep(1), zdiff(1), zmore(1), znew(1), zforce(1), gzip(1), gzexe(1) ZGREP(1)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy