DBA Hub

📋Steps in this guide1/5

Silent Upgrade of Oracle Enterprise Manager Cloud Control to 24ai (24.1)

This article describes a silent upgrade of Enterprise Manager Cloud Control to 24ai (24.1).

oracle 24configurationintermediate
by OracleDba
29 views
1

Software

Download the following software: - Enterprise Manager Cloud Control 24ai (24.1) (x86_64)
2

Prerequisites

There are a lot of prerequisites in the documentation, which will vary depending on the version of the OMS you are upgrading from, the versions of the plugins you are currently using, and the versions of the agents you are using on the target hosts. The following prerequisites work when upgrading from a clean 13cR5 installation, but for anything else you should read the documented prerequisites . Install the following packages as the root user. Many of them may already be present. The list is a little different depending on if you are using Oracle Linux 8 (OL8) or Oracle Linux 9 (OL9). Make sure there are no invalid objects in the repository database. If you find any, recompile them. Here is an example of how you might do that. Copy the emkey using the following commands, adjust as required. You will have to enter the Cloud Control sysman password. Undeploy the CSA plugin from the agent. Stop the OMS and the agent. Make sure the prerequisite database parameters are set. I've listed the minimum settings, but for testing I've reduced them further. You may have set hidden parameters for the adaptive optimizer settings in your previous installations. These should be removed now. Create a directories for the new installation. This is a full product installation, so you need enough free space to hold a full Cloud Control installation. You can delete the old OMS later, but for a period there will be two installations on the server. Backup your repository. In my case, Cloud Control runs on a VM, so a database backup was performed, as well as a whole VM backup. For clarity, my starting 13cR5 installation had the following details.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# OL8 or OL9 Packages
dnf install -y make
dnf install -y binutils
dnf install -y gcc
dnf install -y libaio
dnf install -y libstdc++
dnf install -y sysstat
dnf install -y glibc-devel
dnf install -y glibc-common
dnf install -y libXtst
dnf install -y libnsl

SELECT owner, object_name, object_type
FROM   dba_objects 
WHERE  status = 'INVALID'
AND    owner IN ('SYS', 'SYSTEM', 'SYSMAN', 'MGMT_VIEW', 'DBSNMP', 'SYSMAN_MDS');

sqlplus / as sysdba <<EOF

-- Switch to container if using a PDB.
ALTER SESSION SET CONTAINER = emrep;

-- Recompile invalid objects.
EXEC UTL_RECOMP.recomp_serial('SYS');
EXEC UTL_RECOMP.recomp_serial('DBSNMP');
EXEC UTL_RECOMP.recomp_serial('SYSMAN');

EXIT;
EOF

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

${MW_HOME}/bin/emcli login -username=sysman
${MW_HOME}/bin/emcli sync

${MW_HOME}/bin/emcli undeploy_plugin_from_agent -plugin="oracle.sysman.csa" -agent_names="ol8-em135.localdomain:3872"

# Check status of the undeploy.
${MW_HOME}/bin/emcli get_plugin_deployment_status -plugin="oracle.sysman.csa"

export OMS_HOME=/u01/app/oracle/middleware
export AGENT_HOME=/u01/app/oracle/agent/agent_inst

$OMS_HOME/bin/emctl stop oms -all
$AGENT_HOME/bin/emctl stop agent

sqlplus / as sysdba <<EOF

-- Recommended minimum settings.
alter system set "_allow_insert_with_update_check"=true scope=both;
alter system set session_cached_cursors=200 scope=spfile;
 
-- Recommended: processes=600
alter system set processes=600 scope=spfile;

-- Recommended: pga_aggregate_target=1G
alter system set pga_aggregate_target=450M scope=spfile;

-- Recommended: sga_target=3G
alter system set sga_target=800M scope=spfile;

-- Recommended: shared_pool_size=600M
--alter system set shared_pool_size=600M scope=spfile;

-- Unset any adaptive optimizer settings that were set for the previous installation. They are not needed now.
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='*';

shutdown immediate;
startup;

-- Set job_queue_processes=0
alter session set container=emrep;
alter system set job_queue_processes=0;

exit;
EOF

mkdir -p /u01/app/oracle/middleware2
mkdir -p /u01/app/oracle/agent2

HOSTNAME  : ol8-em135.localdomain
DB Version: 19c
ORACLE_SID: emcdb
PDB_NAME  : emrep
PORT      : 1521
URL       : https://ol8-em135.localdomain:7803/em
3

Cloud Control 24ai Installation and Upgrade

