iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >如何使用RMAN对CDB中的部分表空间进行复制
  • 548
分享到

如何使用RMAN对CDB中的部分表空间进行复制

2024-04-02 19:04:59 548人浏览 泡泡鱼
摘要

这篇文章主要介绍“如何使用RMAN对CDB中的部分表空间进行复制”,在日常操作中,相信很多人在如何使用RMAN对CDB中的部分表空间进行复制问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望

这篇文章主要介绍“如何使用RMAN对CDB中的部分表空间进行复制”,在日常操作中,相信很多人在如何使用RMAN对CDB中的部分表空间进行复制问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”如何使用RMAN对CDB中的部分表空间进行复制”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!


1.检查源RAC CDB(jy)的参数文件,数据文件,联机日志文件,控制文件,归档日志文件的存储目录

sql> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------------------------------
spfile                               string      +DATA/JY/PARAMETERFILE/spfile.303.961976713

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA/JY/DATAFILE/system.317.962209603
+DATA/JY/DATAFILE/sysaux.298.962209605
+DATA/JY/DATAFILE/undotbs1.277.962209605
+DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/system.256.962209675
+DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/sysaux.270.962209675
+DATA/JY/DATAFILE/users.301.962209605
+DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/undotbs1.296.962209675
+DATA/JY/DATAFILE/undotbs2.312.962209605
+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/system.271.962209649
+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/sysaux.316.962209649
+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undotbs1.264.962209649
+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undo_2.268.962209649
+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/users.278.962209649
+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/test.275.962210609
+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/system.260.962469409
+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/sysaux.259.962469409
+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/undotbs1.265.962469409
+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/undo_2.266.962469409
+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/users.267.962469409
+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/test.269.962469409


SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------------------------------------
control_files                        string      +DATA/JY/CONTROLFILE/current.272.961976315


SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
+DATA/JY/ONLINELOG/group_2.302.961976321
+DATA/JY/ONLINELOG/group_1.261.961976319
+DATA/JY/ONLINELOG/group_3.263.961976697
+DATA/JY/ONLINELOG/group_4.262.961976705


SQL> arcHive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +TEST/arch
Oldest online log sequence     127
Next log sequence to archive   128
Current log sequence           128

2.查询整个CDB中的表空间名称,在复制整个CDB数据库时跳过JYPDB:TEST表空间

[oracle@jytest1 ~]$ rman target sys/xxzx7817600@jy catalog rco/xxzx7817600@jypdb_173

Recovery Manager: Release 12.2.0.1.0 - Production on Sat Jan 20 00:47:19 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: JY (DBID=979425723)
connected to recovery catalog database

RMAN> report schema;

Report of database schema for database with db_unique_name JY

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    840      SYSTEM               YES     +DATA/JY/DATAFILE/system.317.962209603
3    2210     SYSAUX               NO      +DATA/JY/DATAFILE/sysaux.298.962209605
4    570      UNDOTBS1             YES     +DATA/JY/DATAFILE/undotbs1.277.962209605
5    250      PDB$SEED:SYSTEM      NO      +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/system.256.962209675
6    340      PDB$SEED:SYSAUX      NO      +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/sysaux.270.962209675
7    5        USERS                NO      +DATA/JY/DATAFILE/users.301.962209605
8    100      PDB$SEED:UNDOTBS1    NO      +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/undotbs1.296.962209675
9    150      UNDOTBS2             YES     +DATA/JY/DATAFILE/undotbs2.312.962209605
10   270      JYPDB:SYSTEM         YES     +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/system.271.962209649
11   590      JYPDB:SYSAUX         NO      +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/sysaux.316.962209649
12   100      JYPDB:UNDOTBS1       YES     +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undotbs1.264.962209649
13   100      JYPDB:UNDO_2         YES     +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/undo_2.268.962209649
14   1267     JYPDB:USERS          NO      +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/users.278.962209649
15   100      JYPDB:TEST           NO      +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATAFILE/test.275.962210609
16   260      TESTPDB:SYSTEM       YES     +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/system.260.962469409
17   550      TESTPDB:SYSAUX       NO      +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/sysaux.259.962469409
18   100      TESTPDB:UNDOTBS1     YES     +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/undotbs1.265.962469409
19   100      TESTPDB:UNDO_2       YES     +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/undo_2.266.962469409
20   5        TESTPDB:USERS        NO      +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/users.267.962469409
21   100      TESTPDB:TEST         NO      +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/test.269.962469409

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    144      TEMP                 32767       +DATA/JY/TEMPFILE/temp.299.961976339
2    64       PDB$SEED:TEMP        32767       +DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/TEMPFILE/temp.297.962209865
3    137      JYPDB:TEMP           32767       +DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/TEMPFILE/temp.276.962210519
4    135      TESTPDB:TEMP         32767       +DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/TEMPFILE/temp.258.962469435

