Infrastructure at your Service

multitenant Archives - Blog dbi services

Oracle Team

18c PDB switchover

By | Oracle | No Comments

By Franck Pachot . In multitenant, the recovery and availability are at CDB level. But customers asked for a switchover at PDB level so Oracle has done that in 18c, based on refreshable PDBs. For this test I have two multitenant database on an Oracle Cloud service in 18c: CDB1 and CDB2. The only special thing I did was disable the mandatory TDE encryption, because I was not able to have the switchover working. With…

 
Read More
Oracle Team

12cR2 PDB archive

By | Oracle | No Comments

By Franck Pachot . In 12.1 we had the possibility to unplug a PDB by closing it and generating a .xml file that describes the PDB metadata required to plug the datafiles into another CDB. In 12.2 we got an additional possibility to have this .xml file zipped together with the datafiles, for an easy transport. But that was not working for ASM files. The latest Release Update, Oct 17 includes the patch that fixes…

 
Read More
Oracle Team

Multitenant, PDB, ‘save state’, services and standby databases

By | Oracle | No Comments

By Franck Pachot . Creating – and using – your own services has always been the recommendation. You can connect to a database without a service name, though the instance SID, but this is not what you should do. Each database registers its db_unique_name as a service, and you can use it to connect, but it is always better to create your own application service(s). In multitenant, each PDB registers its name as a service,…

 
Read More
Oracle Team

Unplug an Encrypted PDB (ORA-46680: master keys of the container database must be exported)

By | Oracle | No Comments

By Franck Pachot . In the Oracle Database Cloud DBaaS you provision a multitenant database where tablespaces are encrypted. This means that when you unplug/plug the pluggable databases, you also need to export /import the encryption keys. You cannot just copy the wallet because the wallet contains all CDB keys. Usually, you can be guided by the error messages, but this one needs a little explanation and an example.  

 
Read More
Oracle Team

12c Multitenant internals: PDB replay DDL for common users

By | Oracle | No Comments

By Franck Pachot . In multitenant, you can create common Users, Roles, and Profiles. You create them in CDB$ROOT, with the CONTAINER=ALL clause (which is optional because it is the only possible value when connected to CDB$ROOT) but they are visible to all containers. As the goal of multitenant is to avoid to duplicate common metadata to all containers, You may think that they are visible through those magic metadata links. But that’s actually wrong:…

 
Read More
Oracle Team

Drop PDB including datafiles may keep files open

By | Oracle | No Comments

By Franck Pachot . I like that Oracle drops the datafiles from the operating system when we remove them from the database (with drop tablespace or drop pluggable database) because I don’t like to have orphean files remaining in the filesystem. However, to ensure that space is reclaimed, we must be sure that Oracle did not leave a process with this file opened. Linux allows to drop an open file but then drops only the…

 
Read More
Oracle Team

12c Multitenant Internals: compiling system package from PDB

By | Oracle | No Comments

By Franck Pachot . When I explain the multitenant internals, I show that all metadata about system procedures and packages are stored only in CDB$ROOT and are accessed from the PDBs through metadata links. I take an example with DBMS_SYSTEM that has nothing in SOURCE$ of the PDB. But I show that we can compile it from the PDB. This is my way to prove that the session can access the system objects, internally switching…

 
Read More
Oracle Team

Multitenant internals: INT$ and INT$INT$ views

By | Oracle | No Comments

By Franck Pachot . This month, I’ll talk – with lot of demos – about multitenant internals at DOAG conference. The multitenant dictionary architecture starts with a simple idea: system metadata and data are in CDB$ROOT and user metadata and data are in PDB. And it could have been that simple. When a session connected to a PDB needs to read some system information, the session context is switched to the CDB$ROOT container and reads…

 
Read More
Oracle Team

Multitenant dictionary: what is consolidated and what is not

By | Oracle | No Comments

By Franck Pachot . The documentation says that for Reduction of duplication and Ease of database upgrade the Oracle-supplied objects such as data dictionary table definitions and PL/SQL packages are represented only in the root. Unfortunately, this is only partly true. System PL/SQL packages are only in root but system table definition are replicated into all PDBs.  

 
Read More