пятница, 24 мая 2013 г.

RMAN Compatibility Table

RMAN Compatibility Table
 
Target/Auxiliary Database RMAN client Recovery Catalog Database Recovery Catalog Schema
8.0.6
8.0.6
>=8.1.7
>=8.0.6
8.1.7
8.0.6.1
>=8.1.7
>=8.1.7
8.1.7
8.1.7
>=8.1.7
>=RMAN client
8.1.7.4
8.1.7.4
>=8.1.7
8.1.7.4
8.1.7.4
8.1.7.4
>=8.1.7
>= 9.0.1.4
9.0.1
9.0.1
>=8.1.7
>= RMAN client
9.2.0
>=9.0.1.3 and <= target database executable
>=8.1.7
>= RMAN client
10.1.0
>=9.0.1.3 and <= target database executable
>=9.0.1
>= RMAN client
10.2.0
>=9.0.1.3 and <= target database executable
>=9.0.1
>= RMAN client
11.1.0
>=9.0.1.3 and <= target database executable
>=10.2.0.3
>= RMAN client
11.2.0
>=9.0.1.3 and <= target database executable
>=10.2.0.3
>= RMAN client

Deprecated RMAN Syntax

Deprecated RMAN Syntax
 
Deprecated in Release Deprecated Syntax Preferred Current Syntax
11.2.0
CONFIGURE or SET COMPRESSION ALGORITHM 'ZLIB'
CONFIGURE or SET COMPRESSION ALGORITHM 'MEDIUM'
11.2.0
CONFIGURE or SET COMPRESSION ALGORITHM 'BZIP2'
CONFIGURE or SET COMPRESSION ALGORITHM 'BASIC'
11.2.0
V$FLASH_RECOVERY_AREA_USAGE
V$RECOVERY_AREA_USAGE
11.1.0
CONVERT ON TARGET PLATFORM
CONVERT ON DESTINATION PLATFORM
11.1.0
UNTIL RESTORE POINT
TO RESTORE POINT
11.1.0
BACKUP ... AS STANDBY
n/a
11.1.0
... KEEP [LOGS | NOLOGS]
... KEEP
11.1.0
BLOCKRECOVER
RECOVER
10.0.1
BACKUP ... INCREMENTAL LEVEL [2,3,4]
Levels other than 0 and 1 are deprecated.
10.0.1
BACKUP ... PARMS
CONFIGURE CHANNEL ... PARMS
10.0.1
COPY
BACKUP AS COPY
10.0.1
CREATE CATALOG TABLESPACE
CREATE CATALOG
10.0.1
LIST ... BY BACKUP [SUMMARY]
n/a
10.0.1
LIST ... VERBOSE
n/a
10.0.1
RESTORE ... PARMS
CONFIGURE CHANNEL ... PARMS
10.0.1
SEND ... PARMS
CONFIGURE CHANNEL ... PARMS
9.2
REPLICATE
RESTORE CONTROLFILE FROM ...
9.2
SET AUTOLOCATE
Enabled by default
9.0.1
ALLOCATE CHANNEL FOR DELETE
n/a
9.0.1
ALLOCATE CHANNEL ... TYPE
CONFIGURE CHANNEL ... DEVICE TYPE
9.0.1
ALLOCATE CHANNEL ... KBYTES
CONFIGURE CHANNEL ... MAXPIECESIZE
9.0.1
ALLOCATE CHANNEL ... READRATE
CONFIGURE CHANNEL ... RATE
9.0.1
... ARCHIVELOG ... LOGSEQ
... ARCHIVELOG ... SEQUENCE
9.0.1
BACKUP ... SETSIZE
BACKUP ... MAXSETSIZE
9.0.1
CHANGE ... CROSSCHECK
CROSSCHECK
9.0.1
CHANGE ... DELETE
DELETE
9.0.1
REPORT ... AT LOGSEQ
REPORT ... AT SEQUENCE
9.0.1
SET AUXNAME
CONFIGURE AUXNAME
9.0.1
SET DUPLEX
SET BACKUP COPIES
CONFIGURE BACKUP COPIES
9.0.1
SET LIMIT CHANNEL ...
ALLOCATE CHANNEL ...
CONFIGURE CHANNEL ...
9.0.1
SET SNAPSHOT
CONFIGURE SNAPSHOT
9.0.1
UNTIL LOGSEQ (see untilClause)
UNTIL SEQUENCE (see untilClause)
8.1.7
CONFIGURE COMPATIBLE
n/a
8.1.5
ALLOCATE CHANNEL CLONE
CONFIGURE AUXILIARY CHANNEL
8.1.5
CHANGE ... VALIDATE
CROSSCHECK
8.1.5
CLONE (see RMAN)
AUXILIARY (see RMAN)
8.1.5
CONFIGURE CLONE
CONFIGURE AUXILIARY
8.1.5
MSGLOG (see RMAN)
LOG (see RMAN)
8.1.5
RCVCAT (see RMAN)
CATALOG (see RMAN)


rman backup for recover of copy

$more ~/bin/pkg/rman_backup/body.sh

#!/bin/bash


#
# Check Parameters:
#

# Package Name:
tmp_string="`dirname $0`"
pkg_name="`basename ${tmp_string}`"

if [ "${pkg_name}" = "." ]; then
  tmp_string="`pwd`"
  pkg_name="`basename ${tmp_string}`"
fi

# Check for internal call:
if [ ! $1 = '_run' ]; then
  echo "`date +%Y.%m.%d" "%H:%M:%S` - ${pkg_name}: Error! (Parameter=1) Call `basename $0` from ./_run.sh" >&2
  exit 2
fi


# Check For :
if [ $2 ]
then
  echo " 2=${2} (ORACLE_SID)"
  ORACLE_SID=`echo ${2} | tr "[A-Z]" "[a-z]"`; export ORACLE_SID
else
  echo "`date +%Y.%m.%d" "%H:%M:%S` - ${pkg_name}: Error! (Parameter=2) Call `basename $0` With 2-d parameter" >&2
  exit 2
fi


#
# Define local variables:
#

# Variables:

prefix="${COMPANY_NAME}#${HOST_NAME}(${ORACLE_SID}) ${pkg_name}"
mess_theme="${prefix}:Rman backup"
log_file=${TMP_DIR}/${pkg_name}_${ORACLE_SID}.log


mail_recipients="$MAIL_DBA"
echo $mail_recipients

start_secs=$(/usr/xpg4/bin/awk 'BEGIN{srand();print srand()}')
begin_backup="`date +%Y.%m.%d" "%H:%M:%S`"

sqlplus '/ as sysdba' << EOF > /dev/null
alter database backup controlfile to trace as '$RMAN_BKP/$ORACLE_SID/oradata/ctrl_trace_${ORACLE_SID}' reuse;
create pfile='$RMAN_BKP/$ORACLE_SID/oradata/init${ORACLE_SID}.bkp' from spfile;
exit;
EOF

$UTL_RMAN target / catalog 'rman/pwd@catdb.sun.com'  cmdfile ${BIN_DIR}/_sql/backup.rman  log=${log_file}

finish_secs=$(/usr/xpg4/bin/awk 'BEGIN{srand();print srand()}')
end_backup="`date +%Y.%m.%d" "%H:%M:%S`"

let diff_secs=($finish_secs - $start_secs)

let days=$diff_secs/86400
let remainder=$diff_secs%86400
let hours=$remainder/3600
let remainder=$remainder%3600
let minutes=$remainder/60
let seconds=$remainder%60

size=$(du -sh /u09/backups/oradb/rman/testdb/oradata/ | awk '{print $1}')
echo "Begin backup:     $begin_backup" >> ${log_file}
echo "End backup:       $end_backup" >> ${log_file}
echo "Duration: Days = $days, Hours = $hours, Minutes = $minutes, Seconds = $seconds" >>${log_file}
echo "Size:             $size" >>${log_file}

cat  ${log_file}  | ${BIN_DIR}/_lib/utl_send.sh "${mess_theme}" "${mail_recipients}"
$



$more ~/bin/_sql/backup.rman

# Clear Parameters:
CONFIGURE RETENTION POLICY CLEAR;
CONFIGURE BACKUP OPTIMIZATION CLEAR;
CONFIGURE DEFAULT DEVICE TYPE CLEAR;
CONFIGURE CONTROLFILE AUTOBACKUP CLEAR;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT CLEAR;
CONFIGURE DEVICE TYPE DISK CLEAR;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK CLEAR;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT  CLEAR;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK CLEAR;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT CLEAR;
CONFIGURE ARCHIVELOG DELETION POLICY CLEAR;
CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR;
CONFIGURE CHANNEL DEVICE TYPE SBT CLEAR;
CONFIGURE MAXSETSIZE CLEAR;
CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR;

CONFIGURE ENCRYPTION FOR DATABASE CLEAR;
CONFIGURE ENCRYPTION ALGORITHM CLEAR;
CONFIGURE COMPRESSION ALGORITHM CLEAR;

CONFIGURE DB_UNIQUE_NAME TESTDB_P CLEAR;
CONFIGURE DB_UNIQUE_NAME TESTDB_S CLEAR;


# Configure Parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$RMAN_BKP/$ORACLE_SID/oradata/%d-%F';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '$RMAN_BKP/$ORACLE_SID/oradata/db_%d_%s_%p_%t';
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;

CONFIGURE DB_UNIQUE_NAME TESTDB_P CONNECT IDENTIFIER 'testdb_p.sun.com';
CONFIGURE DB_UNIQUE_NAME TESTDB_S CONNECT IDENTIFIER 'testdb_s.sun.com';

#CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY FOR DB_UNIQUE_NAME TESTDB_P;  # For Catalog Only
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY FOR DB_UNIQUE_NAME TESTDB_S;  # For Catalog Only

show all;

crosscheck backup;
crosscheck copy;
crosscheck archivelog all;
CROSSCHECK BACKUP OF CONTROLFILE;
CROSSCHECK BACKUP OF SPFILE;
delete noprompt expired backup;
delete noprompt expired copy;
delete noprompt expired archivelog all;


run
{
   backup incremental level 1 for recover of copy with tag 'incr_backup_testdb' database;
   recover copy of database with tag 'incr_backup_testdb';
}

run
{
 backup archivelog all not backed up;
}

run
{
 crosscheck backup;
 crosscheck copy;
 delete noprompt expired backup;
 delete noprompt expired copy;
 delete noprompt obsolete;
}

backup current controlfile for standby tag 'standby controlfile';
report schema;
list copy;
list backup;
list backup summary;

$