先来个清日志脚本镇场
-
sql> begin
-
for log_cur in ( select group# group_no from v$log )
-
loop
-
execute immediate 'alter database clear logfile group '||log_cur.group_no;
-
end loop;
-
end;
-
/
-
-
sql> begin
-
for log_cur in ( select group# group_no from v$standby_log )
-
loop
-
execute immediate 'alter database clear logfile group '||log_cur.group_no;
-
end loop;
-
end;
-
/
db version 12.1.0.1 to 21.6
-
备库上
-
-
$ rman target /
-
-
rman > run {
-
allocate channel c1 type disk connect '/@';
-
allocate channel c2 type disk connect '/@';
-
allocate channel c3 type disk connect '/@';
-
allocate channel c4 type disk connect '/@';
-
allocate channel c5 type disk connect '/@';
-
allocate channel c6 type disk connect '/@';
-
allocate channel c7 type disk connect '/@';
-
allocate channel c8 type disk connect '/@';
-
recover database from service 'ts_pri' section size 32g;
-
}
-
-
观察进度
-
select inst_id,sid,serial#,opname, round((sofar/totalwork)*100,2) as "%complete",
-
elapsed_seconds, time_remaining
-
from gv$session_longops
-
where sofar<>totalwork and totalwork<>0
-
and sid||serial# in (select sid||serial# from v$session);
-
参考:2850185.1