Oracle 12cR2 ( New Features ): Near-Zero Downtime PDB Relocation

ByJoel Pérez ( Oracle ACE Director )

Oracle 12cR2 ( New Features ): Near-Zero Downtime PDB Relocation

Hi Readers

To get the same result as unplugging and plugging a PDB from a remote source CDB into another CDB, you can take advantage of the Oracle Database 12.2 feature such as near-zero downtime PDB relocating.

In Oracle Database 12.1, unplugging and plugging a PDB requires several steps such as unplugging the PDB from the source CDB, copying the database files to a new location, creating the new PDB by plugging the source PDB at the target CDB, and finally dropping the PDB from the source CDB.

A single DDL statement can relocate a PDB, using the “pull” mode, connected to the CDB where the PDB will be relocated to pull it from the CDB where the PDB exists, managing draining existing connections and migrating new connections without requiring any changes to the application.

There are two relocation methods: • Normal availability mode

  • −  When the newly created PDB is opened in read-write mode for the first time, the source PDB is automatically closed and dropped, and the relocation operation is completed with the relocated PDB being fully available. This is the “normal availability” default mode.

  • −  This method can be used to relocate application PDBs too.

  • Maximum availability mode

    • −  The maximum availability mode reduces application impact by handling the migration of connections, preserving the source CDB in mount state to guarantee connection forwarding of the listener to the remote listener where the PDB is relocated. In this case, you cannot create a PDB with the same name as the source PDB because it will conflict with the listener forwarding. It is expected that connect strings are updated at a time that is convenient for the application. After this is done and all the clients connect to the new host without forwarding, the DBA can drop the source PDB.

    • −  If AVAILABILITY MAX is specified during the CREATE PLUGGABLE DATABASE RELOCATE command, additional handling is performed to ensure smooth migration of workload and persistent connection forwarding from the source to the target. The PDB is always first opened in read-only mode. This makes the PDB available as a target for new connections before the source PDB is closed. During this operation, listener information of the target CDB is automatically sent to the source and a special forwarding registration is performed with the source PDB’s current listener. New connections to the existing listener are automatically forwarded to connect to the new target. This forwarding persists even after the relocation operation has been completed, and effectively allows for no changes to connect strings.

    • −  It is still recommended that connect strings are updated eventually at a time that is convenient for the application, but availability is not dependent on when this action is performed.

      PDB relocation requires enabling the local UNDO mode and ARCHIVELOG mode in both CDBs.

We hope the content could useful for your Oracle DBA Tasks!

This article is brought by Yunhe Enmo (Beijing) Technology Co.,LTD

Follow our Company in Linkedin:

Subscribe to our Blog and enjoy our Weekly Cloud article..!

About the author

Joel Pérez ( Oracle ACE Director ) administrator

1 Comment so far

Oracle 12c R2 ( New Features ): NEAR-ZERO DOWNTIME PDB RELOCATION – Toad World BlogPosted on6:28 am - Jun 20, 2018

[…] For Reading, Click Here: […]

Leave a Reply