This post was originally published on this site

Last weekend was patchday. The goal was to apply the patch 24732082 (DATABASE PATCH SET UPDATE 12.1.0.2.170117) to a 12.1.0.2 database on AIX. The OPatch precheck returned no error and OPatch apply was ok. The problem was the post step, the datapatch command failed with the message catconInit failed, exiting.

oracle@srvaix101:/u00/app/oracle/product/12.1.0.2/dbhome_1/OPatch/ [STRSP01] ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Sun Apr  2 08:39:35 2017
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /u00/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_45548440_2017_04_02_08_39_35/sqlpatch_invocati                                               on.log

Connecting to database...OK

catconInit failed, exiting

Please refer to MOS Note 1609718.1 and/or the invocation log
/u00/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_45548440_2017_04_02_08_39_35/sqlpatch_invocation.log
for information on how to resolve the above errors.

SQL Patching tool complete on Sun Apr  2 08:39:36 2017

The solution was described in this My Oracle Support Note: Datapatch fails with “catconInit: database is not open on the default instance” (Doc ID 2003488.1)

In the glogin.sql file  located in ORACLE_HOME/sqlplus/admin were two lines:

set lines 400
set pages 0

After I have commented out these lines, everything runs ok.

oracle@srvaix101:/u00/app/oracle/product/12.1.0.2/dbhome_1/OPatch/ [STRSP01] ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Sun Apr  2 08:52:42 2017
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /u00/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_45351856_2017_04_02_08_52_42/sqlpatch_invocation.log

Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series PSU:
  ID 170117 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
    24732082 (DATABASE PATCH SET UPDATE 12.1.0.2.170117)

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

Validating logfiles...
Patch 24732082 apply: SUCCESS
  logfile: /u00/app/oracle/cfgtoollogs/sqlpatch/24732082/20919987/24732082_apply_STRSP01_2017Apr02_08_53_02.log (no errors)
SQL Patching tool complete on Sun Apr  2 08:53:39 2017

Summary: Two small lines, a huge effect.

Summary: Two small lines, a big impact.