Upgrade to Oracle 12.1.0.2 problems

I was recently tasked with upgrading  an Oracle RDBMS 11.2.0.4 to 12.1.0.2. The platform is Windows 2012 R2. I know about not being able to move the listener to the new 12c home, which prevents me from using the upgrade utility DBUA.  However, this time there was a nasty surprise in store for me. I ran all the pre-upgrade steps and done all the pre-upgrade fixes and it was time to run catctl.pl. Here is what happened:

C:\app\oracle\product\12.1.0\dbhome_1\RDBMS\ADMIN>%ORACLE_HOME%\perl\bin\perl catctl.pl catupgrd.sql
Undefined subroutine &Tie::Hash::NamedCapture::flags called at C:\app\oracle\age
nt12c\core\12.1.0.5.0\perl\lib/Tie/Hash/NamedCapture.pm line 9.
Compilation failed in require at C:\app\oracle\agent12c\core\12.1.0.5.0\perl\lib/English.pm line 148.
BEGIN failed--compilation aborted at C:\app\oracle\agent12c\core\12.1.0.5.0\perl
\lib/English.pm line 148.
Compilation failed in require at catctl.pl line 322.
BEGIN failed--compilation aborted at catctl.pl line 322
.

The line 322 of catctl.pl is “use English;”, a normal and very frequently used Perl directive. Fortunately, I am not completely unfamiliar with Perl, so I was able to figure out the problem. The problem was in OEM:

C:\app\oracle\product\11.2.0\db_1\NETWORK\ADMIN>echo %PERL5LIB%
C:\app\oracle\agent12c\core\12.1.0.5.0\perl\lib;C:\app\oracle\agent12c\core\12.1
.0.5.0\perl\site\lib;C:\app\oracle\agent12c\core\12.1.0.5.0\sysman\admin\scripts

The variable PERL5LIB tells the Perl interpreter where to look for modules. This variable is obviously set on the system-wide basis and is set to OEM 12c directories.  Apparently, there is something in the OEM version of the English.pm module that Perl that comes in Oracle 12c home didn’t like. As soon as I’ve unset this in the CMD windown, by executing set PERL5LIB=<CR>, the upgrade script started working as advertised:
C:\app\oracle\product\12.1.0\dbhome_1\RDBMS\ADMIN>%ORACLE_HOME%\perl\bin\perl catctl.pl catupgrd.sql

Argument list for [catctl.pl]
SQL Process Count     n = 0
SQL PDB Process Count N = 0
Input Directory       d = 0
Phase Logging Table   t = 0
Log Dir               l = 0
Script                s = 0
Serial Run            S = 0
Upgrade Mode active   M = 0
Start Phase           p = 0
End Phase             P = 0
Log Id                i = 0
Run in                c = 0
Do not run in         C = 0
Echo OFF              e = 1
No Post Upgrade       x = 0
Reverse Order         r = 0
Open Mode Normal      o = 0
Debug catcon.pm       z = 0
Debug catctl.pl       Z = 0
Display Phases        y = 0
Child Process         I = 0

catctl.pl version: 12.1.0.2.0
Oracle Base           = c:\app\oracle

Analyzing file catupgrd.sql
Log files in C:/app/oracle/product/12.1.0/dbhome_1/RDBMS/ADMIN
catcon: ALL catcon-related output will be written to catupgrd_catcon_4296.lst
catcon: See catupgrd*.log files for output generated by scripts
catcon: See catupgrd_*.lst files for spool files, if any
Number of Cpus        = 8
SQL Process Count     = 0
New SQL Process Count = 4

------------------------------------------------------
Phases [0-73]         Start Time:[2018_03_30 21:25:39]
------------------------------------------------------
Serial   Phase #: 0      Files: 1     Time: 258s
Serial   Phase #: 1      Files: 5     Time: 75s
Restart  Phase #: 2      Files: 1     Time: 1s
Parallel Phase #: 3      Files: 18    Time: 20s
Restart  Phase #: 4      Files: 1     Time: 0s
Serial   Phase #: 5      Files: 5     Time: 31s
Serial   Phase #: 6      Files: 1     Time: 24s
Serial   Phase #: 7      Files: 4     Time: 15s
Restart  Phase #: 8      Files: 1     Time: 1s
Parallel Phase #: 9      Files: 62    Time: 56s
Restart  Phase #:10      Files: 1     Time: 0s
Serial   Phase #:11      Files: 1     Time: 27s
Restart  Phase #:12      Files: 1     Time: 0s
Parallel Phase #:13      Files: 91    Time: 32s
Restart  Phase #:14      Files: 1     Time: 0s
Parallel Phase #:15      Files: 111   Time: 44s
Restart  Phase #:16      Files: 1     Time: 1s
Serial   Phase #:17      Files: 3     Time: 3s
Restart  Phase #:18      Files: 1     Time: 0s
Parallel Phase #:19      Files: 32    Time: 31s
Restart  Phase #:20      Files: 1     Time: 0s
Serial   Phase #:21      Files: 3     Time: 17s
Restart  Phase #:22      Files: 1     Time: 0s
Parallel Phase #:23      Files: 23    Time: 125s
Restart  Phase #:24      Files: 1     Time: 1s
Parallel Phase #:25      Files: 11    Time: 49s
Restart  Phase #:26      Files: 1     Time: 0s
Serial   Phase #:27      Files: 1     Time: 3s
Restart  Phase #:28      Files: 1     Time: 0s
Serial   Phase #:30      Files: 1     Time: 0s
Serial   Phase #:31      Files: 257   Time: 47s
Serial   Phase #:32      Files: 1     Time: 0s
Restart  Phase #:33      Files: 1     Time: 1s
Serial   Phase #:34      Files: 1     Time: 10s
Restart  Phase #:35      Files: 1     Time: 0s
Restart  Phase #:36      Files: 1     Time: 1s
Serial   Phase #:37      Files: 4

The upgrade was completed successfully and the database is up and running as a 12c database. This, however, was the first time I ran into an intereference from OEM 12c agent. Apparently, the OEM 12c Perl modules are incompatible with the version delivered in Oracle 12.1.0.2. Go figure.

 

About mgogala

I am a consultant with an extensive Oracle DBA experience. I have worked on very large databases. I have worked with OPS and RAC since its inception.I am also a published book writer, having published two books about PHP. This blog is about the challenges and adventures in my professional life. Sorry, no family pictures here.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment