Tuesday Oct 06, 2015

New in Oracle 12c: _optimizer_gather_stats_on_load

Received an email from Roy last night with some performance issues a customer in the US encountered recently during their upgrade testing

One issue the customer encountered has to do with tons of parallel slaves creating a massive noise on the system when they are doing a CTAS (Create Table As Select) - and the same thing happens with an IAS (Insert Append Select).

What caused this change?

In this case the behavior change is well documented, even though not linked to the responsible underscore parameter. 

Quoting from the first paper: 

Online statistics gathering

In Oracle Database 12c, online statistics gathering “piggybacks” statistics gather as part of a direct-path data loading operation such as, create table as select (CTAS) and insert as select (IAS) operations. Gathering statistics as part of the data loading operation, means no additional full data scan is required to have statistics available immediately after the data is loaded.

The parameter controlling this change is not mentioned:

  • _optimizer_gather_stats_on_load

The default is TRUE since Oracle - the parameter or functionality did not exist before Oracle Database 12c.

Things to Know

The online stats gathering for IAS can happen only if the object you are loading data into is empty. You'll recognize the feature when you see a line saying OPTIMIZER STATISTICS GATHERING in the execution plan. Additionally you'll find STATS_ON_LOAD in the NOTES column of below query:


Consider now that first of all immediate stats gathering may not be desired as it will mean additional load to the system. Even though the feature has been designed to generate as little load as possible it's still doing something in the background. Hence there may be situations where you'd like to switch it off, e.g. with a hint:

insert /*+append NO_GATHER_OPTIMIZER_STATISTICS*/ into MYTAB select ...

And how about the number of parallel slaves creating the statistics? 

There's no easy answer to this based on the information I have at the moment - but I'd highly recommend this article about parallel execution in Oracle:


Tuesday Sep 29, 2015

No OS Authentication? datapatch will fail in every upgrade

Thanks to Daniel from SimCorp for bringing this to my attention:Patch
Actually, command line upgrades are affected as well,
if you do not use OS authentication. Apparently, datapatch
is not able to execute in non-OS authentication mode.
See MOS note 1635007.1. 


You are doing a command line upgrade to Oracle Database 12c with catctl.pl - and you don't use OS authentication allowing connections with "/ as sysdba" then datapatch.pl won't be able to execute the SPU/PSU/BP related SQL commands as it will fail to connect to your database with an ORA-1017 (invalid username/password) error.


Bug 18361221 is fixed in Oracle 12.2 and got backported to and but not actually included in any bundles at the moment. Without this fix, datapatch will only connect with '/ as sysdba'. 

Either apply generic patch 18361221 to your destination Oracle Home or switch on OS authentication by setting:

temporarily in your sqlnet.ora for the duration of the upgrade only. See the documentation for further information about SQLNET.AUTHENTICATION_SERVICES. Or, of course, run datapatch.pl -verbose after upgrading your database in any case ...

Further Information and Links:

Related Blog Posts datapatch.pl:


Monday Sep 28, 2015

Upcoming Upgrade Workshops in Prague and Bucharest

Oracle Upgrade Workshops Fall 2015

I've just returned from a work intense week from Seoul, South Korea - and there are upcoming Upgrade / Migrate /Consolidate to Oracle Database 12c workshops already on my radar - and both are almost booked out completely. So if you are either based in the Prague or the Bucharest region you may quickly sign up (and show up as well) :-)

  • Upgrade / Migrate / Consolidate to Oracle Database 12c
    Wednesday, October, 7, 2015
    Prague, Czech Republic
    @Oracle Czech
    Registration Link is here
  • Upgrade / Migrate / Consolidate to Oracle Database 12c
    Tuesday, October 13, 2015
    Bucharest, Romania
    @Oracle Romania
    Registration Link is here 

Hope to see you there :-)


Monday Sep 21, 2015

DBUA displays wrong RMAN backup for restore - Oracle

If you are using the Database Upgrade Assistant (DBUA) to upgrade your database to Oracle Database be aware when you choose to potentially restore your database from a existing backup in case of an error during the upgrade.

First of all I would always stop DBUA and try the command line upgrade after fixing the issues instead of restoring the entire database. But this is a different story.

Anyhow, the most recent available backup to be displayed is most likely your newest one as the underlying query uses a MAX function - but leading to an incorrect (or unintended) result.

Ignore the fact that the screenshot is in German - the interesting part is the displayed time stamp for the most recent available backup:

DBUA Restore Backup

The customer who alerted me was wondering as his list of backups showed also backups from August and early September.

The query being used in DBUA to gather the most recent date; 

SELECT MAX (TO_CHAR (completion_time, 'DD-MON-YYYY HH24:MI:SS')) AS end_time FROM (SELECT completion_time FROM v$backup_set)

may give you this result: 31-JUL-2015 23:59:52 - even if you have newer backups taken in August and September. The TO_CHAR conversion will lead to the incorrect handling of the date as the MAX function won't deliver the most recent date but the alphabetical highest value of the conversion result. 