Create a response file for the upgrade process. Start the upgrade by running the "em24100_linux64.bin" file. If you have limited space in your "/tmp" location, you can provide an alternative location for temporary files. Any upgrade prerequisite failures are posted in a file called "prereqResultReport.html", which typically includes suggested actions to fix them. Your list of failures may vary depending on the plugins you are running. Once the upgrade completes, run the root scripts as the root user. With the upgrade complete you should secure the EMKey using the following command. It should tell you it has already been done, but it does no harm to run the command again to make sure. Check your stop/start scripts have the updated OMS home and agent home. Unlike upgrades of previous versions, the 24ai upgrade includes the upgrade of the agent, so there are no additional steps required. The login screen is available from a browser using the URL provided in the previous screen ("https://ol7-em135.localdomain:7803/em"). Log in with the username "sysman" and the password you specified during your installation. Once logged in, you are presented with the "License Agreement" screen. Click the "I Accept" button and you are presented with your default homepage. It might take some time for all of the targets to be recognised as up.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Set parameters.
SOFTWARE_DIR=/u01/software
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
AGENT_BASE_DIR=${ORACLE_BASE}/agent2
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}


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}
AGENT_BASE_DIR=${AGENT_BASE_DIR}
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

unset CLASSPATH

chmod u+x ${SOFTWARE_DIR}/em24100_linux64.bin
${SOFTWARE_DIR}/em24100_linux64.bin -silent -responseFile /tmp/upgrade.rsp

unset CLASSPATH

chmod u+x ${SOFTWARE_DIR}/em24100_linux64.bin
mkdir -p /u01/tmp
${SOFTWARE_DIR}/em24100_linux64.bin -silent -responseFile /tmp/upgrade.rsp -J-Djava.io.tmpdir=/u01/tmp/

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

export OMS_HOME=/u01/app/oracle/middleware2/oms_home
$OMS_HOME/bin/emctl config emkey -remove_from_repos -sysman_pwd Welcome1

export MW_HOME=${ORACLE_BASE}/middleware2
export OMS_HOME=${MW_HOME}/oms_home
export AGENT_BASE=${ORACLE_BASE}/agent2
export AGENT_HOME=${AGENT_BASE}/agent_inst
4

Startup/Shutdown

Cloud Control is set to auto-start using the "gcstartup" service. The "/etc/oragchomelist" file contains the items that will be started by the system. After the upgrade, it may list both OMS installations. If you want to use this auto-start, you will need to amend the contents of the file to make sure it is consistent with the new installation. On a simple installation the default auto-start will cause a problem as Cloud Control will attempt to start before the database has started. The service can be disabled by commenting out (using #) all the contents of the "/etc/oragchomelist" file to prevent the auto-start and use start/stop scripts described below. If the start/stop needs to be automated, you can do it in the usual way using Linux service that calls your start/stop scripts that include the database management. Use the following commands to turn on all components installed by this article. If you have a startup/shutdown script, remember to amend it to take account of the new paths. Use the following commands to turn off all components installed by this article.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/u01/app/oracle/middleware2

/u01/app/oracle/agent/agent_24.1.0.0.0:/u01/app/oracle/agent/agent_inst

#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export OMS_HOME=/u01/app/oracle/middleware2/oms_home
export AGENT_HOME=/u01/app/oracle/agent2/agent_inst

# Start everything
$ORACLE_HOME/bin/dbstart $ORACLE_HOME

$OMS_HOME/bin/emctl start oms

$AGENT_HOME/bin/emctl start agent

#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export OMS_HOME=/u01/app/oracle/middleware2/oms_home
export AGENT_HOME=/u01/app/oracle/agent2/agent_inst

# Stop everything
$OMS_HOME/bin/emctl stop oms -all

$AGENT_HOME/bin/emctl stop agent

$ORACLE_HOME/bin/dbshut $ORACLE_HOME
5

Remove old OMS

If you have followed best practices when you originally installed Cloud Control and the upgrade has worked with no errors, the clean up of old OMS installation is simple. You just remove the directory. Check the crontab for the "oracle" user, to make sure there is no reference to the old OMS. If there is, remove it. If your central agent was originally installed under the OMS home, you will have to relocate the agent before doing this. This topic is covered in full here . For more information see: - Oracle Enterprise Manager Cloud Control Upgrade Guide - Oracle Enterprise Manager Cloud Control 24ai (24.1) Silent Installation on Oracle Linux 8 - Oracle Enterprise Manager Cloud Control 24ai (24.1) Silent Installation on Oracle Linux 9 - Oracle Enterprise Manager Cloud Control 13c Post-Installation Setup Tasks Hope this helps. Regards Tim...

Code/Command (click line numbers to comment):

1
2
3
4
5
# Old OMS: /u01/app/oracle/middleware
# New OMS: /u01/app/oracle/middleware2

# Delete old OMS.
rm -Rf /u01/app/oracle/middleware

Comments (0)

Please to add comments

No comments yet. Be the first to comment!