标签:style blog http os 文件 for 数据 ar 2014
啦啦啦
select name from v$archived_log;
NAME
--------------------------------------------------------------------------------
+FLASH/orcl/onlinelog/group_1.257.856384971
+DATA/orcl/onlinelog/group_2.262.856384971
+FLASH/orcl/onlinelog/group_2.258.856384971
+DATA/orcl/onlinelog/group_3.263.856384971
+FLASH/orcl/onlinelog/group_3.259.856384973
+FLASH/orcl/archivelog/2014_08_25/thread_1_seq_5.276.856492209
+FLASH/orcl/archivelog/2014_08_25/thread_1_seq_3.286.856492209
+FLASH/orcl/archivelog/2014_08_25/thread_1_seq_4.287.856492209
?
41 rows selected.
?
SQL> alter system switch logfile;
alter tablespace system begin backup;
host copy E:\ORACLE\ORADATA\MARK\SYSTEM01.DBF
alter tablespace system end backup;
.....
begin
for i in 1 .. 4 loop
insert into mark values(i,sysdate,dbms_flashback.get_system_change_number);
execute immediate ‘alter system switch logfile‘;
dbms_lock.sleep(15);
end loop;
end;
/
Commit;
sql>startup mount;
sql>recover database using backup controlfile until cancel;
应用了所有的归档日志文件之后,可以将数据库只读打开;
sql>alter database open read only;
?
因为原数据库的修改还在继续,关闭数据库,启动到mount状态,然后从源数据库拷贝归档日志,继续应用归档。通过不断应用归档日志,建议数据库和源数据库就处于同步状态。当到达迁移指定的时间时,将源数据库归档,然后停机,拷贝在线日志。然后再迁移数据库应用日志。
这种方法和DAGAGUARD类似,但是更为可控。
标签:style blog http os 文件 for 数据 ar 2014
原文地址:http://www.cnblogs.com/markfeifei/p/3933105.html