03 Fix Up 12.1.0.2.5 and Recreate EMREPOS


Overview

With the failure of the dbca command to complete correctly (as described in 02 Create EMREPOS Database Using DBCA , I decided to:

  1. Drop the EMREPOS database
  2. Uninstall the Oracle RDBMS 12.1.0.2 software on GORDON
  3. Install the Oracle RDBMS 12.1.0.2 software on GORDON
  4. Apply the 12.1.0.2.5 PSU for RDBMS and OJVM again

References

Procedure

Drop EMREPOS Database

Followed the procedure in A Better Way of Dropping Databases Through RMAN to drop the EMREPOS database.

Uninstall RDBMS 12.1.0.2 Software

Followed the procedure in Deinstall Oracle RDBMS 12.1.0.2 .

Install RDBMS 12.1.0.2 Software

Followed the procedure in Install Oracle RDBMS 12.1.0.2 With Grid Infrastructure .

Update OPATCH

Used the following command to update opatch as the OUI installed an obsolete version:

unzip -o /tmp/p6880880_121010_Linux-x86-64.zip -d /opt/app/oracle/product/12.1.0/dbhome_1

Set Up Patching Environment

Since opatch uses perl , I need to set up the patching environment as follows:

export ORACLE_HOME=/opt/app/oracle/product/12.1.0/dbhome_1
export PATH=${ORACLE_HOME}/OPatch:${ORACLE_HOME}/perl:${PATH}
export PERL5LIB=${ORACLE_HOME}/perl/lib

Apply PSU 12.1.0.2.5

Followed the following steps in 01 Patch GI and DB with PSU 12.1.0.2.5 to apply PSU 12.1.0.2.5 to RDBMS and OJVM:

  1. 6 Apply DB PSU
  2. 7 Apply OJVM PSU
  3. 8 Post-Installation Steps

In brief, the commands wer:

opatch apply -ocmrf /opt/app/oracle/software/ocm.rsp /opt/app/oracle/software/patches/P21359755/21359755/ -silent
opatch apply -ocmrf /opt/app/oracle/software/ocm.rsp -silent /opt/app/oracle/software/patches/P21555660/21555660/

This completed without incident.

Create EMREPOS Using DBCA

Repeated the procedure in 02 Create EMREPOS Database Using DBCA .

And got the same error!

Continue with PSU Post-Installation

Since the container database appeared to be usable, I decided to proceed with the PSU Post-Installation step.

Created a temporary parameter file based on the value found in the alert log:

cat >/tmp/initrepos.ora <<DONE
spfile='+DATA/EMREPOS/PARAMETERFILE/spfile.258.900009511'
DONE

Following the post-installation instructions in Patch 21555660 - Oracle JavaVM Component 12.1.0.2.5 Database PSU (Oct2015) , I set up the environment as follows:

export ORACLE_SID=emrepos
export ORACLE_HOME=/opt/app/oracle/product/12.1.0/dbhome_1
export PATH=${ORACLE_HOME}/bin:${ORACLE_HOME}/OPatch:${PATH}
sqlplus / as sysdba

Then I ran the following SQL*Plus commands:

startup upgrade pfile='/tmp/initrepos.ora'
alter pluggable database all open upgrade;
quit

The data patching was invoked through:

datapatch -verbose

The log was:

SQL Patching tool version 12.1.0.2.0 on Fri Jan  1 19:32:44 2016
Copyright (c) 2015, Oracle.  All rights reserved.

Log file for this invocation: /opt/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_25545_2016_01_01_19_32_45/sqlpatch_invocation.log

Connecting to database...OK
Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Patch 21555660 (Database PSU 12.1.0.2.5, Oracle JavaVM Component (Oct2015)):
  Installed in the binary registry only
Bundle series PSU:
  ID 5 in the binary registry and not installed in any PDB

Adding patches to installation queue and performing prereq checks...
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED
    Nothing to roll back
    The following patches will be applied:
      21555660 (Database PSU 12.1.0.2.5, Oracle JavaVM Component (Oct2015))
      21359755 (Database Patch Set Update : 12.1.0.2.5 (21359755))

Installing patches...
Patch installation complete.  Total patches installed: 4

Validating logfiles...
Patch 21555660 apply (pdb CDB$ROOT): SUCCESS
  logfile: /opt/app/oracle/cfgtoollogs/sqlpatch/21555660/19361790/21555660_apply_EMREPOS_CDBROOT_2016Jan01_19_33_59.log (no errors)
Patch 21359755 apply (pdb CDB$ROOT): SUCCESS
  logfile: /opt/app/oracle/cfgtoollogs/sqlpatch/21359755/19194568/21359755_apply_EMREPOS_CDBROOT_2016Jan01_19_34_10.log (no errors)
Patch 21555660 apply (pdb PDB$SEED): SUCCESS
  logfile: /opt/app/oracle/cfgtoollogs/sqlpatch/21555660/19361790/21555660_apply_EMREPOS_PDBSEED_2016Jan01_19_34_37.log (no errors)
Patch 21359755 apply (pdb PDB$SEED): SUCCESS
  logfile: /opt/app/oracle/cfgtoollogs/sqlpatch/21359755/19194568/21359755_apply_EMREPOS_PDBSEED_2016Jan01_19_34_42.log (no errors)
SQL Patching tool complete on Fri Jan  1 19:34:59 2016

Then the database instance was shutdown.

Manual Repair

Followed the manual repair section of 02 Create EMREPOS Database Using DBCA to fix up the GI resources and other things.