standby_pdb_source_file_directory参数设置

举报
snowofsummer 发表于 2021/05/27 09:06:10 2021/05/27
【摘要】 主备数据库参数设置:SQL> alter system set db_create_file_dest='/data';System altered. 备数据设置:SQL> alter system set standby_pdb_source_file_directory='/data/bak';System altered.源数据库拔掉数据库:SQL> alter pluggable d...

主备数据库参数设置:

SQL> alter system set db_create_file_dest='/data';

System altered.

 备数据设置:

SQL> alter system set standby_pdb_source_file_directory='/data/bak';

System altered.

源数据库拔掉数据库:

SQL> alter pluggable database PDB01 unplug into '/data/bak/pdb05.xml';

Pluggable database altered.


RMAN> backup as copy pluggable database PDB01 format '/data/bak/%U';

Starting backup at 27-MAY-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00160 name=/data/CDB01/C34CF47354B60C74E053E603A8C09334/datafile/o1_mf_sysaux_jbyqs83r_.dbf
output file name=/data/bak/data_D-CDB01_I-1610045937_TS-SYSAUX_FNO-160_2kvvtnr2 tag=TAG20210527T170538 RECID=7 STAMP=1073667942
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00159 name=/data/CDB01/C34CF47354B60C74E053E603A8C09334/datafile/o1_mf_system_jbyqs837_.dbf
output file name=/data/bak/data_D-CDB01_I-1610045937_TS-SYSTEM_FNO-159_2lvvtnr9 tag=TAG20210527T170538 RECID=8 STAMP=1073667947
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00161 name=/data/CDB01/C34CF47354B60C74E053E603A8C09334/datafile/o1_mf_undotbs1_jbyqs83s_.dbf
output file name=/data/bak/data_D-CDB01_I-1610045937_TS-UNDOTBS1_FNO-161_2mvvtnrc tag=TAG20210527T170538 RECID=9 STAMP=1073667949
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 27-MAY-21

Starting Control File and SPFILE Autobackup at 27-MAY-21
piece handle=/u01/app/19.3/dbs/c-1610045937-20210527-01 comment=NONE
Finished Control File and SPFILE Autobackup at 27-MAY-21

主数据库执行插入操作:

SQL> create pluggable database pdb002 as clone using '/data/bak/pdb05.xml' copy;

Pluggable database created.

检查备日志:

2021-05-27T17:11:10.104999+08:00
PR00 (PID:3265): Media Recovery Log /u01/app/19.3/dbs/arch1_91_1073060659.dbf
Resize operation completed for file# 3, old size 890880K, new size 901120K
Recovery created pluggable database PDB002
Recovery attempting to copy datafiles for pdb-PDB002 from           source dir-/data/bak
2021-05-27T17:11:11.265501+08:00
Recovery copied files for tablespace SYSTEM
Recovery successfully copied file /data/SBCDB01/86B637B62FDF7A65E053F706E80A27CA/datafile/o1_mf_system_jbyrh5tp_.dbf from /data/bak/data_D-CDB01_I-1610045937_TS-SYSTEM_FNO-159_2lvvtnr9
PDB002(4):Successfully added datafile 162 to media recovery
PDB002(4):Datafile #162: '/data/SBCDB01/86B637B62FDF7A65E053F706E80A27CA/datafile/o1_mf_system_jbyrh5tp_.dbf'
2021-05-27T17:11:12.917534+08:00
Recovery copied files for tablespace SYSAUX
Recovery successfully copied file /data/SBCDB01/C34D1F8D75D42161E053E603A8C09D4F/datafile/o1_mf_sysaux_jbyrh5tr_.dbf from /data/bak/data_D-CDB01_I-1610045937_TS-SYSAUX_FNO-160_2kvvtnr2
PDB002(4):Successfully added datafile 163 to media recovery
PDB002(4):Datafile #163: '/data/SBCDB01/C34D1F8D75D42161E053E603A8C09D4F/datafile/o1_mf_sysaux_jbyrh5tr_.dbf'
2021-05-27T17:11:13.933785+08:00
Recovery copied files for tablespace UNDOTBS1
Recovery successfully copied file /data/SBCDB01/C34D1F8D75D42161E053E603A8C09D4F/datafile/o1_mf_undotbs1_jbyrh5ts_.dbf from /data/bak/data_D-CDB01_I-1610045937_TS-UNDOTBS1_FNO-161_2mvvtnrc
PDB002(4):Successfully added datafile 164 to media recovery
PDB002(4):Datafile #164: '/data/SBCDB01/C34D1F8D75D42161E053E603A8C09D4F/datafile/o1_mf_undotbs1_jbyrh5ts_.dbf'
PR00 (PID:3265): Media Recovery Waiting for T-1.S-92 (in transit)

 

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。