Saturday, May 8, 2021

Oracle Enterprise Manager Cloud Control 13c (OMS upgrade from 13.3 or 13.4 to OMS 13.5)

 OMS upgrade from 13.3 or 13.4 to OMS 13.5

PHASE -I Planning

1. OMS 13.5 is the latest Oracle Cloud Control version available.

2. To directly upgrade to 13.5 minimum OMS version required is 13.3 or 13.4. If the OMS 13.2 or lower OMS 12c is installed, Then we need to get OMS upgraded to 13.3 or 13.4 first and then to 13.5.

3. My OS version is Oracle Linux 7 x86_64. Enterprise Manager Base Platform - OMS 13.5.0.0.0 is certified on Linux x86-64 Oracle Linux 7

4. With recent re-branding exercise, BI Publisher will be available as Oracle Analytics Publisher. So if there are BI publisher reports, those have to be exported first. fortunately we were not using BI Publisher.

5. Enterprise Manager Base Platform - OMS 13.5.0.0.0 is certified with Oracle Database 19.0.0.0.0 (Repository) on Linux x86-64 Oracle Linux 7 Update 4+, so my Repository database version was 12.1.0.2. 

PHASE -II Repository Upgrade

I have to upgrade Repository to 19.0.0.0.0 first. Please follow below documents for Upgrade.

Oracle 19c - Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 19c (Doc ID 2539778.1)

https://docs.oracle.com/en/database/oracle/oracle-database/19/upgrd/index.html

PHASE -III OMS Upgrade planning and setup

6. Prerequisites for OMS Upgrade to 13.5

a. Download software from https://www.oracle.com/enterprise-manager/downloads/linux-x86-64-13c-rel5-downloads.html

DONOT UNZIP it.

b.Ensure that the host on which the OMS is being upgraded meets the hardware and package requirements.



Refer:
    Hardware Requirements for Enterprise Manager Cloud Control
    Package, Kernel Parameter, and Library Requirements for Enterprise Manager Cloud Control

c. Once the OMS is upgraded to 13.5, any existing 13.3 and 13.4 agents would continue to function. If you have any earlier releases of Management Agent, then before upgrading the OMS to 13c Release 5, make sure you upgrade the Management Agents of other earlier releases to 13.3 or 13.4 (same version as the OMS) using the Agent Upgrade Console that is present within the Enterprise Manager Cloud Control Console. To find agents versions lower than 13.3.0.0.0 run the following SQL query on the repository database as SYSMAN user:



SQL> select mt.target_name||' Agent Version='|| mtp.property_value from mgmt_target_properties mtp , mgmt_targets mt where mt.target_type='oracle_emd' and mt.target_guid = mtp.target_guid and mtp.property_name='Version' and mtp.property_value < '13.3.0.0.0';



d. Ensure that the tables in the Management Repository do not have any snapshots created:

select master, log_table from all_mview_logs where log_owner='SYSMAN';

e. Ensure that you do not have any logon or logoff triggers set in the Oracle Database that houses the Oracle Management Repository.

SQL> SELECT trigger_name FROM sys.dba_triggers WHERE TRIGGERING_EVENT LIKE 'LOGON%' AND status='ENABLED';
SQL> SELECT trigger_name FROM sys.dba_triggers WHERE TRIGGERING_EVENT LIKE 'LOGOFF%' AND status='ENABLED';

If there are any logon or logoff triggers, disable them as below:

  SQL> alter trigger <trigger_name> disable;

f. Disable the password_verify_function on the repository DB (if enabled):

alter profile default limit password_verify_function null;
g. If you have any customized applications rendering information from Repository database using sysman or sysman related schemas, then please stop all these applications before starting upgrade.

h. Once you stop all OMS before starting the upgrade, make sure no active sysman sessions running in the Repository database. Executing the below query as SYS user in Repository will help you to know the active sessions running in Repository database

SQL> select sid,serial#,username,status,action,machine from v$session;
The above query will tell you on which machine the sessions are running. Please connect to respective machine, verify and stop the applications using these sysman sessions.

i. Ensure that the database initialization parameter (_allow_insert_with_update_check) is set to true in the Oracle Database 18c or 19c:

alter system set _allow_insert_with_update_check=true scope=both;
j. For improved SQL performance all the adaptive features parameters should be unset prior to the upgrade:

