redhat6.3 x86_64系统oracle 12c版本数据库,如何运用rman进行单表恢复并移动到指定表空间
redhat6.3系统
在pdb数据库(pdb1)中创建了俩个表空间,分别为n1和n2,n1隶属于pdb1数据库下mars用户默认表空间是n1,并给了mars用户表空间n2的权限
create user mars identified by mars default tablespace n1;
alter user mars quota unlimited on n2;
表空间n1下有表t1和t4
SQL> select table_name,tablespace_name from all_tables where table_name = 'T1' ;
TABLE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
T1 N1
SQL> select table_name,tablespace_name from all_tables where table_name = 'T4' ;
TABLE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
T4 N1
表空间n2下有表t2
SQL> select table_name,tablespace_name from all_tables where table_name = 'T2' ;
TABLE_NAME TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
T2 N2
表内数据如下:
SQL> select * from mars.t1
2 ;
ID
----------
1
SQL> select * from mars.t2 ;
no rows selected
SQL> select * from mars.t4 ;
no rows selected
进到rman进行备份执行backup database;
备份后,查询当前SCN号
SQL> select current_scn from v$database ;
CURRENT_SCN
-----------
11788104
恢复语句以及结果如下
[oracle@wjq ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Mon Oct 2 10:04:20 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1467166649)
RMAN> run
2> {
3> recover table mars.t1 of pluggable database pdb1
4> until scn 11788104
5> auxiliary destination '/home/oracle/recover'
6> datapump destination '/home/oracle/dumpfiles'
7> remap tablespace n1:n2 ;
8> }
Starting recover at 02-OCT-17
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/02/2017 10:05:42
RMAN-05063: Cannot recover specified tables
RMAN-05112: table "MARS"."T1" already exists
请问恢复语句有什么错误么?为什么?怎么解决?谢谢各位大神!