OEM 13cR5 Host IP Change and Repository Database 19c Migration to Another Datacenter via Data Guard Failover


This blog outlines the high-level steps taken to execute two major Oracle Enterprise Manager (OEM) infrastructure changes with minimal downtime to monitoring continuity.
  • Change the IP address of the OEM 13cR5 host server.
  • Migrate the OEM repository database (Oracle 19c) to secondary datacenter using Data Guard failover.
Environment details:

Component

CMO (Current Mode of Operation)

FMO (Future Mode of Operation / Post-Migration)

OS

Oracle Linux 8 (All Nodes)

Oracle Linux 8 (All Nodes)

OEM Installation Host/IP

dbsrv09.localdomain / 192.168.56.110

dbsrv09.localdomain / 192.168.56.109

OEM Version

13c Release 5 (13.5.0.0.0)

13c Release 5 (13.5.0.0.0)

Repository DB Node (Primary)

dbsrv05.localdomain

dbsrv06.localdomain (Post Data Guard Failover)

Repository DB Node (Standby)

dbsrv06.localdomain

N/A (becomes Primary)

Database Version

Oracle 19.23 Release Update

Oracle 19.23 Release Update

Migration Scope

OEM host IP change and DB role switchover via Data Guard.

DB failover complete, OEM reconnected.



High Level Steps:

1. Set up Oracle Data Guard between dbsrv05.localdomain (Primary) and dbsrv06.localdomain (Standby) for the OEM 13cR5 (13.5.0.0.0) repository on Oracle Database 19.23 RU.

2. Back up the OMS configuration, copy the EM key to the repository DB and export all OEM managed targets.

3. Change the OEM host IP from 192.168.56.110 to 192.168.56.109 using nmcli and update the /etc/hosts file accordingly

4. Perform Data Guard failover to promote dbsrv06.localdomain as the new primary repository database.


Primary Environment: OEM + Repository DB (master)

Standby Repository DB (masters)

1. Setup a static listener, reload the listener configuration and then add net services for standby on the primary server.

[oracle@dbsrv05 ~]$ cd $ORACLE_HOME/network/admin

[oracle@dbsrv05 admin]$ vi listener.ora

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)

      (SID_NAME = master)

    )

  )

 

LISTENER =

 (DESCRIPTION =

  (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv05.localdomain)(PORT = 1521))

  )

 

ADR_BASE_LISTENER = /u01/app/oracle

[oracle@dbsrv05 admin]$ lsnrctl reload

 LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 11-JUL-2025 04:45:33

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

 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbsrv05.localdomain)(PORT=1521)))

The command completed successfully

 [oracle@dbsrv05 admin]$ vi tnsnames.ora

MASTER =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv05.localdomain)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = master)

    )

  )

 LISTENER_MASTER =

  (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv05.localdomain)(PORT = 1521))

 MASTERS =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv06.localdomain)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = masters)

    )

  )

 

 

 

 

5. Setup a static listener, start the listener configuration and then add net services for primary on the standby server.

[oracle@dbsrv06 ~]$ cd $ORACLE_HOME/network/admin

[oracle@dbsrv06 admin]$ vi listener.ora

 SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)

      (SID_NAME = masters)

    )

  )

 LISTENER =

 (DESCRIPTION =

  (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv06.localdomain)(PORT = 1521))

  )

 ADR_BASE_LISTENER = /u01/app/oracle

 [oracle@dbsrv06 admin]$ lsnrctl start

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbsrv06.localdomain)(PORT=1521)))

Services Summary...

Service "masters" has 1 instance(s).

  Instance "masters", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

 [oracle@dbsrv06 admin]$ vi tnsnames.ora

MASTERS =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv06.localdomain)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = masters)

    )

  )

 LISTENER_MASTERS =

  (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv06.localdomain)(PORT = 1521))

 MASTER =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = dbsrv05.localdomain)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = master)

    )

  )

2. Copy the password file from the primary database server to the standby server.

 [oracle@dbsrv05 ~]$ scp $ORACLE_HOME/dbs/orapwmaster oracle@192.168.56.106:$ORACLE_HOME/dbs/orapwmasters

oracle@192.168.56.106's password:

orapwmaster                                                                                                                                                100% 2048   227.1KB/s   00:00

 

6. Create the required directory structure on the standby system to accommodate the database files, archive logs.

[oracle@dbsrv06 ~]$ mkdir -p /u01/app/oracle/admin/masters

[oracle@dbsrv06 ~]$ mkdir -p /u01/app/oracle/oradata/MASTERS

[oracle@dbsrv06 ~]$ mkdir -p  /u01/app/oracle/arch

 

3. Database is already in archivelog mode, enable force logging and configure the Dataguard parameters.

 [oracle@dbsrv05 ~]$ sqlplus / as sysdba

 SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 11 04:58:06 2025

Version 19.23.0.0.0

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

  Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.23.0.0.0

 SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            /u01/app/oracle/arch

Oldest online log sequence     11

Next log sequence to archive   13

Current log sequence           13

 SQL> alter database force logging;

 Database altered.

 SQL> alter system set log_archive_config='dg_config=(master,masters)' scope=both;

 System altered. 

SQL> alter system set log_archive_dest_2='service=masters lgwr async valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=masters' scope=both;

 System altered. 

SQL> alter system set fal_server='masters' scope=both; 

System altered. 

SQL> alter system set fal_client='master' scope=both; 

System altered. 

SQL> alter system set standby_file_management='AUTO' scope=both; 

System altered.

  

7. Start the standby database instance in nomount mode using the parameter values specified below.

 [oracle@dbsrv06 ~]$ cd $ORACLE_HOME/dbs

[oracle@dbsrv06 dbs]$ vi initmasters.ora

 *.db_name='master'

*.db_unique_name='masters'

 [oracle@dbsrv06 ~]$ sqlplus / as sysdba

 SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 11 05:52:38 2025

Version 19.23.0.0.0

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

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  218100112 bytes

Fixed Size                  8937872 bytes

Variable Size             188743680 bytes

Database Buffers           16777216 bytes

Redo Buffers                3641344 bytes

 

4. Configure standby Redo logs.

 SQL> select thread#,group#,bytes/1024/1024 mb,status from v$log;

    THREAD#     GROUP#         MB STATUS

---------- ---------- ---------- ----------------

         1          4        600 CURRENT

         1          5        600 INACTIVE

         1          6        600 INACTIVE

         1          7        600 INACTIVE

 SQL> alter database add standby logfile thread 1 group 8 '/u01/app/oracle/oradata/MASTER/stby08.log' size 600m,group 9 '/u01/app/oracle/oradata/MASTER/stby09.log' size 600m,group 10 '/u01/app/oracle/oradata/MASTER/stby10.log' size 600m,group 11 '/u01/app/oracle/oradata/MASTER/stby11.log' size 600m;

 Database altered.

 SQL> select group#,type,member from v$logfile order by 1;

     GROUP# TYPE       MEMBER

---------- ---------- ---------------------------------------------

         4 ONLINE     /u01/app/oracle/oradata/MASTER/redo04.log

         5 ONLINE     /u01/app/oracle/oradata/MASTER/redo05.log

         6 ONLINE     /u01/app/oracle/oradata/MASTER/redo06.log

         7 ONLINE     /u01/app/oracle/oradata/MASTER/redo07.log

         8 STANDBY    /u01/app/oracle/oradata/MASTER/stby08.log

         9 STANDBY    /u01/app/oracle/oradata/MASTER/stby09.log

        10 STANDBY    /u01/app/oracle/oradata/MASTER/stby10.log

        11 STANDBY    /u01/app/oracle/oradata/MASTER/stby11.log

 8 rows selected.

 

8. Initiate RMAN duplicate from the standby server.

 [oracle@dbsrv06 ~]$ rman target sys/sys@master auxiliary sys/sys@masters

 Recovery Manager: Release 19.0.0.0.0 - Production on Fri Jul 11 06:14:27 2025

Version 19.23.0.0.0

 Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 connected to target database: MASTER (DBID=3264960470)

connected to auxiliary database: MASTER (not mounted)

 RMAN> run {

allocate channel prmy1 type disk;

allocate channel prmy2 type disk;

allocate channel prmy3 type disk;

allocate channel prmy4 type disk;

allocate auxiliary channel stby1 type disk;

allocate auxiliary channel stby2 type disk;

allocate auxiliary channel stby3 type disk;

allocate auxiliary channel stby4 type disk;

duplicate target database for standby from active database spfile

  parameter_value_convert 'master','masters'

  set db_name='master'

  set db_unique_name='masters'

  set db_file_name_convert='/u01/app/oracle/oradata/MASTER/','/u01/app/oracle/oradata/MASTERS/'

  set log_file_name_convert='/u01/app/oracle/oradata/MASTER/','/u01/app/oracle/oradata/MASTERS/'

  set control_files='/u01/app/oracle/oradata/MASTERS/control01.ctl','/u01/app/oracle/oradata/MASTERS/control02.ctl'

  set audit_file_dest='/u01/app/oracle/admin/masters/'

  set log_archive_max_processes='4'

  set fal_client='masters'

  set fal_server='master'

  set standby_file_management='AUTO'

  set log_archive_config='dg_config=(master,masters)'

  set log_archive_dest_1='location=/u01/app/oracle/arch valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=masters'

  set log_archive_dest_2='service=master LGWR ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=master';

2> 3> 4> 5> 6> 7> }8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25>

 using target database control file instead of recovery catalog

allocated channel: prmy1

channel prmy1: SID=71 device type=DISK

 allocated channel: prmy2

channel prmy2: SID=70 device type=DISK

allocated channel: prmy3

channel prmy3: SID=148 device type=DISK

allocated channel: prmy4

channel prmy4: SID=162 device type=DISK

allocated channel: stby1

channel stby1: SID=37 device type=DISK

allocated channel: stby2

channel stby2: SID=38 device type=DISK

allocated channel: stby3

channel stby3: SID=39 device type=DISK

allocated channel: stby4

channel stby4: SID=40 device type=DISK

Starting Duplicate Db at 11-JUL-25

contents of Memory Script:

{

   backup as copy reuse

   passwordfile auxiliary format  '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/orapwmasters'   ;

   restore clone from service  'master' spfile to

 '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfilemasters.ora';

   sql clone "alter system set spfile= ''/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfilemasters.ora''";

}

executing Memory Script

Starting backup at 11-JUL-25

Finished backup at 11-JUL-25

Starting restore at 11-JUL-25

channel stby1: starting datafile backup set restore

channel stby1: using network backup set from service master

channel stby1: restoring SPFILE

output file name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfilemasters.ora

channel stby1: restore complete, elapsed time: 00:00:01

Finished restore at 11-JUL-25

sql statement: alter system set spfile= ''/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfilemasters.ora''

contents of Memory Script:

{

   sql clone "alter system set  dispatchers =

 ''(PROTOCOL=TCP) (SERVICE=mastersXDB)'' comment=

 '''' scope=spfile";

   sql clone "alter system set  db_name =

 ''master'' comment=

 '''' scope=spfile";

   sql clone "alter system set  db_unique_name =

 ''masters'' comment=

 '''' scope=spfile";

   sql clone "alter system set  db_file_name_convert =

 ''/u01/app/oracle/oradata/MASTER/'', ''/u01/app/oracle/oradata/MASTERS/'' comment=

 '''' scope=spfile";

   sql clone "alter system set  log_file_name_convert =

 ''/u01/app/oracle/oradata/MASTER/'', ''/u01/app/oracle/oradata/MASTERS/'' comment=

 '''' scope=spfile";

   sql clone "alter system set  control_files =

 ''/u01/app/oracle/oradata/MASTERS/control01.ctl'', ''/u01/app/oracle/oradata/MASTERS/control02.ctl'' comment=

 '''' scope=spfile";

   sql clone "alter system set  audit_file_dest =

 ''/u01/app/oracle/admin/masters/'' comment=

 '''' scope=spfile";

   sql clone "alter system set  log_archive_max_processes =

 4 comment=

 '''' scope=spfile";

   sql clone "alter system set  fal_client =

 ''masters'' comment=

 '''' scope=spfile";

   sql clone "alter system set  fal_server =

 ''master'' comment=

 '''' scope=spfile";

   sql clone "alter system set  standby_file_management =

 ''AUTO'' comment=

 '''' scope=spfile";

   sql clone "alter system set  log_archive_config =

 ''dg_config=(master,masters)'' comment=

 '''' scope=spfile";

   sql clone "alter system set  log_archive_dest_1 =

 ''location=/u01/app/oracle/arch valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=masters'' comment=

 '''' scope=spfile";

   sql clone "alter system set  log_archive_dest_2 =

 ''service=master LGWR ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=master'' comment=

 '''' scope=spfile";

   shutdown clone immediate;

   startup clone nomount;

}

executing Memory Script

sql statement: alter system set  dispatchers =  ''(PROTOCOL=TCP) (SERVICE=mastersXDB)'' comment= '''' scope=spfile

sql statement: alter system set  db_name =  ''master'' comment= '''' scope=spfile

sql statement: alter system set  db_unique_name =  ''masters'' comment= '''' scope=spfile

sql statement: alter system set  db_file_name_convert =  ''/u01/app/oracle/oradata/MASTER/'', ''/u01/app/oracle/oradata/MASTERS/'' comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''/u01/app/oracle/oradata/MASTER/'', ''/u01/app/oracle/oradata/MASTERS/'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''/u01/app/oracle/oradata/MASTERS/control01.ctl'', ''/u01/app/oracle/oradata/MASTERS/control02.ctl'' comment= '''' scope=spfile

sql statement: alter system set  audit_file_dest =  ''/u01/app/oracle/admin/masters/'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_max_processes =  4 comment= '''' scope=spfile

sql statement: alter system set  fal_client =  ''masters'' comment= '''' scope=spfile

sql statement: alter system set  fal_server =  ''master'' comment= '''' scope=spfile

sql statement: alter system set  standby_file_management =  ''AUTO'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_config =  ''dg_config=(master,masters)'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_dest_1 =  ''location=/u01/app/oracle/arch valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=masters'' comment= '''' scope=spfile

sql statement: alter system set  log_archive_dest_2 =  ''service=master LGWR ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=master'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area    4294965376 bytes

Fixed Size                     8947840 bytes

Variable Size                654311424 bytes

Database Buffers            3623878656 bytes

Redo Buffers                   7827456 bytes

allocated channel: stby1

channel stby1: SID=38 device type=DISK

allocated channel: stby2

channel stby2: SID=39 device type=DISK

allocated channel: stby3

channel stby3: SID=40 device type=DISK

allocated channel: stby4

channel stby4: SID=8 device type=DISK

 

contents of Memory Script:

{

   restore clone from service  'master' standby controlfile;

}

executing Memory Script

 

Starting restore at 11-JUL-25

 

channel stby1: starting datafile backup set restore

channel stby1: using network backup set from service master

channel stby1: restoring control file

channel stby1: restore complete, elapsed time: 00:00:01

output file name=/u01/app/oracle/oradata/MASTERS/control01.ctl

output file name=/u01/app/oracle/oradata/MASTERS/control02.ctl

Finished restore at 11-JUL-25

 

contents of Memory Script:

{

   sql clone 'alter database mount standby database';

}

executing Memory Script

 

sql statement: alter database mount standby database

 

contents of Memory Script:

{

   set newname for tempfile  1 to

 "/u01/app/oracle/oradata/MASTERS/temp01.dbf";

   switch clone tempfile all;

   set newname for datafile  1 to

 "/u01/app/oracle/oradata/MASTERS/system01.dbf";

   set newname for datafile  2 to

 "/u01/app/oracle/oradata/MASTERS/mgmt_ecm_depot1.dbf";

   set newname for datafile  3 to

 "/u01/app/oracle/oradata/MASTERS/sysaux01.dbf";

   set newname for datafile  4 to

 "/u01/app/oracle/oradata/MASTERS/undotbs01.dbf";

   set newname for datafile  5 to

 "/u01/app/oracle/oradata/MASTERS/mgmt_deepdive.dbf";

   set newname for datafile  7 to

 "/u01/app/oracle/oradata/MASTERS/users01.dbf";

   set newname for datafile  8 to

 "/u01/app/oracle/oradata/MASTERS/mgmt.dbf";

   restore

   from  nonsparse   from service

 'master'   clone database

   ;

   sql 'alter system archive log current';

}

