how to find data files of pluggable database(oracle)

I have a pluggable database.I need to find locations where the data file of this pluggable db reside? Is there any command I can execute? I actually don't remember if I had specified the data file when I created the pluggable db.

Some guidance is appreciated.

2 Answers

If a default template for PDB is used the PDB data files are by default created in a folder named the same as PDB database which resides in CDB database folder.

If you are connected to CDB datababase you can see all data files for both container and pluggable databases in CDB_DATA_FILESview. If you are connected to to pluggable datatabase with CDB account you can switch between CDB and PDBS using ALTER SESSION SET CONTAINER = <pdb_name> and ALTER SESSION SET CONTAINER = CDB$ROOT and respective views in data dictionary will return the data related to active container.

Is also good to know content of CON_ID column available in many views.

  • 0 - all databases combined
  • 1 - container database
  • 2 - seed for pluggable databases
  • 3 - 254 - pluggable database

You can also include CON_ID column to database objects using special function CONTAINERS: SELECT * FROM CONTAINERS(<table or view>)

9

Login to the pluggable database and just query dba_data_files.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like