使用RMAN增量备份来更新传输表空间(3)

Starting backup at 13-APR-16
WARNING: TAG INCR_JYTEST option is ignored; backups will be tagged with INCR_JYTEST
channel c1: starting incremental level 1 datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00008 name=/u01/app/oracle/oradata/jytest/jytest01.dbf
channel c1: starting piece 1 at 13-APR-16
channel c2: starting incremental level 1 datafile backupset
channel c2: specifying datafile(s) in backupset
input datafile fno=00009 name=/u01/app/oracle/oradata/jytest/jytest02.dbf
skipping datafile 00009 because it has not changed
channel c2: backup cancelled because all files were skipped
channel c1: finished piece 1 at 13-APR-16
piece handle=/jytest_data/jytest01_909069660.dbf tag=INCR_JYTEST comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 13-APR-16

Starting recover at 13-APR-16
channel c1: starting incremental datafile backupset restore
channel c1: specifying datafile copies to recover
recovering datafile copy fno=00008 name=/jytest_data/jytest01.dbf
channel c1: reading from backup piece /jytest_data/jytest01_909069660.dbf
channel c1: restored backup piece 1
piece handle=/jytest_data/jytest01_909069660.dbf tag=INCR_JYTEST
channel c1: restore complete, elapsed time: 00:00:02
Finished recover at 13-APR-16
released channel: c1
released channel: c2


10.将表空间jytest重新附加到目标数据库中
[oracle@weblogic29 jytest]$ impdp jytest/jytest directory=test_dump network_link=dblink_jytest transport_tablespaces=jytest transport_full_check=n transport_datafiles=\'/u01/app/oracle/oradata/jytest/jytest01.dbf\',\'/u01/app/oracle/oradata/jytest/jytest02.dbf\'

Import: Release 10.2.0.5.0 - 64bit Production on Wednesday, 13 April, 2016 15:50:37

Copyright (c) 2003, 2007, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "JYTEST"."SYS_IMPORT_TRANSPORTABLE_01": jytest/******** directory=test_dump network_link=dblink_jytest transport_tablespaces=jytest transport_full_check=n transport_datafiles='/u01/app/oracle/oradata/jytest/jytest01.dbf','/u01/app/oracle/oradata/jytest/jytest02.dbf'
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "JYTEST"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 15:50:42

SQL> select count(*) from jytest.t1;

COUNT(*)
----------
25712

SQL> alter tablespace jytest read write;

Tablespace altered.


与原数据库中表t1记录数一样,说明增量更新传输表空间成功。

总结:使用增量备份来前更新数据文件要比复制整个数据文件所花的时间少。这里使用了NFS来执行数据文件的传输避免了使用ftp等方式传输文件,使用impdp network_link避免了导入和导出元数据与传输元数据这也能节省了时间。

--------------------------------------推荐阅读 --------------------------------------

RMAN备份时遭遇ORA-19571 

RMAN 配置归档日志删除策略

Oracle基础教程之通过RMAN复制数据库

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

RMAN备份时遇到ORA-19588 

--------------------------------------分割线 --------------------------------------

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/eff86780a02c35749be7955f97528067.html