The query should be: 

SELECT MAX (completion_time) AS end_time
FROM (SELECT completion_time FROM v$backup_set)

to display the most recent full backup.

It will be fixed in the next release.
Credits go to Bernd Tuba from MM Warburg - thanks!!


Tuesday Sep 08, 2015

MOS Download for Oracle Database including SE2

Please find all our articles about Oracle Database Standard Edition SE2:


You have 3 options to download Oracle Database Enterprise Edition and Oracle Database Standard Edition SE2.

Regarding OTN and eDelivery nothing has been changed since Sep 1, 2015 when Oracle Database Standard Edition SE2 got published. But the download from MOS now has changed.

When you search in the under Patches and Updates tab ...

Patches And Updates - MOS

... and display the Latest Patch Sets ...

Latest Patch Sets - MOS

... check for instance for platform Linux x86-64bit ...

MOS - Linux

... then you'll wonder about the two patch numbers ...

Patch Numbers Oracle SE2

The only difference of 2.5 GB in size results from two more zip files included in the new patch number 2141921 ...

... you'll have to check the README button to find out what's hidden behind each file ...

Files 3 and 4 contain Oracle Database Standard Edition SE2.

So please don't get puzzled by the different patch numbers - the only real difference is the inclusion of SE2 into the download package but the included patches etc are exactly the same as in the previous patch number. 



Friday Sep 04, 2015

Oracle non-CDB architecture may be desupported after Oracle Database 12.2

You may wonder about the headline of this blog post.
Haven't I blogged about this a long time ago?

Yes, I did. On January 22, 2015 - over 7 months ago:

