数据库备份:
数据库备份
backup database format '/ccibak/hec/hecdb%U';
备份归档日志
backup archivelog all format '/ccibak/hec/arc%U.bak';
备份控制文件
backup current controlfile format '/ccibak/hec/con%U.bak';
数据库恢复:
恢复控制文件
export ORACLE_SID=hec1
rman target /
startup nomount
restore controlfile from '/ccibak/hec/condc06nl0s_1_1.bak';
alter database mount;
恢复数据文件
run
{
set newname for datafile 1 to '+DATA';
set newname for datafile 2 to '+DATA';
set newname for datafile 3 to '+DATA';
set newname for datafile 4 to '+DATA';
set newname for datafile 5 to '+DATA';
set newname for datafile 6 to '+DATA';
set newname for datafile 7 to '+DATA';
set newname for datafile 8 to '+DATA';
set newname for datafile 9 to '+DATA';
set newname for tempfile 1 to '+DATA';
restore database;
switch datafile all;
switch tempfile all;
}
执行不完全恢复并且启动数据库
recover database until sequence 62090xxxxx thread 1;
alter database open resetlogs;