Do you have to execute catbundle.sql when you create a new 11g database?

Do you have to execute catbundle.sql when you create a new 11g database?Roberto Valsania asked this question once he read my blog post about whether you have to execute datapatch after creating a new 12c database: Do you have to execute catbundle.sql when you create a new 11g database?

I’d bet you all are aware that Oracle Database 11.2.0.4 will go out of Waived Extended Support by end of 2018. But that doesn’t answer the question. So I did a quick experiment and created a fresh 11.2.0.4 database to answer the question.

Do you have to execute catbundle.sql when you create a new 11g database?

First of all, let me clarify what catbundle.sql does – just in case you’ve never applied any bundle patches to your Oracle environment. catbundle.sql is the script which adds the necessary SQL changes to a database after you applied a patch bundle. It has to be executed after you applied a patch bundle as there may be for instance changes to a PL/SQL package or function. And with catbundle.sql you make these necessary changes to your database(s).

Now with Oracle 12c we had to change the mechanism thanks to Oracle Multitenant. As the PDB$SEED is read-only and you may have many PDBs having a SQL script wasn’t the best option. Therefore datapatch.pl came into play. Simple rule: Oracle 11g – use catbundle.sql. Oracle 12c/18c/19c use datapatch.

Quick Experiment

I create a CUSTOM database with my 11.2.0.4 environment. It has the most recent April 2018 PSU installed already.

Do you have to execute catbundle.sql when you create a new 11g database?

Then I connect to my new database HANS and check with check_patches.sql (one query will fail with 11g) if any patches are known to the database already:

export ORACLE_SID=HANS

sqlplus / as sysdba

SELECT TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time,
  action,
  namespace,
  version,
  id,
  comments,
  bundle_series
FROM  sys.registry$history
ORDER by action_time;

ACTION_TIME	     ACTION	NAMESPACE	     VERSION		ID COMMENTS			  BUNDLE_SER
-------------------- ---------- -------------------- ---------- ---------- ------------------------------ ----------
25-APR-2018 13:28:48 APPLY	SERVER		     11.2.0.4	    180417 PSU 11.2.0.4.180417		  PSU

Question answered:
As long as you create a CUSTOM database in Oracle 11g with DBCA, it will execute catbundle.sql by itself.

You don’t have to run it. But you won’t harm the database if you run it again.

Are you looking for information on DBCA and Oracle 12c/18c/19c instead?

–Mike

 

Share this: