read only tablespace backup restore

xsb發表於2008-03-06
HP UX,Oracle10g 10.2.0.3,RAC,ASM[@more@]

alter tablespace ro_2006_ts read only;

rman target /
run
{
allocate channel c1 type disk;
backup as compressed backupset
(tablespace RO_2006_TS format "/u01/app/oradata/clct_1_arch2/rman2tape/RO_2006_TS_CLCT.RMAN"
);
release channel c1;
}

show all;
CONFIGURE EXCLUDE FOR TABLESPACE RO_2006_TS;

run
{
sql 'alter system archive log current';
allocate channel c1 type disk;
backup full as compressed backupset
(database format "/u01/app/oradata/clct_1_arch2/rman2tape/CLCT_%U.rman"
);
release channel c1;
}

exit

select * from dba_data_files;
alter database datafile ## offline;

export ORACLE_SID=+ASM1
asmcmd
ls
cd clct_data/clct/datafile
rm ro_2006_ts.ora
lsdg
exit

export ORACLE_SID=CLCT1
rman target /
configure exclude for tablespace 'RO_2006_TS' clear;
restore datafile ##;
configure exclude for tablespace 'RO_2006_TS';
exit

alter database datafile ## online;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12402/viewspace-1000493/,如需轉載,請註明出處,否則將追究法律責任。

相關文章