redhat RMAN:c-1428179207-20160125-00 full 16-1-25 9:34:43 00:00:10 9728 KB 1
run{
allocate channel t1 type ‘SBT_TAPE’
parms ‘ENV=(NSR_SERVER=bob,NSR_CLIENT=redhat)’;
restore spfile to pfile’/home/oracle/oradata/ucm/ucminit.ora’ from ‘c-1428179207-20160125-02’;
release channel t1;
}
create spfile from pfile=’/home/oracle/oradata/ucm/ucm1init.ora’;
执行上一条create语句报错已经存在spfile文件:
SQL> create spfile from pfile=’/oradata/ucm/ucm1init.ora’;
create spfile from pfile=’/oradata/ucm/ucm1init.ora’
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance
run{
allocate channel t1 type ‘SBT_TAPE’
parms ‘ENV=(NSR_SERVER=bob,NSR_CLIENT=redhat)’;
restore controlfile from ‘c-1428179207-20160125-02’;
release channel t1;
}
run{
allocate channel t1 type ‘SBT_TAPE’
parms ‘ENV=(NSR_SERVER=bob,NSR_CLIENT=redhat)’;
allocate channel t2 type ‘SBT_TAPE’
parms ‘ENV=(NSR_SERVER=bob,NSR_CLIENT=redhat)’;
allocate channel t3 type ‘SBT_TAPE’
parms ‘ENV=(NSR_SERVER=bob,NSR_CLIENT=redhat)’;
allocate channel t4 type ‘SBT_TAPE’
parms ‘ENV=(NSR_SERVER=bob,NSR_CLIENT=redhat)’;
set newname for datafile 1 to ‘/oracle/orcl/system01’;
set newname for datafile 2 to ‘/oracle/orcl/sysaux01’;
set newname for datafile 3 to ‘/oracle/orcl/undotbs01’;
set newname for datafile 4 to ‘/oracle/orcl/users01’;
set newname for datafile 5 to ‘/oracle/orcl/example01’;
restore database;
switch datafile all;
release channel t1;
release channel t2;
release channel t3;
release channel t4;
}
select * from v$recovery_log;
run{
allocate channel t1 type ‘sbt_tape’
parms ‘ENV=(NSR_CLIENT=bob,NSR_SERVER=redhat)’;
restore archivelog from logseq 27 until logseq 28 thread 1;
release channel t1;
}
run{
allocate channel t1 type ‘sbt_tape’
parms ‘ENV=(NSR_CLIENT=bob,NSR_SERVER=redhat)’;
restore archivelog all;
release channel t1;
}




