暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle 12.2 : RMAN Cross-Platform Transport of PDB into Destination CDB

原创 liaju 2022-02-17
490

Introduction and Pre-requisites

Using RMAN, Pluggable database (PDBs) can be transported and plugged into a destination multitenant container database (CDB) which is on a different platform than the source CDB. In addition to the backup of the PDB, RMAN also copies the metadata required to plug the PDB into the destination CDB. The source CDB and the destination CDB must use the same endian format.

Below steps show migration of closed PDB from source platform Solaris (Big Endian) to AIX (Big Endian)

SQL> select name,open_mode,platform_name from v$database;

Source:

NAME      OPEN_MODE     PLATFORM_NAME
--------- ------------- ------------------------
SRC122    READ WRITE    Solaris[tm] OE (64-bit)

Destination:

NAME      OPEN_MODE    PLATFORM_NAME
--------- ------------ ---------------------------
DEST122   READ WRITE   AIX-Based Systems (64-bit) 

Migration Steps

  1. Close the source pdb:
SQL> alter pluggable database PDB1 close immediate;
  1. Backup the source PDB:
RMAN> backup for transport
2> unplug into '/bugmnt7/ap/celcsol2/SR1.12121212121/oradata/backup/PDB1_Metadata.xml'
3> format '/bugmnt7/ap/celcsol2/SR1.12121212121/oradata/backup/PDB1_BKP_%U'
4> pluggable database PDB1;
  1. SCP the backup-piece and PDB metadata files to the destination.

  2. Check on destination whether the PDB can be plugged in using dbms_pdb.check_plug_compatibility.

set serveroutput on
declare
c boolean;
begin
c:=dbms_pdb.check_plug_compatibility('/home/bugmnt/oradata/backup/PDB1_Metadata.xml','PDB1');
if (c) then dbms_output.put_line('True');
else dbms_output.put_line('False');
end if;
end;
/
  1. Restore the PDB on destination:
RMAN> restore using '/home/bugmnt/oradata/backup/PDB1_Metadata.xml'
2> foreign pluggable database PDB1
3> format '/home/bugmnt/oradata/DEST122/%U'
4> from backupset '/home/bugmnt/oradata/backup/PDB1_BKP_02s9sj0u_1_1';
  1. Open the pluggable database PDB1 on destination:
SQL> alter pluggable database PDB1 open;

Conclusion

This post covers PDB cross platform migration strategy using consistent backups i.e. the PDB is closed prior to backup. To reduce downtime, migration can also be achieved using inconsistent backups where, PDB level 0 backup is taken using clauses FOR TRANSPORT and ALLOW INCONSISTENT while the PDB is open in READ WRITE mode. Thereafter, PDB can be closed and a level 1 backup can be performed using FROM SCN clause and UNPLUG INTO (new in 12.2) clause to perform a final level 1 and also get the PDB metadata.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论