• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

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

by admin

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;

2. 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;

3. SCP the backup-piece and PDB metadata files to the destination.

4. 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;
/

5. 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';

6. 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.

Filed Under: oracle, oracle 12c

Some more articles you might also be interested in …

  1. How Do You Read the JMS File Store .DAT file
  2. Oracle ASM 12c – New Features with examples
  3. How To Change SYS user password for oracle database instance
  4. How to Termibate a Session on a Specific Instance of Oracle RAC
  5. How to Startup/Shutdown PDB’s in Oracle Database 12c
  6. Understanding Device Persistence and Oracle ASMLib
  7. ORA-16713: The Oracle Data Guard broker command timed out When Changing LogXptMode
  8. How to Find OCR Master Node
  9. How to Extend ocfs2 Filesystem with tunefs.ocfs2 Command (Whole device used without partitions)
  10. SLES 12: Database Startup Error with ORA-27300 ORA-27301 ORA-27303 While Starting using Srvctl

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright