Saturday, February 8, 2025

How to select/filter specific lines from the oracle database alert log?

Usually when verifying the alert log entries to troubleshoot any database specific issue, it will take a good amount of time if the alert log is huge like 10MB or 20MB etc.. During such situations, if we know the exact error time, to filter specific lines from alert log, please use below script.
awk '$0 >= "2025-01-19T00:00:00" && $0 <= "2025-01-25T00:00:00" {print $0; getline; print $0}' /u02/app/oracle/diag/rdbms/test1/TEST1/trace/alert_TEST1.log > selected_alert.txt
in the above command, selected_alert.txt contains your required output lines from the alert log.
reference article :
https://ermannkara.wordpress.com/2025/02/06/filter-a-specific-time-range-in-the-alert-log-and-write-the-results-to-a-txt-file/

Bryan's Oracle Blog: Automating cloning of your Exadata Database Servic...

Bryan's Oracle Blog: Automating cloning of your Exadata Database Servic... : One of the questions I often get from customers is  ...