3.在目标主机上创建存储目标数据库(dupjy)相关数据库文件的目录,目标主机上的/u01/app/oracle/oradata/dupjy目录用来存储数据库的数据文件,控制文件,联机重做日志文件),/u01/app/oracle/arch/dupjy目录用来存 储数据库的归档重做日志文件。

4.将源数据库的密码文件复制到目标主机的相应目录中并修改为目标数据库(dupjy)对应的文件名

[grid@jytest1 ~]$ srvctl config database -db jy
Database unique name: jy
Database name: jy
Oracle home: /u01/app/oracle/product/12.2.0/db
Oracle user: oracle
Spfile: +DATA/JY/PARAMETERFILE/spfile.303.961976713
PassWord file: +DATA/JY/PASSWORD/pwdjy.274.961976109
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: oper
Database instances: jy1,jy2
Configured nodes: jytest1,jytest2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed

[grid@jytest1 ~]$ asmcmd cp  +DATA/JY/PASSWORD/pwdjy.274.961976109 /home/grid/pwddupjy
copying +DATA/JY/PASSWORD/pwdjy.274.961976109 -> /home/grid/pwddupjy


[oracle@shard1 dbs]# scp grid@10.138.130.171:/home/grid/pwddupjy /u01/app/oracle/product/12.2.0/db/dbs/
The authenticity of host '10.138.130.171 (10.138.130.171)' can't be established.
ECDSA key fingerprint is 7a:62:58:8b:77:98:52:94:d6:d5:0c:c4:6c:87:a6:7f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.138.130.171' (ECDSA) to the list of known hosts.
grid@10.138.130.171's password:
pwddupjy

[oracle@shard1 dbs]$ mv pwddupjy orapwdupjy

5.使用源数据库的spfile文件来创建目标数据库要使用的spfile文件
在源数据库中执行下面的命令来创建pfile参数文件

SQL> create pfile from spfile;

File created.

[root@shard1 ~]# scp oracle@10.138.130.171:/u01/app/oracle/product/12.2.0/db/dbs/initjy1.ora /u01/app/oracle/product/12.2.0/db/dbs/
grid@10.138.130.171's password:
initjy1.ora                                                                                                                                                                                                100% 1731     1.7KB/s   00:00
[root@shard1 ~]#


[oracle@shard1 dbs]$ cat initdupjy.ora
*.audit_file_dest='/u01/app/oracle/admin/dupjy/adump'
*.cluster_database=false
*.compatible='12.2.0'
*.control_files='/u01/app/oracle/oradata/dupjy/control01.ctl'
*.db_block_size=8192
*.db_name='dupjy'
*.diagnostic_dest='/u01/app/oracle'
*.enable_pluggable_database=true
*.open_cursors=300
*.pga_aggregate_target=1g
*.processes=2000
*.remote_login_passwordfile='exclusive'
*.sga_max_size=2147483648
*.sga_target=2147483648
*.log_archive_dest_1='location=/u01/app/oracle/oradata/arch_dupjy'
db_file_name_convert= ('+DATA/JY/DATAFILE/','/u01/app/oracle/oradata/dupjy/','+DATA/JY/5F9AA264B21F3ED9E053AB828A0A6088/DATAFILE/','/u01/app/oracle/oradata/dupjy/','+DATA/JY/5F9AC6865E87549FE053AB828A0ADE94/DATA FILE/','/u01/app/oracle/oradata/dupjy/','+DATA/JY/600D6F56DEB669CCE053AB828A0AAB7E/DATAFILE/','/u01/app/oracle/oradata/dupjy/')
log_file_name_convert=('+DATA/JY/ONLINELOG/','/u01/app/oracle/oradata/dupjy/')



