使用 rman 方式测试增量传输xtts


1、测试环境

ip地址 
10.10.6.86 dg
10.10.6.87 dg2


源端数据库版本:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
目标端数据库版本:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production


rman 方式测试增量传输表空间 TEST 


【解压缩软件】
[oracle@dg ~]$ mkdir xtt
[oracle@dg tts]$ unzip rman-xttconvert_2.0.zip 
Archive:  rman-xttconvert_2.0.zip
  inflating: xttcnvrtbkupdest.sql    
  inflating: xttdbopen.sql           
  inflating: xttdriver.pl            
  inflating: xttprep.tmpl            
  inflating: xtt.properties          
  inflating: xttstartupnomount.sql   
  
 [oracle@dg test]$ mv     xtt.properties    xtt.properties_bak
    
【修改参数文件】              
[oracle@dg tts]$ cat xtt.properties
parallel=3
rollparallel=2
getfileparallel=4
tablespaces=TEST   //此处表空间必须大写,否则输出文件是空的     
platformid=13
dfcopydir=/backup/full
backupformat=/backup/inc       
stageondest=/backup/full 
backupondest=/backup/inc
storageondest=/u01/app/oracle/oradata/test
desttmpdir=/backup/tmp
cnvinst_home=/u01/app/oracle/11.2.0.4/product
cnvinst_sid=test
注意:1、此处需要注意的是表空间名称必须大写
      2、注意每个参数的结束后面不能有空格
      3、注意选中传输的表空间必须online + READ WRITE,并且表空间中的数据文件也必须是online

The set of tablespaces being transported must all be online, contain no offline data files, and must be READ WRITE.  The Prepare step will signal 
an error if one or more datafiles or tablespaces in your source database are offline or READ ONLY.  If a tablespace is READ ONLY and will remain so 
throughout the procedure, then simply transport those tablespaces using the traditional cross platform transportable tablespace process.  
No incremental apply is needed for those files.


源端和目标端创建备份需要的目录 
[root@dg ~]# mkdir -p /backup/full
[root@dg ~]# mkdir -p /backup/inc
[root@dg ~]# mkdir -p /backup/tmp
[root@dg ~]# chown -R oracle:oinstall /backup


 源端脚本传输到目标端 
[oracle@dg tts]$  scp -r /home/oracle/xtt 10.10.6.87:/home/oracle/xtt  
  
  
  
【源端】传输表空间做镜像  
[oracle@dg xtt]$ export TMPDIR=/home/oracle/xtt
[oracle@dg xtt]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -p

--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------


--------------------------------------------------------------------
Starting prepare phase
--------------------------------------------------------------------
Prepare source for Tablespaces:
                  'TEST'  /backup/full 
xttpreparesrc.sql for 'TEST' started at Tue Mar 14 19:56:32 2017
xttpreparesrc.sql for  ended at Tue Mar 14 19:56:32 2017
Prepare source for Tablespaces:
                  ''  /backup/full 
xttpreparesrc.sql for '' started at Tue Mar 14 19:56:37 2017
xttpreparesrc.sql for  ended at Tue Mar 14 19:56:38 2017
Prepare source for Tablespaces:
                  ''  /backup/full 
xttpreparesrc.sql for '' started at Tue Mar 14 19:56:39 2017
xttpreparesrc.sql for  ended at Tue Mar 14 19:56:39 2017
--------------------------------------------------------------------
Done with prepare phase
--------------------------------------------------------------------


在全备的目录下可以看到生成的文件
[oracle@dg full]$ ls -lrt
total 102408
-rw-r----- 1 oracle oinstall 104865792 Mar 14 19:56 TEST_5.tf


产生了四个脚本文件
[oracle@dg xtt]$ ls -lrt
total 176
-rwxrwxr-x 1 oracle oinstall    52 May 22  2015 xttstartupnomount.sql
-rwxrwxr-x 1 oracle oinstall  7789 May 22  2015 xtt.properties_bak
-rwxrwxr-x 1 oracle oinstall 11549 May 22  2015 xttprep.tmpl
-rwxrwxr-x 1 oracle oinstall 91722 May 22  2015 xttdriver.pl
-rwxrwxr-x 1 oracle oinstall    71 May 22  2015 xttdbopen.sql
-rwxrwxr-x 1 oracle oinstall  1390 May 22  2015 xttcnvrtbkupdest.sql
-rw-r--r-- 1 oracle oinstall   310 Mar 14 19:21 xtt.properties
-rw-r--r-- 1 oracle oinstall    18 Mar 14 19:56 xttplan.txt
-rw-r--r-- 1 oracle oinstall   177 Mar 14 19:56 rmanconvert.cmd
-rw-r--r-- 1 oracle oinstall 11534 Mar 14 19:56 xttpreparesrc.sql
-rw-r--r-- 1 oracle oinstall     0 Mar 14 19:56 xttprepare.cmd