Connect to the database as SYSDBA and run the following commands:

alter system reset "_optimizer_nlj_hj_adaptive_join" scope=both sid='*';
alter system reset "_optimizer_strans_adaptive_pruning" scope=both sid='*';
alter system reset "_px_adaptive_dist_method" scope=both sid='*';
alter system reset "_sql_plan_directive_mgmt_control" scope=both sid='*';
alter system reset "_optimizer_dsdir_usage_control" scope=both sid='*';
alter system reset "_optimizer_use_feedback" scope=both sid='*';
alter system reset "_optimizer_gather_feedback" scope=both sid='*';
alter system reset "_optimizer_performance_feedback" scope=both sid='*';
alter system set job_queue_processes=0;



Copy the emkey using the following commands, adjust as required. You will have to enter the Cloud Control sysman password.

export OMS_HOME=/u01/app/oracle/middleware
$OMS_HOME/bin/emctl config emkey -copy_to_repos -sysman_pwd Welcome1
$OMS_HOME/bin/emctl status emkey -sysman_pwd Welcome1

7. Refer https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.5/emupg/index.html

# Set parameters.
UNIX_GROUP_NAME=oinstall
ORA_INVENTORY=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
MW_HOME=${ORACLE_BASE}/middleware2
OMS_HOME=${MW_HOME}
GC_INST=${ORACLE_BASE}/gc_inst2
OLD_BASE_DIR=${ORACLE_BASE}/middleware
ORACLE_HOSTNAME=${HOSTNAME}
WLS_USERNAME=weblogic
WLS_PASSWORD=Welcome1
DATABASE_HOSTNAME=${HOSTNAME}
LISTENER_PORT=1521
PDB_NAME=emrep
SYS_PASSWORD=SysPassword1
SYSMAN_PASSWORD=${WLS_PASSWORD}

Invoke the Enterprise Manager Cloud Control installer in silent mode and pass the updated response file:

The installer requires about 14 GB of hard disk space in the temporary directory. 

./em13500_<platform>.bin -silent -responseFile <absolute_path_to_the_directory_where_the_generated_and_updated_response_file_is_stored>/upgrade.rsp -J-Djava.io.tmpdir=/u01/tmp/

cat > /tmp/upgrade.rsp <<EOF
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=${UNIX_GROUP_NAME}
INVENTORY_LOCATION=${ORA_INVENTORY}
INSTALL_UPDATES_SELECTION=skip
ORACLE_MIDDLEWARE_HOME_LOCATION=${MW_HOME}
ORACLE_INSTANCE_HOME_LOCATION=${GC_INST}
OLD_BASE_DIR=${OLD_BASE_DIR}
ORACLE_HOSTNAME=${ORACLE_HOSTNAME}
ONE_SYSTEM=true
WLS_ADMIN_SERVER_USERNAME=${WLS_USERNAME}
WLS_ADMIN_SERVER_PASSWORD=${WLS_PASSWORD}
WLS_ADMIN_SERVER_CONFIRM_PASSWORD=${WLS_PASSWORD}
NODE_MANAGER_PASSWORD=${WLS_PASSWORD}
NODE_MANAGER_CONFIRM_PASSWORD=${WLS_PASSWORD}
DATABASE_HOSTNAME=${DATABASE_HOSTNAME}
LISTENER_PORT=${LISTENER_PORT}
SERVICENAME_OR_SID=${PDB_NAME}
SYS_PASSWORD=${SYS_PASSWORD}
SYSMAN_PASSWORD=${SYSMAN_PASSWORD}
EMPREREQ_AUTO_CORRECTION=false
REPOSITORY_BACKUP_DONE=true
PLUGIN_SELECTION={}
b_upgrade=true
EM_INSTALL_TYPE=NOSEED
EOF


Once the upgrade completes, run the root scripts as the root user.

/u01/app/oracle/middleware2/allroot.sh


This ends up with OMS GUI working.

No comments:

Post a Comment

Oracle Enterprise Manager Cloud Control 13c (OMS upgrade from 13.3 or 13.4 to OMS 13.5)

 OMS upgrade from 13.3 or 13.4 to OMS 13.5 PHASE -I Planning 1. OMS 13.5 is the latest Oracle Cloud Control version available. 2. To directl...