[oracle@shard1 dbs]$ export ORACLE_SID=dupjy
[oracle@shard1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 18 19:06:00 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile='/u01/app/oracle/product/12.2.0/db/dbs/initdupjy.ora'
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size                  8794848 bytes
Variable Size             570428704 bytes
Database Buffers         1560281088 bytes
Redo Buffers                7979008 bytes

SQL> create spfile from pfile='/u01/app/oracle/product/12.2.0/db/dbs/initdupjy.ora';

File created.

6.使用spfile参数文件来启动目标数据库实例(辅助实例dupjy)

SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size                  8794848 bytes
Variable Size             570428704 bytes
Database Buffers         1560281088 bytes
Redo Buffers                7979008 bytes


SQL> show parameter spfile

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- -----------------------------------------------------
spfile                               string                 /u01/app/oracle/product/12.2.0/db/dbs/spfiledupjy.ora

7.给目标数据库配置静态监听

[oracle@shard1 admin]$ vi listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/12.2.0/db/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = tcp)(HOST = shard1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = dupjy)
      (ORACLE_HOME = /u01/app/oracle/product/12.2.0/db)
      (GLOBAL_DBNAME=dupjy)
    )
  )


[oracle@shard1 admin]$ lsnrctl start

LSNRCTL for linux: Version 12.2.0.1.0 - Production on 18-JAN-2018 20:30:34

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/12.2.0/db/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/12.2.0/db/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/shard1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=shard1)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=shard1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                18-JAN-2018 20:30:34
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0/db/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/shard1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=shard1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "dupjy" has 1 instance(s).
  Instance "dupjy", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

8.在目标主机上配置tns,用来通过网络服务名来连接源数据库与目标数据库

[oracle@shard1 admin]$ vi tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.2.0/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

JY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.138.130.171)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = jy)
    )
  )

DUPJY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.138.130.180)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dupjy)
    )
  )

9.在目标主机上测试是否可以通过使用网络服务名来连接源数据库与目标数据库

[oracle@shard1 admin]$ sqlplus /nolog

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 18 21:02:53 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size                  8794848 bytes
Variable Size             570428704 bytes
Database Buffers         1560281088 bytes
Redo Buffers                7979008 bytes
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@shard1 admin]$ sqlplus /nolog

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 18 21:04:51 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

SQL> conn sys/abcd@dupjy as sysdba
Connected.
SQL> conn sys/abcd@jy as sysdba
Connected.

10.在源主机上配置目标数据库的tns名

[oracle@jytest1 admin]$ vi tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.2.0/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.


JY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = jytest-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = jy)
    )
  )



DUPJY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.138.130.180)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dupjy)
      (UR = A)
    )
  )

11.在源主机上测试能否可以使用网络服务名来连接源数据库与目标数据库

[oracle@jytest1 admin]$ sqlplus /nolog

SQL*Plus: Release 12.2.0.1.0 Production on Fri Jan 19 03:16:59 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

SQL> conn sys/abcd@jy as sysdba
Connected.
SQL> conn sys/abcd@dupjy as sysdba
Connected.

12.执行数据库复制(跳过源CDB中的JYPDB:TEST表空间)

[oracle@jytest1 ~]$ rman target sys/abcd@jy catalog rco/abcd@jypdb_173 auxiliary sys/abcd@dupjy

Recovery Manager: Release 12.2.0.1.0 - Production on Sat Jan 20 01:14:06 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: JY (DBID=979425723)
connected to recovery catalog database
connected to auxiliary database: DUPJY (not mounted)


RMAN> duplicate target database to dupjy SKIP TABLESPACE JYPDB:'TEST' from active database nofilenamecheck using compressed backupset;

Starting Duplicate Db at 20-JAN-18
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=10 device type=DISK
current log archived

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''JY'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''DUPJY'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone from service  'jy' using compressed backupset
   primary controlfile;
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''JY'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''DUPJY'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    2147483648 bytes

Fixed Size                     8794848 bytes
Variable Size                788532512 bytes
Database Buffers            1342177280 bytes
Redo Buffers                   7979008 bytes

Starting restore at 20-JAN-18
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2269 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:06
output file name=/u01/app/oracle/oradata/dupjy/control01.ctl
Finished restore at 20-JAN-18

database mounted
Checking that duplicated tablespaces are self-contained
Datafile 15 skipped by request
RMAN-05529: warning: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