executing Memory Script

 

executing command: SET NEWNAME

 

renamed tempfile 1 to /u01/app/oracle/oradata/MASTERS/temp01.dbf in control file

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

Starting restore at 11-JUL-25

 

channel stby1: starting datafile backup set restore

channel stby1: using network backup set from service master

channel stby1: specifying datafile(s) to restore from backup set

channel stby1: restoring datafile 00001 to /u01/app/oracle/oradata/MASTERS/system01.dbf

channel stby2: starting datafile backup set restore

channel stby2: using network backup set from service master

channel stby2: specifying datafile(s) to restore from backup set

channel stby2: restoring datafile 00002 to /u01/app/oracle/oradata/MASTERS/mgmt_ecm_depot1.dbf

channel stby3: starting datafile backup set restore

channel stby3: using network backup set from service master

channel stby3: specifying datafile(s) to restore from backup set

channel stby3: restoring datafile 00003 to /u01/app/oracle/oradata/MASTERS/sysaux01.dbf

channel stby4: starting datafile backup set restore

channel stby4: using network backup set from service master

channel stby4: specifying datafile(s) to restore from backup set

channel stby4: restoring datafile 00004 to /u01/app/oracle/oradata/MASTERS/undotbs01.dbf

channel stby2: restore complete, elapsed time: 00:00:01

channel stby2: starting datafile backup set restore

channel stby2: using network backup set from service master

channel stby2: specifying datafile(s) to restore from backup set

channel stby2: restoring datafile 00005 to /u01/app/oracle/oradata/MASTERS/mgmt_deepdive.dbf

channel stby2: restore complete, elapsed time: 00:00:16

channel stby2: starting datafile backup set restore

channel stby2: using network backup set from service master

channel stby2: specifying datafile(s) to restore from backup set

channel stby2: restoring datafile 00007 to /u01/app/oracle/oradata/MASTERS/users01.dbf

channel stby2: restore complete, elapsed time: 00:00:05

channel stby2: starting datafile backup set restore

channel stby2: using network backup set from service master

channel stby2: specifying datafile(s) to restore from backup set

channel stby2: restoring datafile 00008 to /u01/app/oracle/oradata/MASTERS/mgmt.dbf

channel stby4: restore complete, elapsed time: 00:00:45

channel stby1: restore complete, elapsed time: 00:01:06

channel stby3: restore complete, elapsed time: 00:01:35

channel stby2: restore complete, elapsed time: 00:01:32

Finished restore at 11-JUL-25

 

sql statement: alter system archive log current

 

contents of Memory Script:

{

   switch clone datafile all;

}

executing Memory Script

 

datafile 1 switched to datafile copy

input datafile copy RECID=1 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/system01.dbf

datafile 2 switched to datafile copy

input datafile copy RECID=2 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/mgmt_ecm_depot1.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=3 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/sysaux01.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=4 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/undotbs01.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=5 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/mgmt_deepdive.dbf

datafile 7 switched to datafile copy

input datafile copy RECID=6 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/users01.dbf

datafile 8 switched to datafile copy

input datafile copy RECID=7 STAMP=1206166703 file name=/u01/app/oracle/oradata/MASTERS/mgmt.dbf

Finished Duplicate Db at 11-JUL-25

released channel: prmy1

released channel: prmy2

released channel: prmy3

released channel: prmy4

released channel: stby1

released channel: stby2

released channel: stby3

released channel: stby4

 

RMAN> exit

 

9. Enable the MRP apply process.

