logo
How to upgrade oem12c to latest release 4?


001. Introduction

Present: OEM12c v 12.1.0.3

I don’t want to install a new one, i want to upgrade existing oem12c version 12.1.0.3.0 (release 3)  to version 12.1.0.4.0 (release 4).

I want to preserve current metrics and entire configuration – i don’t want to defined metrics, etc – i don’t want to lose anything from current oem12c settings. So I prepare an upgrade of current system…


 

Example of entire installation process:


 

002. Documentation

Documentation about this upgrade is available here: http://docs.oracle.com/cd/E24628_01/index.htm

OEM12c info page

OEM12c info page

Here is info about “Upgrade to Oracle Enterprise Manager Cloud Control 12c”:

http://www.oracle.com/technetwork/oem/grid-control/downloads/oem-upgrade-console-502238.html

Because I have OEM release 3, to upgrade my system I use path number 2:
Path 2: from EM 12.1.0.2 /12.1.0.3 to EM 12.1.0.4
To upgrade from EM 12.1.0.2, EM 12.1.0.3 you are not required to apply any Pre-upgrade console patch or to download any 12.1.0.4 agent binaries or plug-ins


 

003. Download installation files

As displayed, no need to install console patch etc. – but we must have installation downloaded.

Download installation files

Download installation files

This is an example of linux version:

Download em12104_linux64_disk1.zip (2,195,693,096 bytes) (cksum – 4176170445)
Download em12104_linux64_disk2.zip (1,877,449,643 bytes) (cksum – 3219437597)
Download em12104_linux64_disk3.zip (2,727,123,784 bytes) (cksum – 2554054536)

 

WARNING:

When downloaded, TEST ARCHIVE CONTENT. I got situation (in last update), when zip files are succesfully downloaded, they are successfully unpacked (without any error! – sic!), but I got problems during installation process. When I tested this archive, I have seen an error. So test archive integrity before installing…

unzip -t FILENAME.ZIP

 

 

004. Unpack downloaded files

Test and unpack files:

# example # unzip em12104_linux64_disk1.zip -d PATH_WHERE_WE_PLACE_INSTALLATION_FILES
unzip em12104_linux64_disk1.zip -d /u01/oms_install
unzip em12104_linux64_disk2.zip -d /u01/oms_install
unzip em12104_linux64_disk3.zip -d /u01/oms_install

 

 

005. Preparation – step 1

BEFORE INSTALLATION MAKE A FULL BACKUP (database + oms).

 

I manually start database (placed on same host as oms) and oms + agent.
If your database and oms is starting with server, skip to point 006.

# i setting my enviroment variables and starting database
[oracle@localhost ~]$ ./baza_start.sh 

SQL*Plus: Release 11.2.0.1.0 Production on So Gru 20 23:56:31 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> ORACLE instance started.

Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 633341944 bytes
Database Buffers 197132288 bytes
Redo Buffers 6590464 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-GRU-2014 23:56:39

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 20-GRU-2014 23:56:41
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully

 

Scripts used (only for me…)

(1) Set database enviroments:

(2) Run database:


 

006.  Preparation – step 2

Check database for invalid objects. If you have any – compile before start.
In this example I don’t have any, but at production I got 7 objects. Check this before start.

[oracle@localhost ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on N Gru 21 00:52:04 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 
SQL> select * from dba_objects where status !='VALID';

no rows selected

SQL> exit

 

007. Copy emkey.ora to database

Maybe I am too lazy – I used tnsping to create connect-string 😀

[oracle@localhost ~]$ tnsping orcl

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 21-GRU-2014 00:21:56

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:
/u01/app/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.localdomain)))
OK (10 msec)

# again, but remove spaces (sed used)
[oracle@localhost ~]$ tnsping orcl | sed 's/ //g'

TNSPingUtilityforLinux:Version11.2.0.1.0-Productionon21-GRU-201400:22:52

Copyright(c)1997,2009,Oracle.Allrightsreserved.

Usedparameterfiles:
/u01/app/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora


UsedTNSNAMESadaptertoresolvethealias
Attemptingtocontact(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl.localdomain)))
OK(0msec)