contents of Memory Script:
{
   sql clone 'alter database flashback off';
   set newname for datafile  1 to
 "/u01/app/oracle/oradata/dupjy/system.317.962209603";
   set newname for datafile  3 to
 "/u01/app/oracle/oradata/dupjy/sysaux.298.962209605";
   set newname for datafile  4 to
 "/u01/app/oracle/oradata/dupjy/undotbs1.277.962209605";
   set newname for datafile  5 to
 "/u01/app/oracle/oradata/dupjy/system.256.962209675";
   set newname for datafile  6 to
 "/u01/app/oracle/oradata/dupjy/sysaux.270.962209675";
   set newname for datafile  7 to
 "/u01/app/oracle/oradata/dupjy/users.301.962209605";
   set newname for datafile  8 to
 "/u01/app/oracle/oradata/dupjy/undotbs1.296.962209675";
   set newname for datafile  9 to
 "/u01/app/oracle/oradata/dupjy/undotbs2.312.962209605";
   set newname for datafile  10 to
 "/u01/app/oracle/oradata/dupjy/system.271.962209649";
   set newname for datafile  11 to
 "/u01/app/oracle/oradata/dupjy/sysaux.316.962209649";
   set newname for datafile  12 to
 "/u01/app/oracle/oradata/dupjy/undotbs1.264.962209649";
   set newname for datafile  13 to
 "/u01/app/oracle/oradata/dupjy/undo_2.268.962209649";
   set newname for datafile  14 to
 "/u01/app/oracle/oradata/dupjy/users.278.962209649";
   set newname for datafile  16 to
 "/u01/app/oracle/oradata/dupjy/system.260.962469409";
   set newname for datafile  17 to
 "/u01/app/oracle/oradata/dupjy/sysaux.259.962469409";
   set newname for datafile  18 to
 "/u01/app/oracle/oradata/dupjy/undotbs1.265.962469409";
   set newname for datafile  19 to
 "/u01/app/oracle/oradata/dupjy/undo_2.266.962469409";
   set newname for datafile  20 to
 "/u01/app/oracle/oradata/dupjy/users.267.962469409";
   set newname for datafile  21 to
 "/u01/app/oracle/oradata/dupjy/test.269.962469409";
   restore
   from  nonsparse   from service
 'jy'   using compressed backupset
   clone database
   skip forever tablespace  "JYPDB":"TEST"   ;
   sql 'alter system archive log current';
}
executing Memory Script

sql statement: alter database flashback off

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 20-JAN-18
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/dupjy/system.317.962209603
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/dupjy/sysaux.298.962209605
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:36
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/dupjy/undotbs1.277.962209605
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/dupjy/system.256.962209675
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/dupjy/sysaux.270.962209675
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:36
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/dupjy/users.301.962209605
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/dupjy/undotbs1.296.962209675
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/dupjy/undotbs2.312.962209605
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/dupjy/system.271.962209649
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/dupjy/sysaux.316.962209649
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/dupjy/undotbs1.264.962209649
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00013 to /u01/app/oracle/oradata/dupjy/undo_2.268.962209649
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00014 to /u01/app/oracle/oradata/dupjy/users.278.962209649
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:26
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00016 to /u01/app/oracle/oradata/dupjy/system.260.962469409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00017 to /u01/app/oracle/oradata/dupjy/sysaux.259.962469409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00018 to /u01/app/oracle/oradata/dupjy/undotbs1.265.962469409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00019 to /u01/app/oracle/oradata/dupjy/undo_2.266.962469409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00020 to /u01/app/oracle/oradata/dupjy/users.267.962469409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00021 to /u01/app/oracle/oradata/dupjy/test.269.962469409
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 20-JAN-18

sql statement: alter system archive log current
current log archived

contents of Memory Script:
{
   restore clone force from service  'jy' using compressed backupset
   archivelog from scn  13195279;
   switch clone datafile all;
}
executing Memory Script

Starting restore at 20-JAN-18
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=146
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=147
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=2 sequence=121
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=2 sequence=122
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using compressed network backup set from service jy
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=2 sequence=123
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 20-JAN-18

