• 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

How To Find Creation Time of Oracle Pluggable Database (PDB)

by admin

Below query can be used to for PDB creation/cloning time.

COLUMN DB_NAME FORMAT A10
COLUMN CON_ID FORMAT 999
COLUMN PDB_NAME FORMAT A15
COLUMN OPERATION FORMAT A16
COLUMN OP_TIMESTAMP FORMAT A10
COLUMN CLONED_FROM_PDB_NAME FORMAT A15
 
SELECT DB_NAME, CON_ID, PDB_NAME, OPERATION, OP_TIMESTAMP, CLONED_FROM_PDB_NAME
  FROM CDB_PDB_HISTORY
  WHERE CON_ID > 2
  ORDER BY CON_ID;

Here is a sample output of the query:

DB_NAME    CON_ID PDB_NAME        OPERATION        OP_TIMESTA CLONED_FROM_PDB
---------- ------ --------------- ---------------- ---------- ---------------
NEWCDB     3      HRPDB           CREATE           10-APR-12  PDB$SEED
NEWCDB     4      SALESPDB        CREATE           17-APR-12  PDB$SEED
NEWCDB     5      TESTPDB         CLONE            30-APR-12  SALESPDB

For specific PDB

You can find the creation or cloning time for a specific pluggable database by using the below query:

SELECT DB_NAME, CON_ID, PDB_NAME, OPERATION, OP_TIMESTAMP, CLONED_FROM_PDB_NAME
  FROM CDB_PDB_HISTORY
  WHERE CON_ID = [conainer ID];

Replace the container ID in the above query with the container ID for which you want the creation time.

Filed Under: 18c, oracle, oracle 12c

Some more articles you might also be interested in …

  1. Basic SELECT Statement in PL/SQL
  2. Oracle Automatic Storage Management (ASM) concepts
  3. How To Change A Dictionary Managed Tablespace To A Locally Managed Tablespace
  4. Database Crashed With ORA-19815, ORA-19809, ORA-16038
  5. How do we Set A Retention Policy For Tape Backups And Disk Backups Differently
  6. Oracle Interview Questions – Flash Recovery Area
  7. How an SQL query is executed in Oracle Database
  8. 12c ASM: PRCR-1001 : Resource ora.proxy_advm Does Not Exist (Flex ASM with Cardinality = ALL)
  9. How to convert NON-OMF to OMF files ( Oracle Managed File conversion – NON-ASM )
  10. How to shrink a Temporary Tablespace datafile in Oracle

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright