La La la
- Determine the source database information, mainly query the source database archive, confirm the archive log;
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
?
Selected rows.
?
sql> alter system switch logfile;
- Back up the database and make a hot backup of the source database with the following script:
ALTER TABLESPACE system begin backup;
Host copy E:\ORACLE\ORADATA\MARK\SYSTEM01. Dbf
Alter TABLESPACE system end backup;
.....
- Change data and archive part of the log, do not test the purpose, modify part of the data, and continue to archive, the database continues to provide services.
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;
- Perform recovery, during the migration process, you can transfer the backup files to the target host, restore the backed up data files on the target host, and start the database.
Sql>startup Mount;
Sql>recover database using Backup controlfile until cancel;
After all the archived log files have been applied, you can open the database read-only;
Sql>alter database open Read only;
?
Because the modification of the original database continues, close the database, boot to mount state, and then copy the archive log from the source database to continue applying the archive. By continually applying archived logs, it is recommended that the database and the source database be in a synchronized state. When the migration is reached for a specified time, the source database is archived, then shut down, and the online logs are copied. Then migrate the database application log.
This method is similar to Dagaguard, but more controllable.
Archive gradual application of secondary database migrations (for large databases)