[oracle@dbsrv06 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 11 06:25:34 2025

Version 19.23.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.23.0.0.0

SQL> alter database recover managed standby database disconnect from session;

Database altered.

 

10. List all the targets currently managed by Oracle Enterprise Manager (OEM).

[oracle@dbsrv09 ~]$ emcli login -username=sysman

Enter password :

Login successful

[oracle@dbsrv09 ~]$ emcli get_targets -format="name:csv"

Status ID,Status,Target Type,Target Name

1,Up,host,dbsrv09.localdomain

1,Up,host,dbsrv07.localdomain

1,Up,j2ee_application,/EMGC_GCDomain/GCDomain/EMGC_OMS1/OCMRepeater

1,Up,j2ee_application,/EMGC_GCDomain/GCDomain/EMGC_OMS1/jvmdengine(13.5.1.0.0)

1,Up,j2ee_application,/EMGC_GCDomain/GCDomain/EMGC_OMS1/emgc

1,Up,j2ee_application,/EMGC_GCDomain/GCDomain/EMGC_OMS1/empbs

1,Up,j2ee_application,/EMGC_GCDomain/GCDomain/EMGC_ADMINSERVER/opss-rest

-9,N/A,j2ee_application_domain,/EMGC_GCDomain/GCDomain/emgc

-9,N/A,j2ee_application_domain,/EMGC_GCDomain/GCDomain/empbs

-9,N/A,j2ee_application_domain,/EMGC_GCDomain/GCDomain/opss-rest

-9,N/A,j2ee_application_domain,/EMGC_GCDomain/GCDomain/jvmdengine(13.5.1.0.0)

-9,N/A,j2ee_application_domain,/EMGC_GCDomain/GCDomain/OCMRepeater

-9,N/A,metadata_repository,/EMGC_GCDomain/GCDomain/EMGC_ADMINSERVER/mds-owsm

-9,N/A,metadata_repository,/EMGC_GCDomain/GCDomain/EMGC_ADMINSERVER/mds-sysman_mds

1,Up,oracle_apache,/EMGC_GCDomain/GCDomain/ohs1

1,Up,oracle_beacon,EM Management Beacon

-9,N/A,oracle_cloud,Cloud

1,Up,oracle_coherence,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster

1,Up,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.wls.internal.wsm:LocalCache"/oracle.wls.internal.wsm.cache.local.nonce

1,Up,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.wls.internal.wsm:LocalCache"/oracle.wls.internal.wsm.cache.local.jwt

0,Down,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.mds.localcache.scope:oracle.mds.localcache.scopeORA-MDS-local-cache_ADFApplication_wsm-pm_2_1368594774"

/ORA-MDS-local-cache_ADFApplication_wsm-pm_2_1368594774

0,Down,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.mds.localcache.scope:oracle.mds.localcache.scopeORA-MDS-local-cache_ADFShareRuntime_wsm-pm_1_1368594774

"/ORA-MDS-local-cache_ADFShareRuntime_wsm-pm_1_1368594774

1,Up,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.wls.internal.wsm:LocalCache"/oracle.wls.internal.wsm.cache.local.oauth2

1,Up,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.wls.internal.wsm:LocalCache"/oracle.wls.internal.wsm.cache.local.sts

1,Up,oracle_coherence_cache,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/"oracle.wls.internal.wsm:LocalCache"/oracle.wls.internal.wsm.cache.local.saml

1,Up,oracle_coherence_node,/EMGC_GCDomain/GCDomain/defaultCoherenceCluster/EMGC_ADMINSERVER/dbsrv09.localdomain

1,Up,oracle_em_service,EM Jobs Service

1,Up,oracle_em_service,EM Console Service

1,Up,oracle_emd,dbsrv07.localdomain:1830

1,Up,oracle_emd,dbsrv09.localdomain:3872

1,Up,oracle_emrep,Management Services and Repository

1,Up,oracle_emsvrs_sys,Management_Servers

-9,N/A,oracle_home,agent13c2_7_dbsrv07.localdomain_1969

-9,N/A,oracle_home,oms13c1_1_dbsrv09.localdomain_7694

-9,N/A,oracle_home,agent13c1_2_dbsrv09.localdomain_2436

1,Up,oracle_oms,dbsrv09.localdomain:4889_Management_Service

1,Up,oracle_oms_console,dbsrv09.localdomain:4889_Management_Service_CONSOLE

1,Up,oracle_oms_pbs,dbsrv09.localdomain:4889_Management_Service_PBS

-9,N/A,weblogic_domain,/EMGC_GCDomain/GCDomain

1,Up,weblogic_j2eeserver,/EMGC_GCDomain/GCDomain/EMGC_OMS1

1,Up,weblogic_j2eeserver,/EMGC_GCDomain/GCDomain/EMGC_ADMINSERVER

1,Up,weblogic_nodemanager,NodeManager_dbsrv09.localdomain_1

 

 

11. Backup the OMS configuration.

[oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl exportconfig oms -sysman_pwd manager09 -dir /u01/app/oracle/em13c/gc_inst/em/EMGC_OMS1/sysman/backup/

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

ExportConfig started...

Backup directory is /u01/app/oracle/em13c/gc_inst/em/EMGC_OMS1/sysman/backup

Machine is Admin Server host. Performing Admin Server backup...

Exporting emoms properties...

Exporting secure properties...

Export has determined that the OMS is not fronted

by an SLB. The local hostname was NOT exported.

The exported data can be imported on any host but

resecure of all agents will be required. Please

see the EM Advanced Configuration Guide for more

details.

 

Exporting configuration for pluggable modules...

Preparing archive file...

Backup has been written to file: /u01/app/oracle/em13c/gc_inst/em/EMGC_OMS1/sysman/backup/opf_ADMIN_20250712_175340.bka

 The export file contains sensitive data.

 You must keep it secure.

 

ExportConfig completed successfully!

 

 

12. Check the repository database connection details.

 [oracle@dbsrv09 ~]$ emctl config oms -list_repos_details

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Repository Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dbsrv05.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=master)))

Repository User : sysman

 

13. Copy EM key to the repository database.

[oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl config emkey -copy_to_repos -sysman_pwd manager09

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

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".

 

 

14. Shutdown all OMS components.

 [oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl stop oms -all

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Stopping Oracle Management Server...

WebTier Successfully Stopped

Oracle Management Server Successfully Stopped

AdminServer Successfully Stopped

Oracle Management Server is Down

JVMD Engine is Down

 

 

15. Stop the central OMS agent running on the OMS host.

[oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/agent/agent_13.5.0.0.0/bin/emctl stop agent

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Stopping agent ... stopped.

 

 

16. Perform log switches and verify no archive log gaps between the primary and standby databases before initiating the failover.

[oracle@dbsrv05 ~]$ sqlplus / as sysdba

 SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jul 12 18:01:47 2025

Version 19.23.0.0.0

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

 Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.23.0.0.0

 SQL> alter system switch logfile;

 System altered.

 SQL> alter system switch logfile;

 System altered.

 SQL> alter system switch logfile;

 System altered.

 SQL> select dest_id,DB_UNIQUE_NAME,DATABASE_MODE,GAP_STATUS from v$archive_dest_status WHERE status <> 'INACTIVE';

    DEST_ID DB_UNIQUE_NAME  DATABASE_MODE   GAP_STATUS

---------- --------------- --------------- ------------------------

         1 master          OPEN

         2 masters         MOUNTED-STANDBY NO GAP

 

 

 

17. Stop recovery on the standby, activate it as the new primary and open the database.

[oracle@dbsrv06 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jul 12 18:04:10 2025

Version 19.23.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.23.0.0.0

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database finish;

Database altered.

SQL> alter database activate physical standby database;

Database altered.

SQL> alter database open;

Database altered.

 

 

 

18. Change the IP address of the OEM host server using nmcli, then update the /etc/hosts file to map the new IP address to the server's hostname.

[root@dbsrv09 ~]# ip addr |grep -i enp0s3

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000

    inet 192.168.56.110/24 brd 192.168.56.255 scope global noprefixroute enp0s3

[root@dbsrv09 ~]# nmcli con mod enp0s3 ipv4.addresses 192.168.56.109/24

[root@dbsrv09 ~]# nmcli con up enp0s3

[root@dbsrv09 ~]# ip addr |grep -i enp0s3

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000

    inet 192.168.56.109/24 brd 192.168.56.255 scope global noprefixroute enp0s3

 [root@dbsrv09 ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.56.109  dbsrv09.localdomain     dbsrv09

 

 

19. Start OMS admin server with the admin only option.

 [oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl start oms -admin_only

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Starting Admin Server only...

Admin Server Successfully Started

 

20. Point the OMS to the new primary repository database.

 [oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl config oms -store_repos_details -repos_conndesc "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dbsrv06.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=masters)))" -repos_user sysman

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Jul 12, 2025 6:27:06 PM oracle.sysman.core.sec.config.omr.ArgumentHandler finish

INFO: Processing 0 inputs

Enter Repository User's Password :

Successfully updated datasources and stored repository details in Credential Store.

If there are multiple OMSs in this environment, run this store_repos_details command on all of them.

And finally, restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.

 

 

21. Restart all the OMS.

 [oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl stop oms -all

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Stopping Oracle Management Server...

WebTier Successfully Stopped

Oracle Management Server Already Stopped

AdminServer Successfully Stopped

Oracle Management Server is Down

JVMD Engine is Down

[oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/oraclehome/bin/emctl start oms

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Starting Oracle Management Server...

WebTier Successfully Started

Oracle Management Server Successfully Started

Oracle Management Server is Up

JVMD Engine is Up

 

22. Start Central OMS Agent.

 [oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/agent/agent_13.5.0.0.0/bin/emctl start agent

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

Starting agent ................. started.

 [oracle@dbsrv09 ~]$ /u01/app/oracle/em13c/agent/agent_13.5.0.0.0/bin/emctl status agent

Oracle Enterprise Manager Cloud Control 13c Release 5

Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.

---------------------------------------------------------------

Agent Version          : 13.5.0.0.0

OMS Version            : 13.5.0.0.0

Protocol Version       : 12.1.0.1.0

Agent Home             : /u01/app/oracle/em13c/agent/agent_inst

Agent Log Directory    : /u01/app/oracle/em13c/agent/agent_inst/sysman/log

Agent Binaries         : /u01/app/oracle/em13c/agent/agent_13.5.0.0.0

Core JAR Location      : /u01/app/oracle/em13c/agent/agent_13.5.0.0.0/jlib

Agent Process ID       : 2690

Parent Process ID      : 2301

Agent URL              : https://dbsrv09.localdomain:3872/emd/main/

Local Agent URL in NAT : https://dbsrv09.localdomain:3872/emd/main/

Repository URL         : https://dbsrv09.localdomain:4903/empbs/upload

Started at             : 2025-07-12 23:20:18

Started by user        : oracle

Operating System       : Linux version 5.15.0-101.103.2.1.el8uek.x86_64 (amd64)

Number of Targets      : 36

Last Reload            : (none)

Last successful upload                       : 2025-07-13 00:25:47

Last attempted upload                        : 2025-07-13 00:25:47

Total Megabytes of XML files uploaded so far : 0.23

Number of XML files pending upload           : 0

Size of XML files pending upload(MB)         : 0

Available disk space on upload filesystem    : 54.24%

Collection Status                            : Collections enabled

Heartbeat Status                             : Ok

Last attempted heartbeat to OMS              : 2025-07-13 00:26:12

Last successful heartbeat to OMS             : 2025-07-13 00:26:12

Next scheduled heartbeat to OMS              : 2025-07-13 00:27:12

 

---------------------------------------------------------------

Agent is Running and Ready

 

 

 


23. Access the OEM Console using the new IP address, ensure all managed targets are reachable via the new IP and restart the Management Agent on each target to re-establish communication with OMS.











Comments

Popular posts from this blog

Step-by-Step Guide to Configure Oracle GoldenGate Plug-in for Enterprise Manager 13cR5

Step-by-Step Guide to Configure Oracle GoldenGate Veridata 23c

How to Reposition Extract, Data Pump and Replicat in GoldenGate During Trail File Corruption