Skip to Main Content
  • Questions
  • Best practice for sharing the data between PDBs in a multitenant environment

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Michael.

Asked: May 01, 2020 - 2:31 pm UTC

Last updated: December 09, 2022 - 4:02 am UTC

Version: 19.3

Viewed 10K+ times! This question is

You Asked

Dear Friends,
Could you clarify the best practice for sharing the data between PDBs in a multitenant environment. Is there a way to set up a PDB so that can see some data in another PDB without using database links?
Thank you in advance,
-Michael

and Connor said...

Well....there's a lot of options here at your disposal. I'll add some links for more thorough reading but you've got:

1) CONTAINERS clause. Lets you query multiple containers with a single query

2) Application Containers. A mechanism of having shared data in a common pluggable which is a "parent" to other pluggables that have their own data

3) Snapshot clone. Take a thinly provisioned copy of a pluggable either in same container or across container. So you might look at that for point-in-time copies of data from other containers

4) Refreshable clones. Static or automiatically refreshed clones

and of course, given that a pluggable is still just "like a database" there are still options such as materialized views etc, but of course, these are based around database links.

More reading


https://www.oracle.com/technetwork/database/multitenant/overview/multitenant-wp-12c-2078248.pdf

Patrick Wheeler did a great series on multitenant which you can find here

https://www.youtube.com/watch?v=nlsVhiWbCBE&list=PLdtXkK5KBY54dp_yOzKo2S34Ney-vPFCs


Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Proxy PDB ?

Rajeshwaran, Jeyabal, May 05, 2020 - 11:55 am UTC

Is that a Proxy PDB feature doesn't come into this list?
Connor McDonald
May 07, 2020 - 4:18 am UTC

Well....there's a lot of options here at your disposal.

What about sharing only a table or view from one PDB to another?

Michael M., May 06, 2020 - 1:47 am UTC

For this scenario, it seems like database links are still the only way to go. Am I correct?
Thank you again.
Connor McDonald
May 07, 2020 - 4:22 am UTC

Hard to say without full detrails, but here's the proxy example Rajesh referred to

https://oracle-base.com/articles/12c/multitenant-proxy-pdb-12cr2


Any way to see that Patrick Wheeler series?

Doug Cowles, December 07, 2022 - 1:11 am UTC

The Patrick Wheeler series is marked "private" on youtube. Any way to watch it?
Connor McDonald
December 09, 2022 - 4:02 am UTC

I will make some enquiries

More to Explore

Multitenant

Need more information on Multitenant? Check out the Multitenant docs for the Oracle Database