datafile 1 switched to datafile copy
input datafile copy RECID=23 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/system.317.962209603
datafile 3 switched to datafile copy
input datafile copy RECID=24 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/sysaux.298.962209605
datafile 4 switched to datafile copy
input datafile copy RECID=25 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/undotbs1.277.962209605
datafile 5 switched to datafile copy
input datafile copy RECID=26 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/system.256.962209675
datafile 6 switched to datafile copy
input datafile copy RECID=27 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/sysaux.270.962209675
datafile 7 switched to datafile copy
input datafile copy RECID=28 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/users.301.962209605
datafile 8 switched to datafile copy
input datafile copy RECID=29 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/undotbs1.296.962209675
datafile 9 switched to datafile copy
input datafile copy RECID=30 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/undotbs2.312.962209605
datafile 10 switched to datafile copy
input datafile copy RECID=31 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/system.271.962209649
datafile 11 switched to datafile copy
input datafile copy RECID=32 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/sysaux.316.962209649
datafile 12 switched to datafile copy
input datafile copy RECID=33 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/undotbs1.264.962209649
datafile 13 switched to datafile copy
input datafile copy RECID=34 STAMP=965848768 file name=/u01/app/oracle/oradata/dupjy/undo_2.268.962209649
datafile 14 switched to datafile copy
input datafile copy RECID=35 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/users.278.962209649
datafile 16 switched to datafile copy
input datafile copy RECID=36 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/system.260.962469409
datafile 17 switched to datafile copy
input datafile copy RECID=37 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/sysaux.259.962469409
datafile 18 switched to datafile copy
input datafile copy RECID=38 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/undotbs1.265.962469409
datafile 19 switched to datafile copy
input datafile copy RECID=39 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/undo_2.266.962469409
datafile 20 switched to datafile copy
input datafile copy RECID=40 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/users.267.962469409
datafile 21 switched to datafile copy
input datafile copy RECID=41 STAMP=965848769 file name=/u01/app/oracle/oradata/dupjy/test.269.962469409

contents of Memory Script:
{
   set until scn  13197051;
   recover
   clone database
   skip forever tablespace  "JYPDB":"TEST"    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 20-JAN-18
using channel ORA_AUX_DISK_1

Executing: alter database datafile 15 offline drop
starting media recovery

archived log for thread 1 with sequence 146 is already on disk as file /u01/app/oracle/oradata/arch_dupjy/1_146_961976319.dbf
archived log for thread 1 with sequence 147 is already on disk as file /u01/app/oracle/oradata/arch_dupjy/1_147_961976319.dbf
archived log for thread 2 with sequence 122 is already on disk as file /u01/app/oracle/oradata/arch_dupjy/2_122_961976319.dbf
archived log for thread 2 with sequence 123 is already on disk as file /u01/app/oracle/oradata/arch_dupjy/2_123_961976319.dbf
archived log file name=/u01/app/oracle/oradata/arch_dupjy/1_146_961976319.dbf thread=1 sequence=146
archived log file name=/u01/app/oracle/oradata/arch_dupjy/2_122_961976319.dbf thread=2 sequence=122
archived log file name=/u01/app/oracle/oradata/arch_dupjy/2_123_961976319.dbf thread=2 sequence=123
archived log file name=/u01/app/oracle/oradata/arch_dupjy/1_147_961976319.dbf thread=1 sequence=147
media recovery complete, elapsed time: 00:00:04
Finished recover at 20-JAN-18
Oracle instance started

Total System Global Area    2147483648 bytes

Fixed Size                     8794848 bytes
Variable Size                788532512 bytes
Database Buffers            1342177280 bytes
Redo Buffers                   7979008 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''DUPJY'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
}
executing Memory Script

sql statement: alter system set  db_name =  ''DUPJY'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance started

Total System Global Area    2147483648 bytes

Fixed Size                     8794848 bytes
Variable Size                788532512 bytes
Database Buffers            1342177280 bytes
Redo Buffers                   7979008 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUPJY" RESETLOGS ARCHIVELOG
  MAXLOGFILES    192
  MAXLOGMEMBERS      3
  MAXDATAFILES     1024
  MAXINSTANCES    32
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   1 ( '/u01/app/oracle/oradata/dupjy/group_1.261.961976319' ) SIZE 200 M  REUSE,
  GROUP   2 ( '/u01/app/oracle/oradata/dupjy/group_2.302.961976321' ) SIZE 200 M  REUSE
 DATAFILE
  '/u01/app/oracle/oradata/dupjy/system.317.962209603',
  '/u01/app/oracle/oradata/dupjy/system.256.962209675',
  '/u01/app/oracle/oradata/dupjy/system.271.962209649',
  '/u01/app/oracle/oradata/dupjy/system.260.962469409'
 CHARACTER SET ZHS16GBK

sql statement: ALTER DATABASE ADD LOGFILE

  INSTANCE 'i2'
  GROUP   3 ( '/u01/app/oracle/oradata/dupjy/group_3.263.961976697' ) SIZE 200 M  REUSE,
  GROUP   4 ( '/u01/app/oracle/oradata/dupjy/group_4.262.961976705' ) SIZE 200 M  REUSE