# test - link is correct? - we connect into database...
[oracle@localhost ~]$ sqlplus sysman@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl.localdomain)))'

SQL*Plus: Release 11.2.0.1.0 Production on N Gru 21 00:23:18 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Enter password: 

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 

# WORKS!!!!!!

 

Be sure, that password of Weblogic Admin are correct. Check it by log into console (usually https://localhost:7102/console).

Log into weblogic console to verify password

Log into weblogic console to verify password

 

Shutdown oms (if up).

[oracle@localhost ~]$ . oms.env 
[oracle@localhost ~]$ emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 3 
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Node Manager Not Running
Oracle Management Server is Down

 

Now copy emkey.ora to database (connect-link is used here):

# emctl config emkey -copy_to_repos_from_file -repos_conndesc CONNECT_LINK -repos_user sysman -emkey_file PATH_TO_EMKEY_ORA

[oracle@localhost ~]$ emctl config emkey -copy_to_repos_from_file -repos_conndesc '"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl.localdomain)))"' -repos_user sysman -emkey_file /u01/app/oracle/middleware/oms/sysman/config/emkey.ora
Oracle Enterprise Manager Cloud Control 12c Release 3 
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Enter Admin User's Password :  # Weblogic admin password
Enter Enterprise Manager Root (SYSMAN) Password : # Password to SYSMAN account in database
The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey by running "emctl config emkey -remove_from_repos".

Skip to part 008 – rest of this step is an explanation of possible errors.

 

Errors that can be spotted….

[oracle@localhost ~]$ emctl config emkey -copy_to_repos_from_file -repos_conndesc '"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl.localdomain)))"' -repos_user sysman -emkey_file /u01/app/oracle/middleware/oms/sysman/config/emkey.ora
Oracle Enterprise Manager Cloud Control 12c Release 3 
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Enter Admin User's Password : 
Enter Enterprise Manager Root (SYSMAN) Password : xxxxxxxxxxxxxxx
Error occurred. Check the log /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log/secure.log


[oracle@localhost ~]$ tail -30 /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log/secure.log
2014-04-19 02:59:18,597 [main] INFO mas.CredStoreUtil logp.251 - getCredential : Got creds for mapName -EM keyName - REPOS_DETAILS
2014-04-19 02:59:18,658 [main] INFO mas.CredStoreUtil logp.251 - getCredential : Got creds for mapName -EM keyName - ENCR_DETAILS
2014-12-21 01:19:22,975 [main] ERROR oms.EMKeyCmds logp.251 - Failed to get connection to repos : ORA-01017: invalid username/password; logon denied

java.sql.SQLException: ORA-01017: invalid username/password; logon denied

 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
 at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:600)
 at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:445)
 at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
 at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
 at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:380)
 at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:760)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
 at java.sql.DriverManager.getConnection(DriverManager.java:582)
 at java.sql.DriverManager.getConnection(DriverManager.java:154)
 at oracle.sysman.emctl.config.oms.EMKeyCmds.getReposConnection(EMKeyCmds.java:468)
 at oracle.sysman.emctl.config.oms.EMKeyBRCmds.processEmKeyBRCmd(EMKeyBRCmds.java:239)
 at oracle.sysman.emctl.config.oms.EMKeyBRCmds.main(EMKeyBRCmds.java:293)
2014-12-21 01:19:22,980 [main] ERROR oms.EMKeyBRCmds logp.251 - Either Sysman password is invalid or there was a problem in connecting to the DB
java.sql.SQLException: Either Sysman password is invalid or there was a problem in connecting to the DB
 at oracle.sysman.emctl.config.oms.EMKeyCmds.getReposConnection(EMKeyCmds.java:479)
 at oracle.sysman.emctl.config.oms.EMKeyBRCmds.processEmKeyBRCmd(EMKeyBRCmds.java:239)
 at oracle.sysman.emctl.config.oms.EMKeyBRCmds.main(EMKeyBRCmds.java:293)
[oracle@localhost ~]$ 

 

