Showing posts with label Pluggable Database. Show all posts
Showing posts with label Pluggable Database. Show all posts

Saturday, 1 February 2025

Relocate a PDB from SOURCE to TARGET CDB

How to relocate a pluggable database (PDB) from 1 Container database (CDB) to another CDB?

This article talk about PDB relocation i.e. simply migrating and attaching a PDB from 1 CDB to another CDB. The process is almost similar to a normal PDB clone but since we are migrating a DB here so there are variations as well.

For this exercise, I am using Oracle 19c, with 2 CDBs named CDB1, running on 2 separate VMs. Here is the simple picture,

Saturday, 18 January 2025

Using EXPDP to export a Pluggable Database (PDB)

You can export a pluggable database just like you would export a non-container database or even a container database for that matter. But normally container data is supposed to collect metadata & dictionary information for all PDBs and not the user/application data.

If you haven't configured LISTENER.ORA or TNSNAMES.ORA for PDB, it would be good time to do it now.

Wednesday, 15 January 2025

Cloning a non-container database (non-CDB) to pluggable database (PDB)

Converting a non-CDB to PDB is very easy, thanks to DBMS_PDB package provided by Oracle from 12c onwards. DBMS_PDB allows to you create an XML and generate the metadata for non-CDB just like you'll create it when you unplug any PDB.

Sunday, 12 January 2025

Clone PDB from a Remote PDB using DB Link

In this article we are going to create a pluggable database from an existing PDB on another remote server belonging so some other container database.

  • Local Machine: oravm19c.practice.com
  • Remote Machine: oravm19c-2.practice.com
  • Container database on both VMs: CDB1
  • Pluggable database on remote machine under CDB1: PDB1

Friday, 10 January 2025

ORA-65086: cannot open/close the pluggable database

This error indicates that there's something stopping you from opening a pluggable database. Mostly it happens when you have already unplugged your PDB which you are trying to open.

It can happen if someone else has done it but you are not aware of it. To verify the same, you can use the below query to see if this is the case for you.

Plugin a pluggable database (PDB) to a CDB manually

Plugging a pluggable database (PDB) to a container database (CDB) is just like creating a new PDB. It's always good to check PDB compatibility before you start plugging it.

If you are aware of DB version from where the PDB is unplugged and if it's the same version, you can choose to skip this check. But I would still recommend doing it as it won't take much time.

Thursday, 9 January 2025

How to Create, Unplug and Drop a Pluggable Database (PDB) manually?

The multitenant feature introduced in Oracle Database 12c enables a container database (CDB) to manage several distinct pluggable databases (PDBs). This article discusses the available options for creating, unplugging, or dropping a pluggable database within an existing container database.

To begin with, ensure you are connected to ROOT container.

SQL> alter session set container = CDB$ROOT;

Session altered.