How to Find all Physicals Files in Multitenant Architecture CDB and PDB DATABASE in Oracle

September 21, 2021
()

How to Find all Physicals Files in Multinanent Architecture CDB and PDB DATABASE in Oracle


Below is the command, how to find all physical files in Oracle in one short (control files, datafiles & redolog files) in the multitenant architecture CDB and PDB in the database.

Option 1: Connect to container database CDB$ROOT and fetch all physical files in one short which includes CDB (Root Container) & all PDBs (Pluggable DBs). Click here to get a sample output of it.

SHOW CON_NAME

COL NAME FOR A60
SET PAGES 999

SELECT NAME FROM V$CONTROLFILE
UNION
SELECT FILE_NAME FROM CDB_DATA_FILES
UNION
SELECT FILE_NAME FROM  CDB_TEMP_FILES
UNION
SELECT MEMBER FROM V$LOGFILE;
prompt $$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$


Option 2: Connect to any specific pluggable database (PDB) or root container (CBD) and fetch all physical files. Click here to get a sample output of it.

SHOW PDBS

ALTER SESSION SET CONTAINER = DBSGURU_PDB;

SHOW CON_NAME

COL NAME FOR A60
SET PAGES 999

SELECT NAME FROM V$CONTROLFILE
UNION
SELECT FILE_NAME FROM DBA_DATA_FILES
UNION
SELECT FILE_NAME FROM DBA_TEMP_FILES
UNION
SELECT MEMBER FROM V$LOGFILE;
prompt $$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$


NOTE: Above option will fetch physical files from connected container DB only.

Question: Why do we need all physical files together?

Answer: Whenever we do decommission / clone / migration / restore etc.


We always encourage the technical person to visit 
section SCRIPTS to get more daily usage SQL commands.

https://dbsguru.com/how-to-find-all-physicals-files-in-cdb-pdb-in-oracle/

Hope so you like this Script
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the latest update. Click here to know more about our pursuit.



Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

<strong>Hello and welcome to DBsGuru,</strong>DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!<strong>Share Learn Grow!</strong>

Leave a Reply

Your email address will not be published. Required fields are marked *