Showing posts with label Refreshable PDBs. Show all posts
Showing posts with label Refreshable PDBs. Show all posts

Wednesday, April 28, 2021

Multitenant Part 4 : PDB Relocation

Multitenant Part 4 : PDB Relocation

Online PDB relocation,

PDB Relocation is the fastest way to move a PDB with minimal or nearer to no down time. Otherwise, plugging and unplugging PDBs require outage means downtime is required.








Target Database Server
  • Add tns entry of source database and create database link to connect to source database.
  • There should be a common user in Source Database
  • Grant privileges to common user i.e. create session and create pluggable database to all.
CREATE DATABASE LINK prod_link CONNECT TO c##clone_user IDENTIFIED BY  clone_user USING 'PROPDB1';

Once we are done with these prerequisites, only few commands need to run after that to complete the task.

On target database server run following command,

CREATE PLUGGABLE DATABASE PROPDB1 FROM PROPDB1@prod_link RELOCATE;

When you run this command, it executes a hot clone of source PDB from its original location to its target location. The source PDB copies data files, undo blocks, and redo blocks to the target PDB upto the SCN marked for it.

When this step completes, two transactional consistent copies of this PDB exist: one in the source CDB and one in the target CDB . during this operation, transaction continues uninterrupted on the source PDB. Users or applications connected to the source PDB are unaware that a relocation is happening behind the scene.

All existing application connections, and new connections created during this step, continue to connect to the source PDB.

When you issues ALTER PLUGGABLE DATABASE OPEN command
  • The target PDB implicitly sets the end SCN marker, and applies any redo or undo required to complete media recovery to satisfy the implicit end SCN marker.
  • When media recovery occurs on the target PDB, Oracle Database initiates active session draining on the source PDB.
  • PDB services are registered with the listener and are available on the target CDB.
  • The source PDB is closed.
  • The target PDB opens in read/write mode.
Relocation in Different Listener Networks

AVAILABILITY MAX
Here, at additional step, you need to reconfigure the original listener.
If a local listener redirects to a Single Client Access Name (SCAN) listener in an Oracle RAC configuration, thn you need to add parameter in each node listener file.
And parameter name is,
ALLOW_MULTIPLE_REDIRECTS_LISTENER_SCAN1=YES


I hope, this helps you to perform PDB relocation in very simple steps.




Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert

Thursday, July 2, 2020

Oracle Groundbreakers Yatra 2020 - Online Webinar Series

Oracle Groundbreakers Yatra 2020 - Online Webinar Series



AIOUG is largest Oracle users group. In Oracle Groundbreakers Yatra 2020 (OGYatra) webinar series, they are covering 125+ hours of learning sessions in 14 days, 100+ speakers, including Oracle Gurus, Oracle ACE and Java Champions.

It's my pleasure that I am also part of this #OGYatra webinar series and get a chance to speak and share my knowledge to large audience across the world. Many Thanks to Sai Penumuru and AIOUG team for great support.

Join me on 16th July at 11:30am and let's discuss on Oracle Multi-Tenant Architecture and it's Feature with Live Demo.

Specially, I will try to cover following features in Live Demo,
'- Monitoring of CDB/PDBs
'- Hot Clone PDB Databases
'- Plug-Unplug PDBs from one CDB to another and non-CDB to CDB
'- Refreshable PDBs 
'- PDB Snapshot carousel




Looking forward for your participation.
And Thank you in advance for joining me. See you all soon.



Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert