#!/bin/bash ps -ef | grep ora_pmon_ | grep -v grep | cut -d"_" -f3 | while read line; do export ORACLE_SID=$line rman target / <<EOF CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO COMPRESSED BACKUPSET; backup validate check logical database; blockrecover corruption list; EOF done