Thursday, July 4, 2013

Fun with DB 12cR1 Upgrade

It’s 5 AM and its pouring outside – couldn’t be a worse start to a July 4th holiday in the summer! I woke up (for some reason) and can’t fall back asleep and figured I might try my luck at a database upgrade with 12.1.0.1 :)

Many of us have already posted blogs about their respective experience. I thought I’d try to upgrade an OEM 12.1.0.2.0 environments 11.2.0.1 Database with the latest version.

Here goes.

VirtualBox: 4.2.12
OS: OEL 6.3 64bit
Database: 11.2.0.1 64bit


[oracle@spoon database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 22621 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4051 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-04_06-09-58AM. 
Please wait ...

















[root@spoon ~]# /u01/app/oracle/product/12.1.0.1/dbhome_1/root.sh
Performing root user operation for Oracle 12c

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/12.1.0.1/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

Okay, now we get to the fun part :)

[oracle@spoon ~]$ dbua 





Interesting – there are some errors:


I want to let the Upgrade Assistance fix the errors now.


 The immediate errors are fixed.






Since this is an OEM Repository database, I will not configure Database Express.




The installer wouldn’t let me pick any port even though the previous version listener was not running. I went back to this later and found that my /etc/hosts (wrong IP Address for the host) wasn’t configured properly which caused the issue.





Go speed-racer Go!!




I sincerely appreciate the Activity Log option – its nice to feel warm and fuzzy that “something” is happening.




Very nice. All done!


Great! The easy part is done.


Let’s start OMS now.

It took a while but it came up!

[oracle@spoon ~]$ . oraenv
ORACLE_SID = [monster] ? OEM
The Oracle base for ORACLE_HOME=/u01/app/oracle/middelware/oms is /u01/app/oracle
[oracle@spoon ~]$ emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 2 
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
WebTier is Down
Oracle Management Server is Down
[oracle@spoon ~]$ emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 2 
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up

Interesting, status Unknown for all Targets!




Turns out, the Agent is unreachable. I’ll probably try to fix this later today. Time to feed the little munchkin and get the meat ready for the afternoon grill!

Edit: I got time to finally sit and figure this one out. I did the following and now all targets are available. Prior to issuing a clearstate, I cleaned the directories under $AGENT_HOME/sysman/emd - for example, here.


[oracle@spoon ~]$ . oraenv
ORACLE_SID = [OEM] ? AGENT
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID oracle.
You can set ORACLE_BASE manually if it is required.
[oracle@spoon ~]$ emctl stop agent
[oracle@spoon ~]$ emctl clearstate agent
[oracle@spoon ~]$ emctl secure agent
[oracle@spoon ~]$ emctl start agent

[oracle@spoon ~]$ emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2  
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.2.0
OMS Version       : 12.1.0.2.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /u01/app/oracle/agent/agent_inst
Agent Binaries    : /u01/app/oracle/agent/core/12.1.0.2.0
Agent Process ID  : 17356
Parent Process ID : 17307
Agent URL         : https://spoon.song:3872/emd/main/
Repository URL    : https://spoon.song:4903/empbs/upload
Started at        : 2013-07-04 11:47:47
Started by user   : oracle
Last Reload       : (none)
Last successful upload                       : 2013-07-04 15:25:45
Last attempted upload                        : 2013-07-04 15:25:45
Total Megabytes of XML files uploaded so far : 2.66
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 28.48%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2013-07-04 15:28:09
Last successful heartbeat to OMS             : 2013-07-04 15:28:09
Next scheduled heartbeat to OMS              : 2013-07-04 15:29:09

---------------------------------------------------------------
Agent is Running and Ready




Happy July 4th!!

No comments :

Post a Comment