[oracle@dg xtt]$ cat rmanconvert.cmd
host 'echo ts::TEST'; 
  convert from platform 'Linux x86 64-bit' 
  datafile 
   '/backup/full/TEST_5.tf' 
  format '/u01/app/oracle/oradata/test/%N_%f.xtf' 
 parallelism 3; 
 
rmanconvert.cmd文件则是rman convert脚本,用来转换数据文件的字节序,该脚本需要传输到目标端使用。需要注意的是,
在2.0版本工具中,对convert操作增加了并行参数parallelism,一般设置为6或者8,根据CPU或者IO压力负载而定。 
 
[oracle@dg xtt]$ cat xttplan.txt
TEST::::1701613
5
 其中xttplan.txt记录了当前数据库的SCN,如果后面再次运行脚本进行增量操作(perl  xttdriver.pl  -s)时,该值会发现改变。


将dfcopydir路径下生成的数据文件副本和这两个文件传输到目标主机上。

scp   /home/oracle/xtt/rmanconvert.cmd    10.10.6.87:/home/oracle/xtt
scp   /home/oracle/xtt/xttplan.txt 10.10.6.87:/home/oracle/xtt
scp  /backup/full/TEST_5.tf  10.10.6.87:/backup/full/


【目标端】进行数据文件的转换
目标端执行rman convent脚本
export TMPDIR=/home/oracle/xtt
[oracle@dg2 xtt]$ $ORACLE_HOME/perl/bin/perl  xttdriver.pl  -c
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Performing convert
--------------------------------------------------------------------
--------------------------------------------------------------------
Converted datafiles listed in: /home/oracle/xtt/xttnewdatafiles.txt
--------------------------------------------------------------------

此步骤执行完后,在数据目录下面,可以看到相应的数据文件,不过是以TEST_5.xtf命名
这个步骤将按照rmanconvert.cmd里面记录的信息对数据文件进行转换,以满足目标主机的格式。同时会将这些文件存放到storageondest参数指定的目录,
转换完成后,到相应的目录检查数据文件是否完整。
 
需要注意的是,如果此处报错,那么会在rmanxtts的路径下产生一个FAIL*文件,再次运行前需要删除这个文件,否则无法运行。


在【源端】模拟生成新增数据
SQL> insert into test select * From scott.emp;
insert into t1 values(2,'bbb');
insert into t1 values(2,'bbb');
insert into t1 values(2,'bbb');
commit;
SQL> select * From t1;


ID NAME
---------- --------------------
2 bbb
2 bbb
2 bbb
1 a
1 a
1 a
1 a


7 rows selected.


SQL> update test set sal=sal+1000;




在【源端】执行增量备份incremental
export TMPDIR=/home/oracle/xtt
[oracle@dg xtt]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -i
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Backup incremental
--------------------------------------------------------------------
Prepare newscn for Tablespaces: 'TEST' 
Prepare newscn for Tablespaces: '' 
Prepare newscn for Tablespaces: '' 
rman target /  cmdfile /home/oracle/xtt/rmanincr.cmd
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Mar 14 20:18:28 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TEST (DBID=2236665980)
RMAN> set nocfau;
2> host 'echo ts::TEST';
3> backup incremental from scn 1701613 
4>   tag tts_incr_update tablespace 'TEST'  format
5>  '/backup/inc/%U';
6> 
executing command: SET NOCFAU
using target database control file instead of recovery catalog
ts::TEST
host command complete
Starting backup at 14-MAR-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=149 device type=DISK
backup will be obsolete on date 21-MAR-17
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/test/test01.dbf
channel ORA_DISK_1: starting piece 1 at 14-MAR-17
channel ORA_DISK_1: finished piece 1 at 14-MAR-17
piece handle=/backup/inc/0lrv4t0m_1_1 tag=TTS_INCR_UPDATE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
using channel ORA_DISK_1
backup will be obsolete on date 21-MAR-17
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 14-MAR-17
channel ORA_DISK_1: finished piece 1 at 14-MAR-17
piece handle=/backup/inc/0mrv4t0p_1_1 tag=TTS_INCR_UPDATE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 14-MAR-17
Recovery Manager complete
--------------------------------------------------------------------
Done backing up incrementals
--------------------------------------------------------------------


