Check2
#!/bin/bash export ORACLE_SID=<your_cdb_sid> export ORAENV_ASK=NO . oraenv > /dev/null 2>&1 LOG_DIR=/tmp/post_migration_check mkdir -p "$LOG_DIR" LOGFILE="$LOG_DIR/post_migration_check_$(date +%Y%m%d_%H%M%S).log" exec_sql() { sqlplus -s "/ as sysdba" <<EOF set pages 100 lines 200 feedback off heading on echo off col name for a20 col open_mode for a20 col restricted for a15 col object_type for a20 col object_name for a40 col owner for a20 col comp_name for a35 col status for a15 col wallet_status for a20 col tablespace_name for a30 col encrypted for a10 col activating_pdbname for a25 $1 exit EOF } check_flag() { if grep -iq "$2" <<< "$1"; then echo "$3 : PASSED" | tee -a $LOGFILE else echo "$3 : NOT PASSED" | tee -a $LOGFILE fi } echo "=== Post Migration Certification Checks ===" | tee -a $LOGFILE # ASM SID detection ASM_SID=$(ps -ef | grep pmon | grep ASM | grep...