Configure the Environment
Scripts are available to automate some of the steps. These scripts don't automate the complete setup, so you must complete the tasks and you can use the scripts when they are referenced.
Go to Download Code for the link to download the scripts referenced in this document.
Prepare the WebLogic Data Sources in the Primary Data Center
The TNS alias is the same name in the primary and secondary;
therefore, the datasources use the same db connect string. It is
resolved with a tnsnames.ora
file that is not
copied to standby, so you can have different
tnsnames.ora
content in each site. You can
place it separately from the WebLogic domain configuration, in a
file system that is not replicated between sites. Or, given that it
is part of the configuration, you can also store it in a folder
under the domain configuration. In this case, make sure that you
exclude that folder when you copy the domain configuration from
primary to standby. Each site will resolve the TNS alias with the
appropriate connect string in each site, pointing to the local
database only. For example:
Connect string in data sources in primary site:
jdbc:oracle:thin:@soapdb
The tnsnames.ora file in primary contains:
SOAPDB =
(DESCRIPTION=
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=prmy-scan)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=soapdb.example.com))
)
Connect string in data sources in secondary site:
jdbc:oracle:thin:@soapdb
The tnsnames.ora file in secondary:
SOAPDB =
(DESCRIPTION=
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL=TCP)(HOST=stby-scan)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=soapdb.example.com))
)
The following are the advantages of using TNS alias:
- Since the same db connect string is used in the
WebLogic domain
config
, you don't need to alter the WebLogic configuration after replicating theconfig
from the primary to the standby. - As each site points to the local database only, there is no risk of cross-connections from the mid-tier to the remote database.
If you are not already using this approach in the primary SOA system, then perform the following steps to use a TNS alias in the data sources.
Configure the Network
Configure Oracle Data Guard
About the database version and patch level
Oracle Home in the on-premises database and the standby database on OCI must be the same version and at the same patch level. You can achieve this in the following ways:
- When choosing the Database Software image during the DB System provisioning in OCI, select Display all versions and select the same database version and patch set level as the on-premises database.
- If the source database’s Oracle Home version is no longer available in OCI for provisioning, you will have to patch the source environment to the same database patch level as the database home in the cloud environment.
The following scenario is an real example for reference. The on-premises DB Home is 19.6 and the OCI DB Home is 19.11.
- Run the command
$ORACLE_HOME/OPatch/opatch lspatches
to identify the patches installed on both the Source and Target environments.$ORACLE_HOME/OPatch/opatch lspatches
The following is the output in this example:
DB Oracle Home Patches On-premises DB Oracle HOME Patches on OCI 30676209;LNX64-20.1-RAC ASM HIT ORA-07445 EXCEPTION ENCOUNTERED CORE DUMP [KSXPOSDIFQRY()+556]
30613937;IPCOR TOPO SERVICE FIX IP TYPE BUG IN IP SELECTION
30484981;OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)
30489227;OCW RELEASE UPDATE 19.6.0.0.0 (30489227)
30557433;Database Release Update : 19.6.0.0.200114 (30557433)
29780459;INCREASE _LM_RES_HASH_BUCKET AND BACK OUT CHANGES FROM THE BUG 29416368 FIX
30310195;DBSAT REPORTED DISABLED CONSTRAINTS FOR SHARDING STS_CHUNKS ON GSMADMIN_INTERNAL.SHARD_TS
32327201;RDBMS - DSTV36 UPDATE - TZDATA2020E
31335037;RDBMS - DSTV35 UPDATE - TZDATA2020A
30432118;MERGE REQUEST ON TOP OF 19.0.0.0.0 FOR BUGS 28852325 29997937
31732095;UPDATE PERL IN 19C DATABASE ORACLE HOME TO V5.32
32490416;JDK BUNDLE PATCH 19.0.0.0.210420
32399816;OJVM RELEASE UPDATE: 19.11.0.0.210420 (32399816)
32579761;OCW RELEASE UPDATE 19.11.0.0.0 (32579761)
32545013;Database Release Update : 19.11.0.0.210420 (32545013)
- Analyze the existing patches: determine which patches are one-offs, review if they are already fixed in the new RU patches or if new overlap patches are needed, determine which of them must be uninstalled, locate the appropriate patch files for RU, and so on.
- Based on the analysis, uninstall the one-off patches that are
already fixed in the new RU before installing the RU update
(otherwise, they will cause conflict). In this example, the
on-off patches are fixed in 19.11, so the patches must be
rolled back before installing the 19.11
RU.
30676209;LNX64-20.1-RAC ASM HIT ORA-07445 EXCEPTION ENCOUNTERED CORE DUMP [KSXPOSDIFQRY()+556] 30613937;IPCOR TOPO SERVICE FIX IP TYPE BUG IN IP SELECTION
- Locate, download, and install the RU patches. In this example,
the 19.11 RU patches are located in the combo patch
32578973: COMBO OF OJVM RU COMPONENT 19.11.0.0.210420 + GI
RU 19.11.0.0.210420 and are the
following:
32399816;OJVM RELEASE UPDATE: 19.11.0.0.210420 (32399816) 32579761;OCW RELEASE UPDATE 19.11.0.0.0 (32579761) 32545013;Database Release Update : 19.11.0.0.210420 (32545013)
- Locate, download, and install the overlays, one-offs, and other
patches that the OCI DB Home has on top of the RU. For
example:
29780459;INCREASE _LM_RES_HASH_BUCKET AND BACK OUT CHANGES FROM THE BUG 29416368 FIX 30310195;DBSAT REPORTED DISABLED CONSTRAINTS FOR SHARDING STS_CHUNKS ON GSMADMIN_INTERNAL.SHARD_TS 30432118;MERGE REQUEST ON TOP OF 19.0.0.0.0 FOR BUGS 28852325 (DSTV33 update) 29997937 (DSTV34 update) 31335037;RDBMS - DSTV35 UPDATE - TZDATA2020A 32327201;RDBMS - DSTV36 UPDATE - TZDATA2020E 32490416;JDK BUNDLE PATCH 19.0.0.0.210420 31732095;UPDATE PERL IN 19C DATABASE ORACLE HOME TO V5.32
- Perform a similar analysis for the GI patches.
Note:
- From Oracle Data Guard’s perspective, it's not strictly necessary to have the same GI versions in the primary and standby: Oracle Data Guard is completely independent from anything under the database, so you can run different versions of the operating system, Oracle Clusterware, hardware, or storage software across different sites with no restrictions on versions or time. (Doc ID 1265700.1)
- Regardless of Oracle Data Guard, it is not required to have the same version in GI and RDBMS versions in a RAC DB: Starting from 18c, the Oracle Grid Infrastructure (GI) /Clusterware (CRS) version must be of equal or the highest version down to the first digit in the possible combinations at all times. For example: Grid infrastructure can be at 18.1.0.0 and Database can be at 18.3.0.0. (Doc ID 337737.1)
It's a good practice to patch GI at same level that
the DB home. Once you have to patch the DB home to a newer
Release Update (RU), many of the patches are common for DB
and GI, and you can use OPatchAuto
to both
homes at the same time.