Skip to main content

OOW2012 - The Oracle Database 12c: The Pluggable Database

To me, one of the biggest announcements this week was not that Larry finally learnt how to use a clicker, but the disclosure of some of the new features of the next version of the Oracle Database. This version is also the "first real multi-tenant database". So what does this mean?
In the current version of the database the core Oracle data dictionary is mixed up with the tables, packages etc you created yourself. All information is stored in the same obj$, tab$ and source$ tables. In 12c there is an architectural separation between the core Oracle system and your own application. The core Oracle data dictionary is called the Container Database (CDB). The part of the database that contains your own code is called the Pluggable Database (PDB). This PDB also contains its own datadictionary with it own obj$, tab$ etc tables. So it is a sort of hierarchy: objects are first located in the PDB, when they're not found there, information from the CDB is retrieved. 
The best thing is, you can plugin many PDB's into one CDB. And so creating a true separation of data and sources between two databases that are plugged in into one CDB. It is obvious that both the CDB and the PDB have a much smaller footprint than a database containing both. So upgrading the Oracle software will be done on the CDB only and will be much faster. Cloning a PDB - containing your application - can be done way faster because you don't need to clone all the core Oracle stuff
Implementation under the covers is done using transportable tablespaces with data and metadata. This architecture also implies there are different types of users: local users in a PDB and a common user in the CDB. A PDB can be administered by a privileged local user, the metadata about the PDBs are administered by the common user. And any privileged user can switch between PDBs. Every PDB has a default service with its name. Service names across the CDB hav to be unique within the CDB. And you can define database links between PDBs.
You can imagine that creating a new, empty, PDB is 1000 times faster than creating a whole new database...

From an APEX point of view this implies that you actually can run multiple versions of APEX in one database - as long as every APEX version runs in a separate PDB!

Comments

Martin Berger said…
Roel,
thank you for this first details.
Just a short question: from a CBDs view, is there only one obj$ which holds all the objects of itself and all the PDBs, or is there it's own obj$ and a set of different PDB1.obj$, PDB2.obj$, PDB3.obj$?
Roel Hartman said…
AFAIK the PDB has it's own set of (local) obj$ etc tables containing only the local stuff - and not the core Oracle ones (and certainly not the information of the other PDB's)
Huber said…
I'm oracle dba, but i kown sql-server and i think this part feature is same to sql-server
DanyC said…
Indeed Huber - MS SQL has this feature since 2k version and personally i'm still trying to understand how the tunning/ different oracle version will work with this new feature? Maybe there are good pros but a lot of cons as well.

@Roel - any view on the points i raised?

Thx a lot,
DaniC
Roel Hartman said…
Using this feature you can easily transport applications (in one PDB) from one environment to another by "plug and play". Also upgrading is more simple. Once you have a 12.x.x CDB, you can plug in any older PDB and it's upgraded on the spot. And creating a "Database" (PDB in this case) is a matter of seconds....
DanyC said…
This are good pros for sure but i still don't see how will work from tunning side.

Say you have a live PDB and you have to investigate a performance issue,you "plug & play" into Dev CDB but

a) you won't have the same env since will be different stats/ plans
b) if you collect stats you might affect performance of all the others PDBs

DaniC
Roel Hartman said…
I am not sure, a I haven't got the chance to play with it, but I think tuning won't be much different. Statistics and plans are in the PDB, so you could clone a production PDB and plug it in elsewhere to investigate an issue (but the hardware may be different though). It looks like it will be easier than nowadays....
Anonymous said…
Read more insights on Oracle 12c PDB here:
http://www.dadbm.com/2013/02/oracle-12c-pluggable-database-plug-unplug-and-clone/

-- Kirill Loifman

Popular posts from this blog

apex_application.g_f0x array processing in Oracle 12

If you created your own "updatable reports" or your custom version of tabular forms in Oracle Application Express, you'll end up with a query that looks similar to this one:
then you disable the "Escape special characters" property and the result is an updatable multirecord form.
That was easy, right? But now we need to process the changes in the Ename column when the form is submitted, but only if the checkbox is checked. All the columns are submitted as separated arrays, named apex_application.g_f0x - where the "x" is the value of the "p_idx" parameter you specified in the apex_item calls. So we have apex_application.g_f01, g_f02 and g_f03. But then you discover APEX has the oddity that the "checkbox" array only contains values for the checked rows. Thus if you just check "Jones", the length of g_f02 is 1 and it contains only the empno of Jones - while the other two arrays will contain all (14) rows. So for processing y…

Dockerize your APEX development environment

Nowadays Docker is everywhere. It is one of the main components of Continuous Integration / Continuous Development environments. That alone indicates Docker has to be seen more as a Software Delivery Platform than as a replacement of a virtual machine.

However ...

If you are running an Oracle database using Docker on your local machine to develop some APEX application, you will probably not move that container is a whole to test and production environments. Because in that case you would not only deliver a new APEX application to the production environment - which is a good thing - but also overwrite the data in production with the data from your development environment. And that won't make your users very excited.
So in this set up you will be using Docker as a replacement of a Virtual Machine and not as a Delivery Platform.
And that's exactly the way Martin is using it as he described in this recent blog post. It is an ideal way to get up and running with an Oracle database …

Refresh selected row(s) in an Interactive Grid

In my previous post I blogged about pushing changed rows from the dabatase into an Interactive Grid. The use case I'll cover right here is probably more common - and therefore more useful!

Until we had the IG, we showed the data in a report (Interactive or Classic). Changes to the data where made by popping up a form page, making changes, saving and refreshing the report upon closing the dialog. Or by clicking an icon / button / link in your report that makes some changes to the data (like changing a status) and ... refresh the report.  That all works fine, but the downsides are: The whole dataset is returned from the server to the client - again and again. And if your pagination size is large, that does lead to more and more network traffic, more interpretation by the browser and more waiting time for the end user.The "current record" might be out of focus after the refresh, especially by larger pagination sizes, as the first rows will be shown. Or (even worse) while you…