12c CDB with PDB the extended directors cut



My last post showed how to do this as simply as possible but i hit a few snags along the way - here is the fuller version of how i ended up with the 'simple' version and an issue with the oracle provided scripts that doesnt seem to have been picked up anywhere else.

I won't go over the creation process again, I'll just pick out what the issues were

First up when i tried to create the cdb, i tried to use my 'simple as possible' init file - this failed miserable on the first attempt with this error

SQL> create database enable pluggable database;
create database enable pluggable database
*
ERROR at line 1:
ORA-65093: container database not set up properly


OK - strange - lets see what oeer says for that

#oerr ora 65093
65093, 00000, "container database not set up properly"
// *Cause: User attempted to open a container database without the correct
//         init.ora parameter for a container database
// *Action: Set the parameter for container database in the init.ora and
//          restart the database
//


So I'm just missing the parameter enable_pluggable_database=true - easily fixed that one.

The next issue is the docs tell you to run catcdb.sql - but that file is nowhere no be found - it got missed from the 12.1.0.1 deployment and has to be downloaded from here missing catcdb

Again easily fixed - lets apply that and the file magically appears (no downtime needed for anythng in the home for this :-))

[oracle@]:DEMO:[/oracle/12.0.0.1/patches]# ls
p17316776_121010_Generic.zip
[oracle@]:DEMO:[/oracle/12.0.0.1/patches]# unzip p17316776_121010_Generic.zip
Archive:  p17316776_121010_Generic.zip
   creating: 17316776/
   creating: 17316776/files/
   creating: 17316776/files/rdbms/
   creating: 17316776/files/rdbms/admin/
  inflating: 17316776/files/rdbms/admin/catcdb_int.sql
  inflating: 17316776/files/rdbms/admin/catcdb.sql
  inflating: 17316776/README.txt
   creating: 17316776/etc/
   creating: 17316776/etc/xml/
  inflating: 17316776/etc/xml/ShiphomeDirectoryStructure.xml
  inflating: 17316776/etc/xml/GenericActions.xml
   creating: 17316776/etc/config/
  inflating: 17316776/etc/config/actions.xml
  inflating: 17316776/etc/config/inventory.xml
[oracle@]:DEMO:[/oracle/12.0.0.1/patches]# cd 17*
[oracle@]:DEMO:[/oracle/12.0.0.1/patches/17316776]# $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/12.0.0.1
Central Inventory : /oracle/oraInventory
   from           : /oracle/12.0.0.1/oraInst.loc
OPatch version    : 12.1.0.1.0
OUI version       : 12.1.0.1.0
Log file location : /oracle/12.0.0.1/cfgtoollogs/opatch/17316776_Jan_20_2014_21_21_02/apply2014-01-20_21-21-02PM_1.log

Applying interim patch '17316776' to OH '/oracle/12.0.0.1'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.rdbms.dbscripts, 12.1.0.1.0...

Verifying the update...
Patch 17316776 successfully applied
Log file location: /oracle/12.0.0.1/cfgtoollogs/opatch/17316776_Jan_20_2014_21_21_02/apply2014-01-20_21-21-02PM_1.log

OPatch succeeded.


So now we have the file lets run it - and hit a whole load of problems.....

catcdb itself is fine - but this calls a file called catcdb_int.sql which has some 'issues'

when you first run it you get problems like this:

Can't open perl script "{/oracle/12.0.0.1/rdbms/admin/}catcon.pl": No such file or directory

After some investigation it seems that the {} brackets are being literally interpreted so oracle is looking for a file with {} in the actual name - which of course it will never find.

At first i thought this might be a perl version issue so i made sure the oracle supplied perl was first in the path but that made no difference.

In the end i had to edit the file itself and do the following replacements:

replace all { with nothing
replace all } with \

The way to do this in vi is as follows:

:%s/{//g
and
:%s/}/\\/g

Then save the file.

This fixed 99% of the issue

I then had java problems as the JAVA_POOL_SIZE was too small (again easily fixed) - throwing things like this

SQL> select dbms_java.longname('foo') from dual;
select dbms_java.longname('foo') from dual
                                      *
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java
pool","oracle/aurora/rdbms/DbmsJava","JOXLE^50c2f85e",":SGAClass")


After all those there was also another script problem with 'ovm' - to start with i didnt know what this was - but them i realised it was a type and this was half the problem - it should be owm for workspace manager - but even then the command was still wrong - i ended up editing the whole line to change it to this

host perl -I &&rdbms_admin &&rdbms_admin_slash\catcon.pl -u SYS/&&sysPassword -U SYS/&&sysPassword -d &&rdbms_admin -n 1 -b owminst owminst.plb

Then i had issues with the apex creation as i hadnt created a temp tablespace - again easily fixed.

There was just one final issue - the script to apply any PSU's was also wrong and had a filename that didnt exist.

I updated this to the below

host perl -I &&rdbms_admin &&rdbms_admin_slash\catcon.pl -u SYS/&&sysPassword -U SYS/&&sysPassword -d &&rdbms_admin -n 1 -b catbundleapply catbundle_psu.sql

And this then fixed the final problem - the script now runs end to end with no problem.

I'm not sure if the {} issue is specific to SLES as i see no mention of it on google.

I assume catcdb and catcdb_int will be fixed in due course as it's only a minor thing.

Database creation took 1hr 20 mins by the way so i can;t imagine many people will do it this way and will instead use dbca or other methods to create the database.

The scripts give you a lot of control but do take a long time even with all the optimisations to run a ot of the scripts in parallel.




0 comments:

Post a Comment