Professional Documents
Culture Documents
shutdown immediate
startup mount;
alter database arhivelog;
alter database open;
RMAN 备份默认路径
1、FRA 未开启,默认路径==》$ORACLE_HOME/dbs/
2、FRA 已开启,默认路径==》FRA
rman target /
backup database;
. /oravl01/orauser/.profile
export ORACLE_SID=orcl
target='target /'
catalogt=' catalog rman_orcl/Tsmbak2@rman'
# Get the current time for constructing a fairly unique filename in /tmp:
time=`date '+%Y%m%d%H%M'`
run{
allocate channel m1t1 type 'SBT_TAPE' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_orcldb1.opt)';
allocate channel m1t2 type 'SBT_TAPE' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo_orclb1.opt)';
crosscheck backup;
crosscheck archivelog all;
crosscheck backup of archivelog all;
resync catalog;
backup
full
filesperset 40
tag 'full_backup'
format 'fullorcl_%u_%p_%c'
database;
backup
format 'cforcl_%s_%p'
(current controlfile);
backup
filesperset 50
format 'archorcl_%t_%s_%r'
(archivelog until time 'sysdate-3' delete input channel m1t1);
delete noprompt archivelog all backed up 1 times TO DEVICE TYPE 'SBT_TAPE';
run{
allocate channel m1 device type disk;
allocate channel m2 device type disk;
allocate channel m3 device type disk;
allocate channel m4 device type disk;
allocate channel m5 device type disk;
allocate channel m6 device type disk;
allocate channel m7 device type disk;
backup section size 100M database plus archivelog;
release channel m1;
release channel m2;
release channel m3;
release channel m4;
release channel m5;
release channel m6;
release channel m7;
}
_unnest_subquery=TRUE
等价查询改写