If you can’t import emkey.ora and see error like this, there can be two reasons:

  • password for SYSMAN is incorrect (try to login into database as sysman to check)
  • connect-link are incorrect.
  • test them (examples how-to are in part 007)
  • be sure, that password enterred as Weblogic admin are correct (“Enter Admin User’s Password” question).  As I have tested, it accepts incorrect values! I haven’t tested what the consequences are (maybe upgrade will fail during repository upgrade process?).
  • To check weblogic password, log into weblogic console (usually https://OMS_HOSTNAME:7102/console)

 

 

008. Installation

Present as images – it’s just click-next sequence. On production enviroment entire process took for me 2 hours. Longest part is to create repository.

From oracle user run installation file (unpacked in step 004) (remind: we have database up and entire oms are down):

[oracle@localhost ~]$ /media/dysk/oem/runInstaller 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 400 MB. Actual 16433 MB Passed
Checking swap space: must be greater than 150 MB. Actual 3999 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-12-21_11-31-00AM. Please wait ...[oracle@localhost ~]$ 

 

Screenshoots of installation process. Description of every step are below image.

 

Uncheck  i wish to receive...

Uncheck i wish to receive…

Uncheck “i wish to receive security updates via My Oracle Support” (my site are not connected in internet).


 

Confirm

Confirm

Confirm request.

 

select Skip

Select skip

Skip.


 

Click on Next

Click on Next

Prerequisite check. I passed…


 

Select upgrade old version

Select upgrade old version

Because I do not place a new one oem12c installation, I do only an upgrade of existing enviroment:

  • Select:
  • Upgrade an existing Enterprise Manager System
  • One System Upgrade
  • and mark installed Oracle Homes

 

Enter new middleware path

Enter new middleware path

Enter new middleware path (this is outplace upgrade, new middleware will be created).
You need enought space available.
Destination directory can exist or not (installer will create it). Be sure, that user can create directory in this path.


 

Enter passwords

Enter passwords

Enter password for SYS, SYSMAN and check that you made an backup of your enviroment – mark “Confirm that you have backed up the Management Repository”.


 

Click...

Click…

Warnig about needed patches. I have all (release 3).


 

Confirm action

Confirm action

Few parameters in database need to be changed. Allow.


 

Click on ok to allow changes

Click on ok to allow changes

Again allow to change parameters.

 

Rest of changes (previous screenshoot)

Rest of changes (previous screenshoot)

Screen continuation.


 

Version comparision

Version comparision

List of plugins which may be upgraded.


 

Select additional plugins if needed

Select additional plugins if needed

Select additional plugins if needed.


 

Enter weblogic password

Enter weblogic password

Enter Weblogic password.


 

Summary list - all path variables

Summary list – all path variables

Summary window – do a screenshoot or copy 🙂


 

Installation started. Click on View Log

Installation started. Click on View Log

Installation started. Click on “View Log” to open window to see progress.

 

Log output

Log output

Log output. Look at window bar – you can also put tail on this file (tail -f xxxx).


 

Longest part of installation process

Longest part of installation process

Repository Upgrade – this step takes most of the time in entire process. Be patient. I also think, that the process has died (too many time taken – logs look like the process stuck).


 

Installation is ending!

Installation is ending!

End of upgrade process – almost done…


 

Run an root script

Run an root script

As displayed, run as root user script in this path.

 

Run the root script...

Run the root script…

That is how it looks like…


 

 

Summary page with URL to em

Summary page with URL to em

Summary page after entire process. Open the browser and direct into displayed address. OMS is started already.


 

 

Oem12c Release 4!

Oem12c Release 4!

Success! Oracle Enterprise Manager Cloud Control 12c Release 4 is working!

This is the screen from my tests, but in production also everything works fine – metrics, agents, everything is available.

Good luck!


 

009. Last step

If you are manually starting your database and oms – after upgrade block auto-running, otherwise oms will try to start (when database is still down).

Rename or move file “gcstartup” located at /etc/init.d/gcstartup


 

 

010. Conclusion

I have not encountered any error during upgrade.

To be sure, that everything goes without any problems,

keep in mind:

  • check database for invalid objects
  • check sysman + weblogic admin passwords that they are correct
  • check available free space in /tmp (delete trash)
  • if possible, restart machine before upgrade (or database at least)
  • be patient – upgrade of repository takes really long time

 

 

 

 

.