--查看备份文件目录
[oracle@dg backup]$ ls
full  inc  tmp
[oracle@dg backup]$ cd inc
[oracle@dg inc]$ ls -lrt
total 9672
-rw-r----- 1 oracle oinstall  106496 Mar 14 20:18 0lrv4t0m_1_1
-rw-r----- 1 oracle oinstall 9797632 Mar 14 20:18 0mrv4t0p_1_1
其中0mrv4t0p_1_1 文件是控制文件,固定大小; 0lrv4t0m_1_1是增量备份的文件

---查看脚本目录
[oracle@dg xtt]$ ls -lrt
total 212
-rwxrwxr-x 1 oracle oinstall    52 May 22  2015 xttstartupnomount.sql
-rwxrwxr-x 1 oracle oinstall  7789 May 22  2015 xtt.properties_bak
-rwxrwxr-x 1 oracle oinstall 11549 May 22  2015 xttprep.tmpl
-rwxrwxr-x 1 oracle oinstall 91722 May 22  2015 xttdriver.pl
-rwxrwxr-x 1 oracle oinstall    71 May 22  2015 xttdbopen.sql
-rwxrwxr-x 1 oracle oinstall  1390 May 22  2015 xttcnvrtbkupdest.sql
-rw-r--r-- 1 root   root     26975 Mar 14 18:59 rman-xttconvert_2.0.zip
-rw-r--r-- 1 oracle oinstall    18 Mar 14 19:56 xttplan.txt
-rw-r--r-- 1 oracle oinstall   177 Mar 14 19:56 rmanconvert.cmd
-rw-r--r-- 1 oracle oinstall 11534 Mar 14 19:56 xttpreparesrc.sql
-rw-r--r-- 1 oracle oinstall    20 Mar 14 20:17 xttplan.txt1489493908
-rw-r--r-- 1 oracle oinstall   145 Mar 14 20:17 rmanincr.cmd1489493908
-rw-r--r-- 1 oracle oinstall     0 Mar 14 20:17 tsbkupmap.txt1489493915
-rw-r--r-- 1 oracle oinstall     0 Mar 14 20:17 incrbackups.txt1489493915
-rw-r--r-- 1 oracle oinstall   302 Mar 14 20:18 xtt.properties
-rw-r--r-- 1 oracle oinstall    20 Mar 14 20:18 xttplan.txt.new
-rw-r--r-- 1 oracle oinstall 11530 Mar 14 20:18 xttdetnewfromscnsrc.sql
-rw-r--r-- 1 oracle oinstall     0 Mar 14 20:18 xttprepare.cmd
-rw-r--r-- 1 oracle oinstall   138 Mar 14 20:18 rmanincr.cmd
-rw-r--r-- 1 oracle oinstall    25 Mar 14 20:18 tsbkupmap.txt
-rw-r--r-- 1 oracle oinstall    25 Mar 14 20:18 incrbackups.txt


 xttplan.txt.new  文件记录的是增量备份的scn
 [oracle@dg xtt]$ cat  xttplan.txt.new
 TEST::::1708975
 5
 
 上述步骤的增量备份信息,会写入到如下txt文件中。
[oracle@dg xtt]$  cat incrbackups.txt
/backup/inc/0lrv4t0m_1_1

[oracle@dg xtt]$ cat tsbkupmap.txt
TEST::5:::1=0lrv4t0m_1_1


把源端的脚本拷贝到目标端的xtt文件夹中去
[oracle@dg ~]$ scp -r xtt  10.10.6.87:/tmp
[oracle@dg2 xtt]$ mv * /home/oracle/xtt

注意:此步骤最好把源端的所有文件拷贝到目标的xtt中,因为在测试中发现有些文件没有传输到目标端去,结果目标端在恢复文件的时候,导致hang住,不报错也不退出


