Infrastructure at your Service

Oracle 12c Archives - Blog dbi services

Franck Pachot

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

By | Oracle | No Comments

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
Marc Wagner

ORACLE 11g to 12c RMAN catalog migration

By | Database management, Oracle | One Comment

This is a small migration demo of a 11g catalog (RCAT11G) to a new 12c catalog (RCAT12c). Demo databases environments have been easily managed thanks to DBI DMK tool. oracle@vmreforadg01:/home/oracle/ [RCAT11G] sqh SQL*Plus: Release 11.2.0.4.0 oracle@vmtestoradg1:/home/oracle/ [RCAT12C] sqh SQL*Plus: Release 12.2.0.1.0   Current configuration Displaying the list of databases registered in the RCAT11g catalog. SQL> select instance_name from v$instance; INSTANCE_NAME —————- RCAT11G SQL> select * from rcat.rc_database;     DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS ———-…

 
Read More
Mouhamadou Diaw

Automatic Data Optimization Part I : Compression Tiering

By | Database Administration & Monitoring | No Comments

Nowadays data are increasing more and more. And some challenges we can face can be how to reduce storage costs and how to improve performance. With Oracle 12c, the feature Automatic Data Optimization (ADO) can help us. In this first blog we will see how we can use ADO to compress data under predefined conditions. ADO is part of Information Lifecycle Management (ILM). Note that ADO requires Advanced Compression Option. In this article we are…

 
Read More
Franck Pachot

Keep your orapw password file secure

By | Oracle | 2 Comments

This is a small demo I did when I’ve found a database password file (orapw) lying around in /tmp with -rw-rw-rw- permissions, to show how this is a bad idea. People think that the orapw file only contains hashes to validate a password given, and forget that it can be used to connect to a remote database without password.  

 
Read More
Franck Pachot

12c Multitenant internals: PDB replay DDL for common users

By | Oracle | No Comments

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: they are simply replicated…

 
Read More
Franck Pachot

Drop PDB including datafiles may keep files open

By | Oracle | No Comments

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 inode. The consequence is…

 
Read More
Franck Pachot

12cR2 Subquery Elimination

By | Oracle | No Comments

More and more we can see crazy queries generated by ORM frameworks or BI query generators. They are build to be easily generated rather than being optimal. Then, the optimizer has to implement more and more transformations to get an efficient execution plan. Here is one new that appeared in Oracle 12cR2: Subquery Elimination when the subquery do not filter any rows.  

 
Read More
Michael Hein

Naming of archivelog files with non existing top level archivelog directory

By | Database Administration & Monitoring, Database management, Oracle | No Comments

In Oracle 12.2 an archive log directory is accepted, if top level directory does not exist: oracle@localhost:/u01/app/oracle/product/12.2.0/dbhome_1/dbs/ [DMK] ls -l /u02/oradata/DMK/ total 2267920 drwxr-xr-x. 2 oracle dba        96 Dec  6 05:36 arch … Now database accepts this non existing archivelog destination: SQL> alter system set log_archive_dest_3=’LOCATION=/u02/oradata/DMK/arch/arch2′; System altered. But not this: SQL> alter system set log_archive_dest_4=’LOCATION=/u02/oradata/DMK/arch/arch2/arch4′; alter system set log_archive_dest_4=’LOCATION=/u02/oradata/DMK/arch/arch2/arch4′ * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid…

 
Read More