暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oracle数据库恢复

原创 大道成佛 2021-11-14
1041

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;
}

最后修改时间:2021-11-17 09:03:08
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论