将增量备份信息传到目标端
将/backup/inc/0lrv4t0m_1_1 传到目标端:
scp  /backup/inc/0lrv4t0m_1_1    10.10.6.87:/backup/full
scp  /backup/inc/0mrv4t0p_1_1  10.10.6.87:/backup/inc
注意:这里需要把增量备份传输到目标端的全备目录 /backup/full


在【目标端】应用增量roll forward
 
export TMPDIR=/home/oracle/xtt
 export XTTDEBUG=1  (打开debug功能)
[oracle@dg2 xtt]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -r
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Start rollforward
--------------------------------------------------------------------
convert instance: /u01/app/oracle/11.2.0.4/product 
convert instance: test 
ORACLE instance started.
Total System Global Area 1887350784 bytes
Fixed Size    2254344 bytes
Variable Size 1728055800 bytes
Database Buffers  150994944 bytes
Redo Buffers    6045696 bytes
rdfno 5
BEFORE ROLLPLAN
datafile number : 5  
datafile name   : /u01/app/oracle/oradata/test/TEST_5.xtf
AFTER ROLLPLAN
CONVERTED BACKUP PIECE/backup/inc/xib_0lrv4t0m_1_1_5
PL/SQL procedure successfully completed.
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiece
PL/SQL procedure successfully completed.
--------------------------------------------------------------------
End of rollforward phase
--------------------------------------------------------------------

对于一个比较大量的系统来讲,上述的增量操作,我们可以进行多次。假设我们进行了多次操作之后,在停机时间的时候,
再将源端数据库中需要传输的表空间设置为只读模式,如下:


 
 在【源端】执行最后一次增量备份incremental
SQL> update test set job='aaaa';
SQL> commit;
SQL> conn /as sysdba
SQL> alter tablespace test read only;


export TMPDIR=/home/oracle/xtt
[oracle@dg xtt]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -i 
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Backup incremental
--------------------------------------------------------------------
Prepare newscn for Tablespaces: 'TEST' 
Prepare newscn for Tablespaces: '' 
Prepare newscn for Tablespaces: '' 
rman target /  cmdfile /home/oracle/xtt/rmanincr.cmd
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Mar 14 20:36:36 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TEST (DBID=2236665980)
RMAN> set nocfau;
2> host 'echo ts::TEST';
3> backup incremental from scn 1701613 
4>   tag tts_incr_update tablespace 'TEST'  format
5>  '/backup/inc/%U';
6> 
executing command: SET NOCFAU
using target database control file instead of recovery catalog
ts::TEST
host command complete
Starting backup at 14-MAR-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=151 device type=DISK
backup will be obsolete on date 21-MAR-17
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/test/test01.dbf
channel ORA_DISK_1: starting piece 1 at 14-MAR-17
channel ORA_DISK_1: finished piece 1 at 14-MAR-17
piece handle=/backup/inc/0nrv4u2l_1_1 tag=TTS_INCR_UPDATE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
using channel ORA_DISK_1
backup will be obsolete on date 21-MAR-17
archived logs will not be kept or backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 14-MAR-17
channel ORA_DISK_1: finished piece 1 at 14-MAR-17
piece handle=/backup/inc/0orv4u2n_1_1 tag=TTS_INCR_UPDATE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 14-MAR-17
Recovery Manager complete.
--------------------------------------------------------------------
Done backing up incrementals
--------------------------------------------------------------------


--增量备份
[oracle@dg inc]$ ls -lrt
total 19344
-rw-r----- 1 oracle oinstall  106496 Mar 14 20:18 0lrv4t0m_1_1
-rw-r----- 1 oracle oinstall 9797632 Mar 14 20:18 0mrv4t0p_1_1
-rw-r----- 1 oracle oinstall  106496 Mar 14 20:36 0nrv4u2l_1_1
-rw-r----- 1 oracle oinstall 9797632 Mar 14 20:36 0orv4u2n_1_1


传输脚本


scp   /home/oracle/xtt/xttplan.txt.new  10.10.6.87:/home/oracle/xtt
scp   /home/oracle/xtt/xttdetnewfromscnsrc.sql 10.10.6.87:/home/oracle/xtt
scp   /home/oracle/xtt/xttprepare.cmd 10.10.6.87:/home/oracle/xtt
scp   /home/oracle/xtt/rmanincr.cmd 10.10.6.87:/home/oracle/xtt
scp   /home/oracle/xtt/tsbkupmap.txt 10.10.6.87:/home/oracle/xtt
scp   /home/oracle/xtt/incrbackups.txt 10.10.6.87:/home/oracle/xtt

