| 123456789101112131415161718192021 |
- #!/bin/ksh
- function is_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`
- }
- is_guarded
- 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
|