| 12345678910111213141516171819202122232425262728 |
- #!/bin/ksh
- function is_not_guarded
- {
- return `${ORACLE_HOME}/bin/sqlplus -S / "as sysdba" <<-EOF
- set pagesize 0 feedback off verify off heading off termout off echo off
- select count(1) from sys.v\\$archive_dest where status = 'VALID' and target = 'STANDBY';
- EOF`
- }
- if is_not_guarded
- then
- echo "Is NOT Guarded - BACKUP HERE"
- else
- echo "Is Guarded - NO BACKUP HERE"
- fi
- #
- # retval=$?
- # echo "is_guarded returned ---${retval}---"
- # echo "${retval}:$database_role"
- #
- # if [ ${retval} -eq 0 ]; then
- # echo -e "BACKUP HERE"
- # else
- # echo -e "No Backup here......."
- # fi
- #
|