Broker and Alert Logs

Version 1

    Broker and Alert logs are a great source of information when trouble shooting Data Guard issues.

     

    If you use Linux you can use a script to make reviewing these logs simpler.

     

    Before using a script like this stop and consider any security concerns you or your organization might have.

    For example server access, access to the software owner etc.

     

    On Oracle 12 the alert log also has X$DBGALERTEXT as another possible option.

     

     

    ----script----

     

     

    #!/bin/bash

     

     

     

    function outputMenu {

    cat > /dev/tty <<DELIM

     

     

     

    =======================================

    ----- Oracle Alert & Broker Logs: ----_

    =======================================

    Execute the following commands by typing the correct number...

     

     

    [1]   Broker Log for Primary

    [2]   Alert Log for Primary

     

     

     

    [191]   Exit Menu

     

     

    Number:

    DELIM

     

    read USERCHOICE

    clear

     

    echo Executing your selected option...

    echo

     

    case $USERCHOICE in

     

    "1") echo "Checking Broker log"

    cd /u01/app/oracle/diag/rdbms/primary/PRIMARY/trace/

    echo ""

    tail -300 drcPRIMARY.log | more

    ;;

     

    "2") echo "Checking Alert log"

    cd /u01/app/oracle/diag/rdbms/primary/PRIMARY/trace/

    echo ""

    tail -500 alert_PRIMARY.log | more

    ;;

     

     

     

    "191") clear; exit 0;;

     

     

    *) echo "Unknown Option $USERCHOICE";;

    esac

    }

     

     

    until [ "1" = "0" ]; do

            clear

     

            outputMenu

     

            echo Press enter to continue...

            read

    done