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

what is the format of your logfile? post a sample so that we'd know how is the time stamp present in it.

what you need is something like:

sed -n -e '/start_time/,/end_time/ {/ORA/ p}' logfile

Hi Yogesh,

My timestamp format is "Fri Dec 26 08:26:33 2008"
i need to search for the errors from a particular time to end of the file.

Thanks

This should print all lines with "error" after matching the timestamp:

awk '/Fri Dec 26 08:26:33 2008/{p=1} p && /error/' logfile

Regards