7.传输集和辅助集数据文件可以包含以下任何对象:
--复制主表
--部分表
-有varray列,嵌套表或外部文件的表
--快照日志和快照表
--包含undo或回滚段的表空间
--包含属于SYS用户对象加,回滚段的表空间
如果不使用恢复目录执行transport tablespace还有以下两个限制:
1.如果使用过去某个时间点的表空间内容来创建传输集,那么执行transport tablespace命令时表空间集所使用的undo段与传输时所选择的表空间所使用的undo段必须相同。包含transport tablespace命令所指定目标SCN所需要的undo段的表空间是辅助集的一部分。不像恢复目录,控制文件中的RMAN档案库只包含在当时包含undo段的表空间记录。如果表空间要使用的undo段与指定的目标时间要使用的不同,那么transport tablespace命令将会失败。
2.如果数据库已经重用了RMAN档案库中包含transport tablespace操作所需要的备份记录信息,那么因为RMAN不能定位需要的备份而造成操作失败。如果备份仍然可用,可以使用catalog命令将需要的备份登记到RMAN档案库中,但如果数据库已经覆盖了控制文件中的备份记录那么可能要丢失需要的备份记录信息。
使用RMAN创建传输表空间集的操作过程
使用RMAN传输表空间的基本操作
1.确认源数据库与目标数据库所在平台是不是传输表空间所支持的操作系统平台。
?确认源数据库操作系统平台:
SQL> select d.platform_name,endian_format from v$transportable_platform tp,v$database d
? 2? where tp.platform_name=d.platform_name ;
PLATFORM_NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ENDIAN_FORMAT
----------------------------------------------------------------------------------------------------- --------------
Linux IA (32-bit)? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Little
确认目数据库操作系统平台:
SQL> select d.platform_name,endian_format from v$transportable_platform tp,v$database d
? 2? where tp.platform_name=d.platform_name ;
PLATFORM_NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ENDIAN_FORMAT
----------------------------------------------------------------------------------------------------- --------------
Linux IA (32-bit)? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Little
这里操作系统平台都是Linux
2.确认要被传输的表空间是否是自包含表空间(TSPITR,TEST):
SQL> exec sys.dbms_tts.transport_set_check('TSPITR',true);
PL/SQL procedure successfully completed.
SQL> exec sys.dbms_tts.transport_set_check('TEST',true);
PL/SQL procedure successfully completed.
SQL> select * from sys.transport_set_violations;
no rows selected
?
如果没有行选择,表示该表空间只包含表数据,可以传输。
记录表空间传输前表tspitr与test中的记录:
SQL> conn tspitr/tspitr
Connected.
SQL> select count(*) from tspitr;
? COUNT(*)
----------
? ? 50641
SQL> conn test/test
Connected.
SQL> select count(*) from test;
? COUNT(*)
----------
? ? 50680
3.对源数据库执行备份,在执行备份时一定要加上include current controlfile否则执行transport tablespace命令时会出现以下错误信息:
Automatic instance removed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of tranport tablespace command at 03/26/2015 20:24:22
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
[oracle@oracle11g admin]$ export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
[oracle@oracle11g admin]$ rman target sys/zzh_2046@test? catalog rman/rman@jy
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Mar 26 20:01:33 2015
Copyright (c) 1982, 2007, Oracle.? All rights reserved.
connected to target database: TEST (DBID=2168949517)
connected to recovery catalog database
RMAN> backup as backupset database include current controlfile plus archivelog;
Starting backup at 2015-03-26 20:32:19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
inp