scp    /backup/inc/0nrv4u2l_1_1 10.10.6.87:/backup/full
scp    /backup/inc/0orv4u2n_1_1 10.10.6.87:/backup/inc

 
 在【目标】端应用最后一次增量roll forward
  export TMPDIR=/home/oracle/xtt
  $ORACLE_HOME/perl/bin/perl xttdriver.pl -r
  
[oracle@dg2 xtt]$   export TMPDIR=/home/oracle/xtt
[oracle@dg2 xtt]$   $ORACLE_HOME/perl/bin/perl xttdriver.pl -r
--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------
-----------------------------------------------------
Done parsing properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------
--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------
ORACLE_SID  : test
ORACLE_HOME : /u01/app/oracle/11.2.0.4/product
--------------------------------------------------------------------
Start rollforward
--------------------------------------------------------------------
convert instance: /u01/app/oracle/11.2.0.4/product 
convert instance: test 
ORACLE instance started.
Total System Global Area 1887350784 bytes
Fixed Size    2254344 bytes
Variable Size 1728055800 bytes
Database Buffers  150994944 bytes
Redo Buffers    6045696 bytes
rdfno 5
BEFORE ROLLPLAN
datafile number : 5  
datafile name   : /u01/app/oracle/oradata/test/TEST_5.xtf
AFTER ROLLPLAN
CONVERTED BACKUP PIECE/backup/inc/xib_0nrv4u2l_1_1_5
PL/SQL procedure successfully completed.
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiece
PL/SQL procedure successfully completed.
--------------------------------------------------------------------
End of rollforward phase
--------------------------------------------------------------------

在目标端产生执行导入的脚本
    
    [oracle@dg2 test]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -e
    
    [oracle@dg2 xtt]$ cat /home/oracle/xtt/xttplugin.txt
impdp directory=<DATA_PUMP_DIR> logfile=<tts_imp.log> network_link=<ttslink> transport_full_check=no transport_tablespaces=TEST transport_datafiles='/u01/app/oracle/oradata/test/TEST_5.xtf'

    #因为之前没有设置dstdir,srclink参数,所以此处产生的导入脚本需要手动加上dblink和directory的名称

create  directory destdir as '/backup';

create public database link tts connect to scott identified by  tiger using '(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.6.86)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test)
    )
  )';
   impdp   boswll/boswll directory= destdir  logfile=tts.log  network_link= tts  transport_full_check=no transport_tablespaces=TEST transport_datafiles='/u01/app/oracle/oradata/test/TEST_5.xtf'
   
   [oracle@dg2 xtt]$  impdp   boswll/boswll directory= destdir  logfile=tts.log  network_link= tts  transport_full_check=no transport_tablespaces=TEST transport_datafiles='/u01/app/oracle/oradata/test/TEST_5.xtf'
Import: Release 11.2.0.4.0 - Production on Tue Mar 14 20:57:42 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "BOSWLL"."SYS_IMPORT_TRANSPORTABLE_01":  boswll/******** directory= logfile=tts.log network_link= transport_full_check=no transport_tablespaces=TEST transport_datafiles=/u01/app/oracle/oradata/test/TEST_5.xtf 
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "BOSWLL"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at Tue Mar 14 20:59:50 2017 elapsed 0 00:02:01


  ---源端TEST表空间可读写  
 alter tablespace TEST read write; 

--目标端TEST表空间可读写    
SQL>  alter tablespace TEST read write; 
Tablespace altered.

SQL> SELECT * fROM V$TABLESPACE;
       TS# NAME INCLUD BIGFIL FLASHB ENCRYP
---------- ------------------------------------------------------------ ------ ------ ------ ------
0 SYSTEM YES    NO     YES
1 SYSAUX YES    NO     YES
2 UNDOTBS1 YES    NO     YES
3 TEMP NO     NO     YES
4 USERS YES    NO     YES
5 TEST YES    NO     YES
6 rows selected.    
    
    
RMAN>  validate tablespace 'TEST' check logical;
Starting validate at 14-MAR-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00005 name=/u01/app/oracle/oradata/test/TEST_5.xtf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:04
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              12661        12800           971265    
  File Name: /u01/app/oracle/oradata/test/TEST_5.xtf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              6               
  Index      0              0               
  Other      0              133             


Finished validate at 14-MAR-17
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值