But whenever in the past weeks this message has been refreshed and got a bit more precise (which I'd guess everybody appreciates). Now we are clearly saying that such a change won't happen with Oracle 12.2. Before we've said only "in a later release".

See the Oracle Database 12c Upgrade Guide

Deprecation Note non-CDB architecture

In case you'd like to explore the world of (at least) Oracle Single Tenant (no extra license required, available even with SE2) which I'd highly recommend you'll find some useful advice in this slide deck:

  • How Oracle Single Tenant will change a DBA's life 


    Thursday Aug 20, 2015

    Upgrade nach Oracle Database 12c - alles ganz einfach!

    Sorry - German only - if you seek for a very similar presentation in English please find it here:

    Danke noch mal an meinen Kollegen Frank Schneede, der das erste Webinar rund um 12c eingeführt hat. 

    Das Replay meines Seminar-Teils ist hier in Deutsch verfügbar:

    Viel Spass :-)


    Monday Aug 17, 2015

    DBCA 12c and "datapatch.pl" - things to know

    A few weeks ago I did blog about the DBUA (Database Upgrade Assistant) not executing 'datapatch' (i.e. not applying the SQL changes involved with a SPU/PSU/BP) automatically:

    Again, please note that this behavior DOES NOT APPLY to command line upgrades done with catctl.pl - as you can see from this somewhat disturbing messages during the upgrade in phase 65 and phase 69 (which are not errors but just informational messages for datapatch's execution):

    Datapatch phases command line upgrade catctl.pl

    But afterwards I have learned that things are worse.
    The same behavior is true when you create a database.

    Not a typo.
    You create a fresh database with DBCA (Database Configuration Assistant), you are a honest customer, you have followed our advice and applied the most recent PSU (or SPU or BP) into your Oracle Home. You don't even deploy one of the preconfigured databases but use the CREATE CUSTOM DATABASE option of DBCA. And the database will run from the patched home - but the SQL changes haven't been applied to it


    DBCA does not call 'datapatch' for database changes.

    I consider this even worse than the DBUA behavior as the person who upgrades a database in most cases is aware of the future home. But the person who either deploys a new database or asks for one to be deployed is often not identical with the person who did patch the homes.

    And there's no warning displayed yet nor (afaik) is there a MOS note available talking about it.

    How do you fix the issue?

    After creating a new database make sure to run:

    cd $ORACLE_HOME/OPatch
    ./datapatch -verbose

    and double check with DBA_REGISTRY_SQLPATCH view:

    order by BUNDLE_SERIES;

    Actually to be 100% you may find some patch information in DBA_REGISTRY_SQLPATCH showing that the JAVAVM patch has been applied in case you've installed the Combo version of the PSU. But you'll miss the database changes.

    Related Blog Posts datapatch.pl:


    Addition - Sept 18, 2015:

    Please be aware that the same thing happens on ODA (Oracle Database Appliance) with the oakcli. This will be fixed in the version (ODA/oakcli)

    Friday Aug 14, 2015

    Oracle Databases and Microsoft Windows 10

    MS Windows 10If you have upgraded already or plan to upgrade to Microsoft Windows 10 in the near (or later) future, you may find this Statement Of Direction by Oracle regarding Microsoft Windows 10 certification quite useful:


    In summary:

    • Oracle plans to certify Oracle Database by October 2015
    • Oracle plans to certify the next major version of the database as well on MS Win 10 - 64bit

    Tuesday Aug 04, 2015

    Other people's thoughts: "Should you upgrade to 12c?"

    You still don't believe me yet when I say: You can't seriously wait for the so called 2nd release of Oracle Database 12c as it will be an entirely new release again? And you haven't upgraded yet to Oracle Database for various reasons? 

    Then sometimes it's good to listen to other people's opinions - and I'm happy to share this 6 minute video by Tim Hall (very well known for his great page oracle-base). Listen to Tim and his Thoughts about Upgrading to Oracle Database 12c. And don't get disturbed that he's driving on the wrong side of the road ;-)

    And I promise I didn't bribe Tim (cocktails don't count) ;-)

    Thanks Tim!!! 


    Friday Jul 24, 2015

    Why does a PDB require an upgrade?

    Why do I need to upgrade (or downgrade) a Pluggable Database (PDB) once I unplug it from version A and replug into version B?

    This question is one of the most often asked questions in our workshops when Roy and I present Upgrades and Oracle Multitenant.

    If you take a look into the documentation you'll find:

    But unfortunately this is not 100% correct for every object.

    When you do a simple query for basic dictionary structures such as OBJ$ you'll easily find out that a PDB has its own Data Dictionary.  Some things are really linked into the PDB only - check the SHARING column of DBA_OBJECTS for instance. If it says "METADATA LINK" it will give you an indication that it exchanges information with its parent in the CDB$ROOT. But that doesn't mean necessarily that it's just an empty meta object. Some tables do exist in the PDB as well and allocate space. Check it by yourself and you'll find out that OBJ$ inside a PDB has in fact the same attribute - but still owns segments in the PDB and in the CDB$ROOT - as other objects do allocate space as well. And of course the object's definition exists in the PDB as well. 

    • CDB$ROOT

      OBJ$ in CDB$ROOT

    • PDB 

      OBJ$ in PDB

    So the answer is simple:
    A Pluggable Database (PDB) must be upgraded (or downgraded) when it get moved between versions simply because it has its own data dictionary. And this doesn't get upgraded automatically.



    Monday Jul 20, 2015

    DBUA 12c and "datapatch.pl" - things to know

    For clarification:
    The following blog post applies to upgrades to Oracle 12.1 done by DBUA only whenever a SPU/PSU/BP is installed into the 12.1 home prior to the upgrade (which I'd highly recommend as patching before upgrade saves you headache after upgrade!).

    Two customers independently reported last week that they have doubts on DBUA's ability to apply the required SQL changes associated with CPU/SPU or PSU

    First of all, let me tell you that this is not an issue when you do a command line upgrade to Oracle Database 12c with catctl.pl - you'll only need to take care when using the DBUA

    One claimed that this feature alongside with datapatch.pl had been announced a while back:

    Oracle Premier Support - Oracle Database Support News
    Issue November, 2014 Volume 46
    (Doc ID 1954478.1)

    Which Patching Tools uses Datapatch ?

    • Opatchauto   
      • OPatchAuto calls datapatch automatically to complete post patch actions upon installation of the binary patch and restart of the database.
    • Enterprise Manager Cloud Control   
      • Starting version 12.1 EMCC now calls datapatch to complete post patch actions upon any 12c or later database restart
    • Upgrade   
      • Catctl.pl and DBUA now call Datapatch during the upgrade process
    • OPatch  
      • Datapatch integration with OPatch is not possible as OPatch is executed when the database is down and datapatch requires the database to be open to complete its activity.

    The other customer provided all the logfiles - and I print the important logs only with the interesting part marked in RED:

    Contents of catupgrd_datapatch_upgrade.log
    SQL Patching tool version on Tue Jul 14 13:10:39 2015
    Copyright (c) 2014, Oracle.  All rights reserved.
    Connecting to database...OK
    Bootstrapping registry and package to current versions...done
    Determining current state...done
    Current state of SQL patches:
    Patch 19282028 (Database PSU, Oracle JavaVM Component ():
      Installed in the binary registry only
    Bundle series PSU:
      ID 1 in the binary registry and not installed in the SQL registry
    Adding patches to installation queue and performing prereq checks...
    Installation queue:
      Nothing to roll back
    Nothing to apply
    SQL Patching tool complete on Tue Jul 14 13:10:57 2015

    Contents of sqlpatch_catcon__catcon_22773.lst
    catcon: See /tmp/sqlpatch_catcon_*.log files for output generated by scripts
    catcon: See /tmp/sqlpatch_catcon__*.lst files for spool files, if any
            catconInit: start logging catcon output at 2015-07-14 13:10:39


    Ok, so it seems to be true that DBUA did not apply the post upgrade SQL changes associated with the most recent PSU.

    DBUA 12c

    Now digging a bit deeper we could solve the puzzle.

    The DBUA uses the "catctl.pl -x" option executing catuppst.sql (the post upgrade script) in a separate step whereas on the command line catctl.pl will execute catuppst.sql by default (tracked with bug19990037). The DBUA uses catcon.pl instead to execute catuppst.sql. In previous releases this was not an issue as catbundle.sql got automatically executed as part of catuppst.sql. But as datapatch.pl is a PERL script, and a PERL script cannot be run from within a SQL script, catuppst.sql can no longer call the post-patching activities. The DBUA in misses this action as a separate task.

    Summary and Solution

    DBUA misses the post-upgrade datapatch execution in Oracle The solution is to apply the SQL changes manually after DBUA has completed the database upgrade to Oracle Database 12c:

    cd $ORACLE_HOME/OPatch
    ./datapatch -verbose

    And again, this is only necessary when you used the DBUA for a database upgrade. This step is not required for the command line upgrade. This will be fixed in an upcoming release of the DBUA.

    If you are in doubt whether the DBUA or the command line upgrade had been used, unfortunately you won't find any indication inside the database. But look into $ORACLE_BASE/cfgtoollogs/dbua/logs - if the "dbua" directory exists, the DBUA had been used. If not than the command line upgrade had been processed.

    Related Blog Posts datapatch.pl:


    Thursday Jul 02, 2015

    SAP on Oracle Database 12c now with Oracle In-Memory

    Oracle SAPOn March 31, 2015 SAP has been certified to run on Oracle Database

    As of June 30, 2015, Oracle Database In-Memory is supported and certified for SAP environments for all SAP products based on SAP NetWeaver 7.x. on Unix/Linux, Windows and Oracle Engineered Systems platforms running Oracle Database 12c - in single instance and Oracle Oracle Real Application Clusters deployments.

    Oracle Database 12c is the database of choice for SAP customers based on In-Memory Technology which is fully supported for SAP BW and SAP OLTP applications.

    For requirements, restrictions, and implementation details see the documents below.


    PS: Fidel, thanks for the correct links - highly appreciated!!! 

    Tuesday Jun 30, 2015

    Some Data Pump issues:
    + DBMS_DATAPUMP Import via NETWORK_LINK fails
    + STATUS parameter giving bad performance

    One of my dear Oracle ACS colleagues (Danke Thomas!) highlighted this issue to me as one of his lead customers hit this pitfall a week ago. . 

    DBMS_DATAPUMP Import Over NETWORK_LINK fails with ORA-39126 / ORA-31600

    Symptoms are: 

    ORA-31600: invalid input value IN ('VIEWS_AS_TABLES/TABLE_DATA') for parameter VALUE in function SET_FILTER

    This can be cured with the patch for bug19501000 -  but this patch can conflict with:Bug 18793246  EXPDP slow showing base object lookup during datapump export causes full table scan per object and therefore may require a merge patch - patch 21253883 is the one to go with in this case.


    Another issue Roy just came across:

    Data Pump is giving bad performance in Oracle when the STATUS parameter option is used on command line

    Symptoms are: 

    It looks like the routines we are using to get status are significantly slower in 12c than in 11g. On a STATUS call of expdp/impdp runs in 0.2-0.3 seconds, but in it takes 0.8-1.6 seconds. As a result the client falls behind on; it is taking about 0.5-0.8 seconds to put out each line in the logfile because it is getting the status each time. With over 9000 tables in a test that half a second really adds up. The result in this test case was that the data pump job completed in 35 minutes, but it took another 30-35 minutes to finish putting out messages on the client (the log file was already complete) and return control to the command line. This happens only when you use STATUS on the command line.

    Recommendation is:  

    Don't use the STATUS parameter on the expdp/impdp command line in Oracle until the issue is fixed. This will be tracked under Bug 21123545.


    Wednesday Jun 17, 2015

    Webcast "Why Upgrade to Oracle 12c" available

    In April I've done a webcast mainly for Oracle partners to explain and elaborate
    Why Upgrade to Oracle Database 12c?

    This webcast is now available without registration etc. Watch it here (click on the picture below):

    Webcast Why Upgrade To Oracle Database 12c - Mike Dietrich, April 2015


    Wednesday May 27, 2015

    Removing Options from the Oracle Database kernel in 12c

    Remove Options from the Oracle Database Kernel - chopt

    Sometimes people have the desire to remove options from the database kernel (i.e. from the oracle executable).

    It's a matter of fact that by default you'll get plenty of things linked into your kernel in Oracle Database 12c.

    In case you'd like to remove things the chopt utility does still exist in Oracle Database 12c - but you may recognize a difference between Oracle 11.2 and Oracle 12.1. Anyhow, ideally you'll do these changes before you create a database directly after the installation has been completed. See the documentation for Post Installation Tasks first:

    Now let's call chopt and see what it tells us on the command prompt:

    $ chopt

    chopt <enable|disable> <option>

                      dm = Oracle Data Mining RDBMS Files
                    olap = Oracle OLAP
            partitioning = Oracle Partitioning
                     rat = Oracle Real Application Testing
    e.g. chopt enable rat 

    For a first try I'm unlinking Data Mining:

    $ chopt disable dm

    Writing to /u01/app/oracle/product/
    /usr/bin/make -f /u01/app/oracle/product/ dm_off ORACLE_HOME=/u01/app/oracle/product/
    /usr/bin/make -f /u01/app/oracle/product/ ioracle ORACLE_HOME=/u01/app/oracle/product/

    I tested all the 4 available chopt options and this is the result when you exit SQL*Plus afterwards:

    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release - 64bit Production

    versus before with all options still linked into the kernel:

    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

    But how about all the other options being available in releases before Oracle Database 12c, such as: lbac_on|off (Label Security), dv_on|off (Database Vault)? If you'd refer to the list of options to link on/off published by Ghokan Atil years back in his blog you may find more things to try out.

    Lets give it a try with Label Security:

    $ /usr/bin/make -f /u01/app/oracle/product/ lbac_off ORACLE_HOME=/u01/app/oracle/product/
    lbac_off has been deprecated

    Ah, very smart ;-) It signals that you can't link those things off anymore. The same would happen with dv_off.

    And how about things which are from older sources, such as Spatial Data (sdo_on|off)?

    $ /usr/bin/make -f /u01/app/oracle/product/ sdo_off ORACLE_HOME=/u01/app/oracle/product/
    Warning: sdo is always turned on. sdo_off is disabled.

    In this case it would be simple: You'd take out SDO from the components inside the database - and there's no need to unlink anything.


    Monday May 18, 2015

    Create a PDB directly from a stand-alone database?

    The documentation offers a well hidden feature for migrating a database into the universe of Oracle Single-/Multitenant:

    Remote Cloning with the NON$CDB option.

    If you'll read the documentation it doesn't say much about this option, neither the requirements nor the exact syntax or an example:

    Scroll down to the FROM clause:

    ... FROM NON$CDB@dblink ... this option will be able to plugin a stand-alone database and make it a pluggable database. Sounds interesting, let's try it.

    Test 1 - Try to plugin an Oracle database

    Well, the documentation doesn't say anywhere anything about source release limitans. So I tried it simply with an Oracle database. 

    1. Created a database link from my existing CDB pointing into my database
    2. Started my SOURCEDB in read-only mode
    3. Tried to create a pluggable database from my SOURCEDB - and failed ...
      SQL> create pluggable database PDB1 from non$cdb@sourcedb;
      create pluggable database PDB1 from non$cdb@sourcedb
      ERROR at line 1:
      ORA-17627: ORA-28002: the password will expire within 7 days
      ORA-17629: Cannot connect to the remote database server

    Test 2 - Try to plugin an Oracle database in file system 

    Thanks to Tim Hall - his blog post did the magic trick for me:

    First of all, the reason why my Test 1 failed is simply that I can't have a user in an Oracle database with the privilege CREATE PLUGGABLE DATABASE - but this is a requirement as I learned later on.

    1. You'll need a user in SOURCEDB with the privilege to CREATE PLUGGABLE DATABSE:
    2. Start SOURCEDB in read-only mode after shutting it down:
    3. Create a database link pointing from the CDB back into the SOURCEDB:
      CREATE DATABASE LINK sourcedblink
      CONNECT TO sourcedb_user IDENTIFIED BY password USING 'upgr12';
    4. Now create the pluggable database from the stand-alone UPGR12 database:
      CREATE PLUGGABLE DATABASE pdb_upgr12 FROM NON$CDB@sourcedblink
    5. But when you check the status of the new PDB you'll realize it is OPEN but only in RESTRICTED mode. Therefore noncdb_to_pdb,sql needs to be run. Connect to the new PDB and start the script:


    What will you get from this command? Actually it will allow a simple way to plug in a stand-alone database into a container database but the following restrictions apply:

    • Source database must be at least Oracle
    • Source database must be on the same OS platform
    • Source database must be at the same (equal) version as the container database
    • Script noncdb_to_pdb.sql needs to be run

    You may have a look at this MOS Note:1928653.1 Example for Cloning PDB from NON-CDB via Dblink as well [Thanks Krishnakumar for pointing me to this note].

    Finally the only simplification seems to be to avoid the extra step of creating the XML manifest file with DBMS_PDB.DESCRIBE - but apart from that I can't see many other benefits - except for easing of remote cloning with the above restrictions.



    Thursday Apr 23, 2015

    CDBs with less options now supported in Oracle

    When Oracle Multitenant was launched Roy and I amongst many other people always mentioned that the requirement of having all options in a Container Database (CDB$ROOT), and therefore also for the PDB$SEED with the immediate result that all PDBs provisioned from the PDB$SEED will have all options as well, will hinder customer adoption significantly. 

    Almost all customers I have talked to in the past 3-4 years about Oracle Multitenant mentioned immediately that it will be a huge problem for them to install all options as (1) their policy is to install only things they are licensed for to (2) prevent developers, users and DBAs to use things accidentally without even knowing that this or that will require a license.

    As it is not allowed to manipulate and change the PDB$SEED the workaround - as PDBs were allowed to have less options - has been to create a stand-alone Oracle 12c database with exactly the options you'd like to have configured as your gold standard - and then plug it in under a remarkable name, for instance PDB$MASTER. Switch it to read only and make sure from now on you'll provision a new PDB always as a clone from PDB$MASTER, and not from PDB$SEED.

    All Options in a CDB

    That would have even worked in the Single Tenant case, which does not require licensing the Oracle Multitenant option and where you have only one active ("customer-created PDB";) PDB. For this purpose you would have unplugged your PDB$MASTER after making it a pluggable database and provision new PDBs with just your desired options set as plugging in PDB$MASTER under a new name (e.g. PDB26) using the COPY option of the command.

    Now this will become all obsolete as from now you it is allowed to have a CDB installation with less options. This applies to linked kernel modules (e.g. RAT) as well as to configured database components (e.g. JAVA, OWM, SPATIAL etc).

    Please see the following new/rephrased MOS Notes:

    MOS Note:2001512.1 basically explains the following steps:

    • Do all the click work in DBCA (Database Creation Assistant) to create a container database - but let DBCA only create the scripts
    • Edit the <SID>.sql script and remove the unwanted options according to the dependency table in the MOS Note
    • Edit the CreateDBCatalog.sql in case you want to remove OWM (Oracle Workspace Manager) creation as well 
    • Add the Oracle PERL $ORACLE_HOME/perl/bin in front of your $PATH variable
    • Start the <SID>.sh script on the shell prompt

    Here's an example of a CreateDBCatalog.sql and a XXXX.sql creating a CDB with no options except XDB (which is mandatory in Oracle Database 12c):

    cat CreateDBCatalog.sql

    connect "SYS"/"&&sysPassword" as SYSDBA
    set echo on
    spool /u01/app/oracle/admin/XXXX/scripts/CreateDBCatalog.log append
    alter session set "_oracle_script"=true;
    alter pluggable database pdb$seed close;
    alter pluggable database pdb$seed open;
    host perl /u01/app/oracle/product/ -n 1 -l /u01/app/oracle/admin/XXXX/scripts -b catalog /u01/app/oracle/product/;
    host perl /u01/app/oracle/product/ -n 1 -l /u01/app/oracle/admin/XXXX/scripts -b catproc /u01/app/oracle/product/;
    host perl /u01/app/oracle/product/ -n 1 -l /u01/app/oracle/admin/XXXX/scripts -b catoctk /u01/app/oracle/product/;
    -- host perl /u01/app/oracle/product/ -n 1 -l /u01/app/oracle/admin/XXXX/scripts -b owminst /u01/app/oracle/product/;
    host perl /u01/app/oracle/product/ -n 1 -l /u01/app/oracle/admin/XXXX/scripts -b pupbld -u SYSTEM/&&systemPassword /u01/app/oracle/product/;
    connect "SYSTEM"/"&&systemPassword"
    set echo on
    spool /u01/app/oracle/admin/XXXX/scripts/sqlPlusHelp.log append
    host perl /u01/app/oracle/product/ -n 1 -l /u01/app/oracle/admin/XXXX/scripts -b hlpbld -u SYSTEM/&&systemPassword -a 1  /u01/app/oracle/product/ 1helpus.sql;
    spool off
    spool off


    cat XXXX.sql

    set verify off
    ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE
    ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE
    host /u01/app/oracle/product/ file=/u01/app/oracle/product/ force=y format=12
    -- @/u01/app/oracle/admin/XXXX/scripts/JServer.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/context.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/ordinst.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/interMedia.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/cwmlite.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/spatial.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/labelSecurity.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/apex.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/datavault.sql
    -- @/u01/app/oracle/admin/XXXX/scripts/CreateClustDBViews.sql



    This results in a database having only these components - the minimal component set in Oracle 

    -------- --------------------------------------

    CATALOG  Oracle Database Catalog View

    CATPROC  Oracle Database Packages and

    XDB      Oracle XML Database


    -- Mike 

    Tuesday Apr 21, 2015

    REPLAY and Slides for Webcast "Why Upgrade to Oracle Database 12c" for ISVs/Partners - Apr 2015

    Thanks for attending today's webcast about
    "Upgrading to Oracle Database 12c - and why you should upgrade".

    Webcast Why Upgrade 12c

    Please access the slides via this link:

    Webcast Slides - Why Upgrade to Oracle Database 12c

    And for those who couldn't participate here's the replay of the 45 minute Webcast:

    REPLAY Webcast "Why Upgrade to Oracle 12c"

    Thanks :-)


    Thursday Apr 16, 2015

    Webcast for ISVs/Partners on Apr 21, 2015, 3pm CET
    Why Upgrade to Oracle Database 12c?

    Oracle's latest generation of database technology, Oracle Database, has some impressive new features. It offers great potential for a fast upgrade, simple migrations and consolidation, making more efficient use of hardware and delivering major improvements in management efficiency.

    Join our webcast on Upgrading to Oracle Database 12c for ISVs and you will learn:

    • Why you need to upgrade to Oracle Database
    • How to ensure that your applications are ready for Oracle Database 12c
    • How to evaluate and test all enhancements of the upgrade process plus other new features
    • Best practices to upgrade and migrate successfully

    At the end of the webcast our speaker Mike Dietrich, Master Product Manager for Oracle's Database Upgrade Development Team, will be available for your questions. The presentation will be for 45 minutes followed by the Q&A session.

    Registration Link:

    Tuesday, April 21, 2015 at 3pm CET 


    Wednesday Apr 01, 2015

    SAP is now certified on Oracle Database

    ORACLE and SAPSAP certified Oracle Database as of March 31, 2015!

    Yes, it's true. Our colleagues in the Oracle/SAP/CompetenceCenter in Walldorf worked really hard to complete the certification for SAP with Oracle Database But finally it happened. Actually it was announced long time before as planned. And it happened right in time.

    Please find the official documents here:

    SAP Service Marketplace ==> Products ==> Installation & Upgrade Guides ==> Database Upgrades (login required) ==> Oracle 

    And here's the link to the official announcement:


    Great job by a excellent Oracle team in Walldorf - and please no excuses anymore from anybody saying that you can't certify your application on Oracle Database If SAP can do it, everybody can do it :-)

    If you are looking for more information and useful documents please see this discussion here - scroll down a bit (thanks to Upgrade Expert Andreas Becker from the Oracle-SAP-CC in Walldorf):

    See also the ROADMAP for Oracle/SAP regarding future developments, feature support, In-Memory etc:



    I'm expressing my sincere condolences as one of the 5 founders of SAP, Klaus Tschira, died on March 31, 2015 way too early at the age of 74 years. May he rest in piece!

    Monday Mar 09, 2015

    Applying a PSU or BP to a Single-/Multitenant Environment

    I have already explained in broad details a while ago how to:

    But one may miss the steps for applying a PSU (Patch Set Update) or BP (Bundled Patch) to a Single-/Multitenant Environment. At first everything will work just the same if you choose the Everything-at-Once strategy as datapatch will adjust all the required things regardless of being executed in a stand-alone or a singe/Multitenant environment.

    But what happens if you apply a PSU or a BP to one of your Multitenant environments and want to move PDBs one after another (or a few at the same time) to the new environment?
    Or revert a PSU by plugging out from a CDB with the PSU inside - and plug it back into a CDB with a lower version or no PSU at all? 

    First step - Check Plug In Compatibility 

    Before you can even start your unplug/plug operation you should always perform the plugin check. This is divided in two simple steps:

    1. Create the XML description file for your PDB in CDB_SOURCE
      exec DBMS_PDB.DESCRIBE ('/home/oracle/PDB1_unplug.xml', 'PDB1');
    2. Run the plug in check in CDB_DEST
        if DBMS_PDB.CHECK_PLUG_COMPATIBILITY('/home/oracle/PDB1_unplug.xml','PDB1') then  
        DBMS_OUTPUT.PUT_LINE('No violations found - you can relax');
        DBMS_OUTPUT.PUT_LINE('Violations found - check PDB_PLUG_IN_VIOLATIONS');
      end if;

    No Plugin Violations?

    Then please follow the procedure described in:
    without the upgrade part as you don't need to upgrade anything in this case of course. 

    Higher patch in CDB_DEST than in CDB_SOURCE?

    Then run this query:


    It will tell you to execute datapatch:

    ------  ----------------------------------------------------------------------------
    ERROR   PSU bundle patch 1 (PSU Patch 4711): Installed in the CDB but not in the PDB

    Call datapatch to install in the PDB or the CDB

    Lower patch in CDB_DEST than in CDB_SOURCE?

    Now this becomes a bit more tricky. See the output of PDB_PLUG_IN_VIOLATIONS:

    ----- ----------------------------------------------------------------------------
    ERROR PSU bundle patch 1 (PSU Patch 4711): Installed in the PDB but not in the CDB

    Call datapatch to install in the PDB or the CDB

    Huh? Install???
    What does this mean? Should I install now the current CDB/PDB's PSU into my target environment before being able to step down? 

    Actually I think this message is misleading. And when you look into the MyOracle Support Note describing this under scenario 3 (MOS Note:1935365.1 - Multitenant Unplug/Plug Best Practices) you'll see that the author silently assumed as well that is is more likely that you'll remove the patch from the PDB. 

    But how do you remove changes which came in with datapatch from within a PDB only?

    You will need to run datapatch -rollback on the affected PDBs only:

    $> datapatch -rollback <patch id> –force [–bundle_series] -pdbs <pdb1,pdb2,...,pdbn>

    For further information see:


    Monday Mar 02, 2015

    New Behaviour in Oracle Database 12c and SELECT ANY DICTIONARY with reduced privilege set

    You've just upgraded to Oracle Database 12c - but your favorite admin tool receives an ORA-1031: Insufficient Privileges after connection?

    Then the reason may be the reduced set of privileges for the SELECT ANY DICTIONARY privilege. This privilege does not allow access to tables USER$, ENC$ and DEFAULT_PWD$, LINK$, USER_HISTORY$, CDB_LOCAL_ADMINAUTH$, and XS$VERIFIERS. Actually such changes are not new. For instance in Oracle 10.1 we removed the access to  LINK$ in SELECT ANY DICTIONARY (well, this may have happened because the dblink's password was stored in clear text in LINK$ - a misbehavior which is fixed since Oracle 10.2).

    Please be very careful with granting this privilege. Furthermore, you need to be aware that it can't be granted either through a role, nor is it included in the GRANT ALL PRIVILEGES.

    Oracle 11.2:

    Oracle 12.1:

    Documentation can be found here: 

    1. SELECT ANY DICTIONARY Privilege No Longer Accesses Some SYS Data Dictionary Tables
      For better security, the SELECT ANY DICTIONARY system privilege no longer permits you to query the SYS schema system tables DEFAULT_PWD$, ENC$, LINK$, USER$, USER_HISTORY$, CDB_LOCAL_ADMINAUTH$, and XS$VERIFIERS. Only user SYShas access to these tables, but user SYS can grant object privileges (such as GRANT SELECT ON USER$ TO sec_admin) to other users.
    2. Increased Security When Using SELECT ANY DICTIONARY

    Please be aware that you can't query anywhere inside the database which privileges are included in the SELECT ANY DICTIONARY privilege as this is embedded in our code.


    PS: Credits go to Andy Kielhorn for highlighting this to me and thanks to Gopal for providing me with the doc links

    Thursday Feb 26, 2015

    Oracle In-Memory Advisor with Oracle Multitenant? Issues?

    Do you want to use the Oracle In-Memory Advisor in an Oracle Multitenant environment?

    This is possible but with the current version it will require a workaround. The next available version of the IM Advisor is designated to support it without any workarounds.

    At the moment the IM Advisor does not install into the CDB$ROOT container. But it can be installed into any PDB.

    • Create the user IMADVISOR in the PDB as local user first
    • No objects must be placed into the IMADVISOR schema but the user must have a default and a temporary tablespace
    • Install the IM Advisor locally in this PDB by using the install script imstimadv.sql
      • The script will detect the presences of the IMADVISOR schema. If the IMADVISOR schema is empty, it will proceed. It will then ask you to press ENTER instead of prompting you to set the password and default tablespace. Unless you setup the IMADVISOR user with an automated authentication method, it will still prompt you for the IMADVISOR's password when it connects to the IMADVISOR user

    An issue which I learned about in the past days:

    ORA-24817 get raised when using the IM Advisor.'s imadvisor_fetch_recommendations script unless you do not have a massive shared pool configured. The script does a SET LONGCHUNKSIZE 2000000000; and this needs to be reduced.
    There has been a bug filed for it and I think it's supposed to be fixed in the next release of the IM Advisor.


    Tuesday Feb 24, 2015

    Oracle In-Memory Advisor now available

    Oracle In-Memory is such a great feature - but often the challenge you'll face is the tricky question:
    Which of your tables and/or partitions should you mark for In-Memory column store availability? 

    And the answer is now easier to find as the new In-.Memory Advisor is available via download from MyOracle Support:

    The Advisor produces a report identifying the objects that should be placed In-Memory for maximum benefit, along with a SQL*PLUS script which implements those recommendations. It can be run on Oracle Database and above. And of course the recommendations can be implemented on Oracle Database (and newer).

    Important to know: The In-Memory Advisor is licensed as part of the Database Tuning Pack.

    Further information can be found at: OTN

    In case you have obtained a pre-release version of the Advisor, please discard it and replace it with the production version 



    Mike Dietrich - Oracle Mike Dietrich
    Master Product Manager - Database Upgrade & Migrations - Oracle

    Based in Germany. Interlink between customers/partners and the Upgrade Development. Running workshops between Arctic and Antartica. Assisting customers in their reference projects onsite and remotely. Connect via:

    - -


    « October 2015
    Oracle related Tech Blogs
    Slides Download Center
    Visitors since 17-OCT-2011
    White Paper and Docs
    Viewlets and Videos
    Workshop Map
    This week on my Rega & Pono
    Upgrade Reference Papers