contents of Memory Script:
{
   set newname for tempfile  1 to
 "+DATA";
   set newname for tempfile  2 to
 "+DATA";
   set newname for tempfile  3 to
 "+DATA";
   set newname for tempfile  4 to
 "+DATA";
   switch clone tempfile all;
   catalog clone datafilecopy  "/u01/app/oracle/oradata/dupjy/sysaux.298.962209605",
 "/u01/app/oracle/oradata/dupjy/undotbs1.277.962209605",
 "/u01/app/oracle/oradata/dupjy/sysaux.270.962209675",
 "/u01/app/oracle/oradata/dupjy/users.301.962209605",
 "/u01/app/oracle/oradata/dupjy/undotbs1.296.962209675",
 "/u01/app/oracle/oradata/dupjy/undotbs2.312.962209605",
 "/u01/app/oracle/oradata/dupjy/sysaux.316.962209649",
 "/u01/app/oracle/oradata/dupjy/undotbs1.264.962209649",
 "/u01/app/oracle/oradata/dupjy/undo_2.268.962209649",
 "/u01/app/oracle/oradata/dupjy/users.278.962209649",
 "/u01/app/oracle/oradata/dupjy/sysaux.259.962469409",
 "/u01/app/oracle/oradata/dupjy/undotbs1.265.962469409",
 "/u01/app/oracle/oradata/dupjy/undo_2.266.962469409",
 "/u01/app/oracle/oradata/dupjy/users.267.962469409",
 "/u01/app/oracle/oradata/dupjy/test.269.962469409";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to +DATA in control file
renamed tempfile 2 to +DATA in control file
renamed tempfile 3 to +DATA in control file
renamed tempfile 4 to +DATA in control file

cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/sysaux.298.962209605 RECID=1 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undotbs1.277.962209605 RECID=2 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/sysaux.270.962209675 RECID=3 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/users.301.962209605 RECID=4 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undotbs1.296.962209675 RECID=5 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undotbs2.312.962209605 RECID=6 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/sysaux.316.962209649 RECID=7 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undotbs1.264.962209649 RECID=8 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undo_2.268.962209649 RECID=9 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/users.278.962209649 RECID=10 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/sysaux.259.962469409 RECID=11 STAMP=965848805
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undotbs1.265.962469409 RECID=12 STAMP=965848806
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/undo_2.266.962469409 RECID=13 STAMP=965848806
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/users.267.962469409 RECID=14 STAMP=965848806
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/dupjy/test.269.962469409 RECID=15 STAMP=965848806

datafile 3 switched to datafile copy
input datafile copy RECID=1 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/sysaux.298.962209605
datafile 4 switched to datafile copy
input datafile copy RECID=2 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/undotbs1.277.962209605
datafile 6 switched to datafile copy
input datafile copy RECID=3 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/sysaux.270.962209675
datafile 7 switched to datafile copy
input datafile copy RECID=4 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/users.301.962209605
datafile 8 switched to datafile copy
input datafile copy RECID=5 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/undotbs1.296.962209675
datafile 9 switched to datafile copy
input datafile copy RECID=6 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/undotbs2.312.962209605
datafile 11 switched to datafile copy
input datafile copy RECID=7 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/sysaux.316.962209649
datafile 12 switched to datafile copy
input datafile copy RECID=8 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/undotbs1.264.962209649
datafile 13 switched to datafile copy
input datafile copy RECID=9 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/undo_2.268.962209649
datafile 14 switched to datafile copy
input datafile copy RECID=10 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/users.278.962209649
datafile 17 switched to datafile copy
input datafile copy RECID=11 STAMP=965848805 file name=/u01/app/oracle/oradata/dupjy/sysaux.259.962469409
datafile 18 switched to datafile copy
input datafile copy RECID=12 STAMP=965848806 file name=/u01/app/oracle/oradata/dupjy/undotbs1.265.962469409
datafile 19 switched to datafile copy
input datafile copy RECID=13 STAMP=965848806 file name=/u01/app/oracle/oradata/dupjy/undo_2.266.962469409
datafile 20 switched to datafile copy
input datafile copy RECID=14 STAMP=965848806 file name=/u01/app/oracle/oradata/dupjy/users.267.962469409
datafile 21 switched to datafile copy
input datafile copy RECID=15 STAMP=965848806 file name=/u01/app/oracle/oradata/dupjy/test.269.962469409

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened

contents of Memory Script:
{
   sql clone "alter pluggable database all open";
}
executing Memory Script

sql statement: alter pluggable database all open
Dropping offline and skipped tablespaces
Executing: drop tablespace "TEST" including contents cascade constraints
Finished Duplicate Db at 20-JAN-18

12.检查目标数据库中是否不存在表空间jypdb:test

[oracle@shard1 arch_dupjy]$ export ORACLE_SID=dupjy
[oracle@shard1 arch_dupjy]$ rman target/

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Jan 19 19:21:01 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DUPJY (DBID=1349214878)

RMAN> report schema;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name DUPJY

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    840      SYSTEM               YES     /u01/app/oracle/oradata/dupjy/system.317.962209603
3    2210     SYSAUX               NO      /u01/app/oracle/oradata/dupjy/sysaux.298.962209605
4    570      UNDOTBS1             YES     /u01/app/oracle/oradata/dupjy/undotbs1.277.962209605
5    250      PDB$SEED:SYSTEM      NO      /u01/app/oracle/oradata/dupjy/system.256.962209675
6    340      PDB$SEED:SYSAUX      NO      /u01/app/oracle/oradata/dupjy/sysaux.270.962209675
7    5        USERS                NO      /u01/app/oracle/oradata/dupjy/users.301.962209605
8    100      PDB$SEED:UNDOTBS1    NO      /u01/app/oracle/oradata/dupjy/undotbs1.296.962209675
9    150      UNDOTBS2             YES     /u01/app/oracle/oradata/dupjy/undotbs2.312.962209605
10   270      JYPDB:SYSTEM         YES     /u01/app/oracle/oradata/dupjy/system.271.962209649
11   590      JYPDB:SYSAUX         NO      /u01/app/oracle/oradata/dupjy/sysaux.316.962209649
12   100      JYPDB:UNDOTBS1       YES     /u01/app/oracle/oradata/dupjy/undotbs1.264.962209649
13   100      JYPDB:UNDO_2         YES     /u01/app/oracle/oradata/dupjy/undo_2.268.962209649
14   1267     JYPDB:USERS          NO      /u01/app/oracle/oradata/dupjy/users.278.962209649
16   260      TESTPDB:SYSTEM       YES     /u01/app/oracle/oradata/dupjy/system.260.962469409
17   550      TESTPDB:SYSAUX       NO      /u01/app/oracle/oradata/dupjy/sysaux.259.962469409
18   100      TESTPDB:UNDOTBS1     YES     /u01/app/oracle/oradata/dupjy/undotbs1.265.962469409
19   100      TESTPDB:UNDO_2       YES     /u01/app/oracle/oradata/dupjy/undo_2.266.962469409
20   5        TESTPDB:USERS        NO      /u01/app/oracle/oradata/dupjy/users.267.962469409
21   100      TESTPDB:TEST         NO      /u01/app/oracle/oradata/dupjy/test.269.962469409

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    144      TEMP                 32767       +DATA
2    64       PDB$SEED:TEMP        32767       +DATA
3    137      JYPDB:TEMP           32767       +DATA
4    135      TESTPDB:TEMP         32767       +DATA

到此,关于“如何使用RMAN对CDB中的部分表空间进行复制”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注编程网网站,小编会继续努力为大家带来更多实用的文章!

您可能感兴趣的文档:

--结束END--

本文标题: 如何使用RMAN对CDB中的部分表空间进行复制

本文链接: https://www.lsjlt.com/news/70129.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 如何使用RMAN对CDB中的部分表空间进行复制
    这篇文章主要介绍“如何使用RMAN对CDB中的部分表空间进行复制”,在日常操作中,相信很多人在如何使用RMAN对CDB中的部分表空间进行复制问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望...
    99+
    2024-04-02
  • 如何使用RMAN对CDB中的PDB进行复制
    本篇内容主要讲解“如何使用RMAN对CDB中的PDB进行复制”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“如何使用RMAN对CDB中的PDB进行复制”吧! 1....
    99+
    2024-04-02
  • 使用RMAN备份对Non-CDB中的表按时间点进行恢复
    RMAN使用recover命令来将表或表分区恢复到指定的时间点。为了从RMAN备份中恢复表与表分区,你必须提供以下信息: .要被恢复的表或表分区 .表或表分区要被恢复到的特定时间点 .被恢复的表或...
    99+
    2024-04-02
  • Oracle 12c如何使用RMAN备份对Non-CDB中的表按时间点进行恢复
    小编给大家分享一下Oracle 12c如何使用RMAN备份对Non-CDB中的表按时间点进行恢复,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起...
    99+
    2024-04-02
  • 如何使用RMAN对CDB执行按时间点恢复
    这篇文章给大家分享的是有关如何使用RMAN对CDB执行按时间点恢复的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。使用RMAN对CDB和PDB执行按时间点恢复 RMAN能够对CDB...
    99+
    2024-04-02
  • RMAN中如何使用until time子句对Non-CDB中的表执行按时间点恢复
    这篇文章主要为大家展示了“RMAN中如何使用until time子句对Non-CDB中的表执行按时间点恢复”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“RMAN...
    99+
    2024-04-02
  • 如何使用RMAN备份将Non-CDB中被drop的表恢复到新用户方案与新表空间中
    这篇文章主要介绍如何使用RMAN备份将Non-CDB中被drop的表恢复到新用户方案与新表空间中,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!RMAN使用recover命令...
    99+
    2024-04-02
  • 如何使用RMAN对PDB中的表空间或数据文件执行完全恢复
    小编给大家分享一下如何使用RMAN对PDB中的表空间或数据文件执行完全恢复,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!因为不同PDB中的表空间可以有相同的名字,为了消除这种混淆你必须直接...
    99+
    2024-04-02
  • Oracle 12C如何使用RMAN将Non-CDB中分表的多个分区恢复到新用户方案中
    这篇文章主要介绍了Oracle 12C如何使用RMAN将Non-CDB中分表的多个分区恢复到新用户方案中,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起...
    99+
    2024-04-02
  • 如何对Oracle分区表进行表空间迁移并处理
    这篇文章主要讲解了“如何对Oracle分区表进行表空间迁移并处理”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何对Oracle分区表进行表空间迁移并处理”...
    99+
    2024-04-02
  • 如何使用RMAN对PDB执行按时间点恢复
    小编给大家分享一下如何使用RMAN对PDB执行按时间点恢复,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!对PDB执行按时间点恢复...
    99+
    2024-04-02
  • html中如何使用pre标签对空行和空格进行控制
    这篇文章主要为大家展示了“html中如何使用pre标签对空行和空格进行控制”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“html中如何使用pre标签对空行和空格...
    99+
    2024-04-02
  • Oracle 12C使用UNTIL SEQUENCE子句对Non-CDB中的表执行按时间点恢复
    Oracle 12C使用UNTIL SEQUENCE子句对Non-CDB中的表执行按时间点恢复执行操作如下 1.对整个Non-CDB(orcl)生成RMAN备份 RMAN> backup as...
    99+
    2024-04-02
  • Oracle 12C如何使用RMAN将Non-CDB多个用户方案中的多个表或表分区恢复到新用户方案中
    这篇文章主要介绍Oracle 12C如何使用RMAN将Non-CDB多个用户方案中的多个表或表分区恢复到新用户方案中,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!Oracle 12C...
    99+
    2024-04-02
  • 如何在Oracle中进行空间管理和表分区维护
    在Oracle中进行空间管理和表分区维护可以通过以下步骤进行: 空间管理: 使用表空间来管理数据库中的数据文件,可以创建、修改...
    99+
    2024-04-09
    Oracle
  • 如何在Mysql数据表中使用蠕虫进行复制
    本文章向大家介绍如何在Mysql数据表中使用蠕虫进行复制,主要包括如何在Mysql数据表中使用蠕虫进行复制的使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。首先...
    99+
    2024-04-02
  • 如何对Linux上使用LUKS加密的部分进行备份
    这篇文章主要讲解了“如何对Linux上使用LUKS加密的部分进行备份”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何对Linux上使用LUKS加密的部分进行备份”吧!一个解决方案: Bds...
    99+
    2023-06-12
  • 怎么用冷拷贝表空间的形式进行Oracle部分数据迁移
    这篇文章主要介绍“怎么用冷拷贝表空间的形式进行Oracle部分数据迁移”,在日常操作中,相信很多人在怎么用冷拷贝表空间的形式进行Oracle部分数据迁移问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操...
    99+
    2024-04-02
  • 数据库中如何使用裸设备之对表空间扩展大小或创建表空间
    小编给大家分享一下数据库中如何使用裸设备之对表空间扩展大小或创建表空间,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧! 1.查看表空间对应的数据文件路径selec...
    99+
    2024-04-02
  • 如何使用C#中的List.Sort函数对列表进行排序
    如何使用C#中的List.Sort函数对列表进行排序在C#编程语言中,我们经常需要对列表进行排序操作。而List类的Sort函数正是为此设计的一个强大工具。本文将介绍如何使用C#中的List.Sort函数对列表进行排序,并提供具体的代码示例...
    99+
    2023-11-17
    C# list sort
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作