Golden gate v1

 # Loop through setup_ogg files and execute ggsci commands

for value in $(locate setup_ogg); do

  source $value


  # Extract Oracle GoldenGate home

  GG_HOME=$(dirname "$value")


  # Change to Oracle GoldenGate home

  cd $GG_HOME


  # Get information about all processes (including ABENDED)

  all_processes=$(./ggsci -S <<EOF

  INFO ALL

  EOF

  )


  # Check for ABENDED processes

  abended_processes=$(echo "$all_processes" | grep ABENDED)


  # Display information about all processes

  echo "All Processes in $GG_HOME:"

  echo "$all_processes"


  # Check for and report ABENDED processes

  if [ -z "$abended_processes" ]; then

    echo "No ABENDED processes found for $GG_HOME."

  else

    echo "The following processes are ABENDED for $GG_HOME:"

    echo "$abended_processes"

    echo "Manual Intervention is needed for the process"

  fi


  # Stopping running processes (excluding ABENDED)

  ./ggsci -S <<EOF

  STOP EXTRACT *

  STOP REPLICAT *

  EOF


done

Comments

Popular posts from this blog

SQL Loader V3

Db Unix

Standby redo log add