We need to do following:
Upgrade DB and Grid from 11.2.0.2 to 11.2.0.3
and to 12.2.0.1
TASK:
1. Update
Oracle database from 11.2.0.2 to 11.2.0.3
2. Update
Grid_home from 11.2.0.3 to 12.2.0.1
3. Update
Oralce database from 11.2.0.3 to 12.2.0.1
4. Linux
5.8 update to Linux 7.5
NOTE:
I will use VMware
Client and unattached the Disk(LUN) from Linux 5.8 to Linux 7.5
Following are the Environment:
11g:
Hostname : ORADBPRD11.th.com
Database Name :
KARDBPRD
Database Name :
FASDBPRD
DB VERSION : 11.2.0.2.0
DB VERSION : 11.2.0.3.0
DB Home Path : /app/oracle11/product/11.2.0.2/db
DB Home Path : /app/oracle11/product/11.2.0.3/db
GRID Home Path : /app/oracle11/product/11.2.0.3/grid
12c:
Hostname :
ORADBPRD12.th.com
Target DB VERSION : 12.2.0.1
Target DB Path : /app/oracle12.2/product/12.2.0.1/db
Target GRID Path : /app/oracle12.2/product/12.2.0.1/grid
Upgrade Method :
Manual
I am going to use following approach.
1. Since
GRID_HOME is already on 11.2.0.3 so no need to update at this point
2. Update Oracle database from 11.2.0.2 to 11.2.0.3
3. Change the compatibility parameter for database and for diskgroup ASM to 11.2.0.2.0, which is minimum requirement for Oracle 12c.
4. IMPORTENT: Execute preupgrade script. Copy preupgrade.jar file from Oracle 12c into somewhere on oracle 11g and execute it.
EXAMPLE:
[ORACLE_11g_HOME/jdk/bin/java -jar [ORACLE_12g_HOME]/rdbms/admin/preupgrade.jar FILE DIR /tmp/Preupgrade_Output_Files
5. Create new Virtual Machine with Linux 7.5 and Install Grid take this option
==>>(Configure Oracle Grid Infrastructure
for a Standalone Server) and just Oracle software on this box.
Note:
If you just install
Grid Software it is difficult later to configure, that is why I take the above
option and we will remove the disk later.
Let us start with the step-by-step document:
STEP 1:
Upgrade Oracle database from 11.2.0.2.0 to
11.2.0.3.0
Pre upgrade check:
Check the
compatibility parameter of the diskgroup.
select name,state
from v$asm_diskgroup;
NAME STATE
------------------------------
-----------
FASDBPRD1 MOUNTED
FASDBPRD2 MOUNTED
FASDBPRD3 MOUNTED
FASDBPRD4 MOUNTED
KARDBPRD1 MOUNTED
col COMPATIBILITY
form a10
col
DATABASE_COMPATIBILITY form a10
col NAME form a20
select group_number,
name, compatibility, database_compatibility from v$asm_diskgroup;
GROUP_NUMBER
NAME COMPATIBIL
DATABASE_C
------------ --------------------
---------- ----------
1 FASDBPRD1 11.2.0.0.0 10.1.0.0.0
3 FASDBPRD2 11.2.0.0.0 10.1.0.0.0
2 FASDBPRD3 11.2.0.0.0 10.1.0.0.0
4 FASDBPRD4 11.2.0.0.0 10.1.0.0.0
7 KARDBPRD1 11.2.0.0.0 10.1.0.0.0
Create pfile
from spfile
Start DB Update:
Login to database(11.2.0.2.0) as sys user and run utlu112i.sql from oracle 11.2.0.3.0 database software location.
utlu112i.sql script will perform the pre upgrade checks.
spool /tmp/upgrade_11.2.0.3.log
@/app/oracle11/product/11.2.0.3/db/rdbms/admin/utlu112i.sql
Check, if the
prerequests are fine, go-ahead and proceed with the upgrade.
Before this we should
purge the DBA_RECYCLE BIN as suggested in the spool script.
PURGE DBA_RECYCLEBIN
EXECUTE
dbms_stats.gather_dictionary_stats;
Copy the initfile from 11.2.0.2 home to the
11.2.0.3 home and edit it.
Shutdown db 11.2.0.2
shutdown immediate;
Log in to the system
as the owner of the Oracle Database 11g Release 2 (11.2.0.3)
Start the instance by
issuing the following command:
create spfile from
pfile='/users/oracle/initFASDBPRD.ora_update11203';
STARTUP UPGRADE;
spool
/tmp/catupgrd.log
@/app/oracle11/product/11.2.0.3/db/rdbms/admin/catupgrd.sql
After completing the
catupgrd.sql, Startup the instance and run Post-Upgrade Status Tool utlu112s.sql
sqlplus / as sysdba
startup;
spool
/tmp/utlu112s.log
@/app/oracle11/product/11.2.0.3/rdbms/admin/utlu112s.sql
spool off;
Run catuppst.sql.
spool
/tmp/catuppst.log
@/app/oracle11/product/11.2.0.3/rdbms/admin/catuppst.sql
spool off;
@/app/oracle11/product/11.2.0.3/rdbms/admin/utlrp.sql
Verify that all
expected packages and classes are valid:
SELECT count(*) FROM
dba_invalid_objects;
SELECT distinct
object_name FROM dba_invalid_objects;
Make sure, that you change the compatible for DB Version 11.2.0.3.0
Also change the compatible
version on disgroup.
On DB.
SQL> show
parameter compatible;
NAME TYPE VALUE
------------------------------------
----------- ------------
compatible string 11.2.0.0.0
ON DB:
alter system set
compatible='11.2.0.2.0' scope=spfile;
shutdown immediate;
startup
ON ASM:
select name, state from v$asm_diskgroup;
alter diskgroup DATA SET attribute 'compatible.asm'='11.2.0.2.0';
...
...
col COMPATIBILITY
form a10
col
DATABASE_COMPATIBILITY form a10
col NAME form a20
select group_number, name, compatibility, database_compatibility from
v$asm_diskgroup;
GROUP_NUMBER
NAME COMPATIBIL
DATABASE_C
------------ --------------------
---------- ----------
1 FASDBPRD1 11.2.0.2.0 11.2.0.2.0
2 FASDBPRD1 11.2.0.2.0 11.2.0.2.0
3 FASDBPRD1 11.2.0.2.0 11.2.0.2.0
4 FASDBPRD1 11.2.0.2.0 11.2.0.2.0
7 KARDBPRD1 11.2.0.2.0 11.2.0.2.0
Oracle 11.2.0.2 to Oracle 11.2.0.3 is done at this point
STEP 2:
Startup Upgrade from 11.2.0.3 to 12.2.0.1
INSTALLING 12 GRID HOME:
Using different host
with Linux 7.5, because Linux 5.8 is not supporting for 12.2.0.1 version.
Hostname= ORADBPRD12.th.com(Linux 7.5)
Install Grid and Oracle 12.2.0.1 on
ORADBPRD12.th.com
Create an environment file:
Create those files:
more /etc/oraInst.loc
inventory_loc=/users/oracle/oraInventory
inst_group=dba
more /etc/oratab
+ASM:/app/oracle12.2/product/12.2.0.1/grid:N
KARDBPRD:/app/oracle12.2/product/12.2.0.1/db:N # line added by Agent
FASDBPRD:/app/oracle12.2/product/12.2.0.1/db:N
Create extra 15 GB
storage in Virtual machine for ASM Installation. You can remove this later when
you attach the storage (with datafile)
Execute the command which Installed required
packages.
yum install -y bc binutils
compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686
elfutils-libelf.i686 elfutils-libelf elfutils-libelf-devel.i686
elfutils-libelf-devel fontconfig-devel glibc.i686 glibc glibc-devel.i686
glibc-devel ksh libaio.i686 libaio libaio-devel.i686 libaio-devel libX11.i686
libX11 libXau.i686 libXau libXi.i686 libXi libXtst.i686 libXtst libgcc.i686
libgcc librdmacm-devel libstdc++.i686 libstdc++ libstdc++-devel.i686
libstdc++-devel libxcb.i686 libxcb make nfs-utils net-tools python
python-configshell python-rtslib python-six smartmontools sysstat targetcli
unixODBC
Install preinstall package:
oracle-database-server-12cR2-preinstall-1.0-4.el7.x86_64_RHEL.rpm
Stop the Firewall and disable
systemctl stop
firewalld.service
systemctl disable
firewalld.service
iptables -L
Disable multipath.
service multipathd
status
cd /etc/
mv multipath.conf
multipath.conf.backup
mv multipath
multipath.backup
service multipathd
disable
systemctl disable
multipathd
3. unzip grid software.
unzip linuxx64_12201_grid_home.zip -d
/app/oracle12.2/product/12.2.0.1/grid/
I am using for Xterm display MobaXterm_Personal_12.1.exe
DISPLAY=xxx.xx.xx.xxx:0.0;
export DISPLAY
unset ORACLE_BASE
unset ORACLE_HOME
unset ORACLE_SID
cd
/app/oracle12.2/product/12.2.0.1/grid/cv/rpm
rpm -Uvh
cvuqdisk-1.0.10-1.rpm
Preparing...
################################# [100%]
Updating /
installing...
1:cvuqdisk-1.0.10-1
################################# [100%]
cd $GRID_HOME
./gridSetup.sh -applyPSU
/app/oracle12.2/download/OCT_patch_12c/30133386/30116802
Chose following options:
=>> Configure Oracle Grid Infrastructure
for a Standalon Server (Oracle Restart)
=>> Select Disks =>> Chose External
Other steps are pretty state forward.
Execute the following script:
# /app/oracle12.2/product/12.2.0.1/grid/root.sh
Performing root user operation.
The following environment variables are set
as:
ORACLE_OWNER= oracle
ORACLE_HOME= /app/oracle12.2/product/12.2.0.1/grid
Enter the full pathname of the local bin
directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
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.
Using configuration parameter file:
/app/oracle12.2/product/12.2.0.1/grid/crs/install/crsconfig_params
The log of current session can be found at:
/oracle12.2/crsdata/FASDBPRD2/crsconfig/roothas_2020-01-09_11-31-07AM.log
LOCAL ADD MODE
Creating OCR keys for user 'oracle',
privgrp 'dba'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR
keys.
Creating OCR keys for user 'root', privgrp
'root'..
Operation successful.
CRS-4664: Node ORADBPRD12.th.com
successfully pinned.
2020/01/09 11:31:37 CLSRSC-330: Adding
Clusterware entries to file 'oracle-ohasd.service'
CRS-2791: Starting shutdown of Oracle High
Availability Services-managed resources on 'ORADBPRD12.th.com'
CRS-2673: Attempting to stop 'ora.evmd' on
'ORADBPRD12.th.com'
CRS-2677: Stop of 'ora.evmd' on
'ORADBPRD12.th.com' succeeded
CRS-2793: Shutdown of Oracle High
Availability Services-managed resources on 'ORADBPRD12.th.com' has completed
CRS-4133: Oracle High Availability Services
has been stopped.
CRS-4123: Oracle High Availability Services
has been started.
ORADBPRD12.th.com 2020/01/09 11:33:21
/app/oracle12.2/product/12.2.0.1/grid/cdata/FASDBPRD2/backup_20200109_113321.olr 1678342655
2020/01/09 11:33:22 CLSRSC-327:
Successfully configured Oracle Restart for a standalone server
Grid Installation is done:
INSTALLING JUST ORACLE SOFTWARE:
unzip
linuxx64_12201_database.zip
./runInstaller
Chose following
options:
=>>Install
database software only
=>>Single
Instance database Installation
=>>Enterprise
Edition
=>>Oracle Base
( this is the directory for all oracle products )
=>>Software
location
=>>I choss the
dba for all groups
=>> execute the
script when the Installer asked.
Execute as
root user:
=>> /apps/oracle12/product/12.2.0.1/db_12c/root.sh
=>>chose no:
=>>Do you want to setup Oracle Trace File
Analyzer (TFA) now ? yes|[no] :
no
Oracle
Software Installation is completed.
Login in to ASM and
check everything is ok.
Now you can do the following Important Steps.
Stop ASM on
ORADBPRD12.th.com and remove disk where you Installed ASM (Hard disk remove)
via VCenter.
Attach all Hard Disk
from the ORADBPRD11.th.com where actually the datafile located (LUN).
create spfile from pfile for ASM.
create
spfile='/app/oracle12.2/product/12.2.0.1/grid/dbs/spfile+ASM.ora' from
pfile='/users/oracle/ASM_initfile_NEW.ora';
STARTING ORACLE UPGRADE:
Pre Upgrade Steps:
From Oracle 11.2.0.3 Home.
Execute preupgrade.jar script:
Hostname= ORADBPRD11.th.com
IMPORTENT: execute preupgrade.jar
$ /app/oracle11/product/11.2.0.3/db/jdk/bin/java -jar /users/oracle/preupgrade.jar FILE DIR /users/oracle/Preupgrade_FASDBPRD
Execute the preupgrade script:
Pre Upgrade Steps:
From Oracle 11.2.0.3 Home.
Execute preupgrade.jar script:
NOTE:
Upgrade 12.2.0.1 is not possible on Linux 5.8 based on Oracle Document.
Execute preupgrade oracle 12c on the host Oracle Database 11g Release 2 (11.2.0.3).
Copy the preupgrade.jar file from 12c Oracle into the somewhere Oracle 11g .
Copy the preupgrade.jar file from 12c Oracle into the somewhere Oracle 11g .
Hostname= ORADBPRD11.th.com
IMPORTENT: execute preupgrade.jar
$ /app/oracle11/product/11.2.0.3/db/jdk/bin/java -jar /users/oracle/preupgrade.jar FILE DIR /users/oracle/Preupgrade_FASDBPRD
Preupgrade generated files:
/users/oracle/Preupgrade/preupgrade.log
/users/oracle/Preupgrade/preupgrade_fixups.sql
/users/oracle/Preupgrade/postupgrade_fixups.sql
Run on 11.2.0.3.0 this command to recompile invalid objects
$ORACLE_HOME/rdbms/admin/utlrp.sql
Execute the preupgrade script:
@preupgrade_fixups.sql
Check the log file preupgrade.log and FIX the recomandation manuelly.
remove the all files from the folder Preupgrade_FASDBPRD and execute again preupgrade.jar command. You can do this multiple time.
Check the log file preupgrade.log and FIX the recomandation manuelly.
remove the all files from the folder Preupgrade_FASDBPRD and execute again preupgrade.jar command. You can do this multiple time.
Remove a non-used option marked as INVALID in dba_registry
set lines 200
col comp_name format a50
col version format a20
col status format a20
col parameter format a30
col value format a30
select comp_id, comp_name,version,status from dba_registry;
NOTE: All component should be VALIED
IMPORTENT: Remove Invalid object, because in my case RAC is installed but not in use , otherwise failed Upgrade to 12c
exec dbms_registry.removed('RAC');
Check the preupgrade.log and do the manually Fix as follow:
From oracle 12(ORADBPRD12.th.com) copy the file into oracle 11.2.0.3.0 database (ORADBPRD11.th.com):
@/app/oracle12.2/product/12.2.0.1/db/rdbms/admin/emremove.sql
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
PURGE DBA_RECYCLEBIN;
You can also remove the following hidden parameter, which are not in use any more, but double check based on your environment.
alter system reset log_archive_dest_2;
alter system reset utl_file_dir;
alter system reset sec_case_sensitive_logon;
alter system reset log_archive_dest_2;
alter system reset "_ash_size";
alter system reset "_enable_minscn_cr";
set lines 300;
SET SERVEROUTPUT ON;
spool invalid.lst;
EXECUTE DBMS_PREUP.INVALID_OBJECTS;
spool off;
exit;
Refresh MVs
declare
list_failures integer(3) :=0;
begin
DBMS_MVIEW.REFRESH_ALL_MVIEWS(list_failures,'C','', TRUE, FALSE);
end;
/
@/app/oracle11/product/11.2.0.3/db/rdbms/admin/utlrp.sql
drop PACKAGE BODY system.PKG_LOAD_HIST;
drop PACKAGE BODY PKG_RECYCLEBIN;
drop PACKAGE BODY system.PKG_RECYCLEBIN;
Remove OLAP:
!ls -ltr /app/oracle11/product/11.2.0.3/db/olap/admin/catnoamd.sql
@/app/oracle11/product/11.2.0.3/db/olap/admin/catnoamd.sql
re run preupgrade_fixups.sql
Following checks can be ignored, if you get the output.
SQL> @preupgrade_fixups.sql
Check Name Status Further DBA Action
---------- ------ ------------------
case_insensitive_auth Failed Manual fixup required.
em_present Failed Manual fixup recommended.
invalid_objects_exist Failed Manual fixup recommended.
default_resource_limit Failed Manual fixup recommended.
network_acl_priv Failed Manual fixup recommended.
exclusive_mode_auth Failed Manual fixup recommended.
underscore_events Failed Manual fixup recommended.
trgowner_no_admndbtrg Failed Manual fixup recommended.
Edit the init files and create spfile.
Edit the "/etc/oratab" file, setting in the new ORACLE_HOME value.
cd
$ORACLE_HOME/rdbms/admin
SQL> startup upgrade;
ORACLE instance
started.
Total System Global
Area 3.0266E+10 bytes
Fixed Size 12177264 bytes
Variable Size 3690987664 bytes
Database Buffers 2.6508E+10 bytes
Redo Buffers 54931456 bytes
Database mounted.
Database opened.
SQL> exit
Regular upgrade command.
cd
$ORACLE_HOME/rdbms/admin
$ORACLE_HOME/perl/bin/perl
catctl.pl -n 8 catupgrd.sql
...
...
------------------------------------------------------
Phases [0-115] End
Time:[2020_01_09 17:15:23]
------------------------------------------------------
Grand Total Time: 1259s
LOG FILES:
(/app/oracle12.2/product/12.2.0.1/db/cfgtoollogs/KARDBPRD/upgrade20200109165427/catupgrd*.log)
Upgrade Summary Report Located in:
/app/oracle12.2/product/12.2.0.1/db/cfgtoollogs/KARDBPRD/upgrade20200109165427/upg_summary.log
Grand Total Upgrade Time:
[0d:0h:20m:59s]
If you see such type
of error in the alert logfile. Do following.
ERROR: failed to establish dependency between database KARDBPRD and diskgroup resource ora. KARDBPRD1.dg
SOLUTION:
For establishing
dependencies between database and diskgroups, run srvctl from RDBMS home:
For example:
$ srvctl modify
database -d <db_unique_name> -a "<diskgroup_list>"
$ srvctl modify database
-d db112 -a "DATA1,DATA2"
From Grid_Home:
srvctl add database -db KARDBPRD
-oraclehome /app/oracle12.2/product/12.2.0.1/db
srvctl modify
database -d KARDBPRD -a "KARDBPRD1"
Login to the DB;
If you get following
error:
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
Find which parameter is deprecated.
col NAME format a30;
col VALUE format a10;
select p.name,p.value
from v$parameter p, v$spparameter s where s.name=p.name and p.isdeprecated='TRUE'
and s.isspecified='TRUE';
NAME VALUE
------------------------------
----------
sec_case_sensitive_logon FALSE
SOLUTION:
alter system reset sec_case_sensitive_logon scope=spfile;
POST Upgrade Steps:
Restart DB;
Login to the DB
sqlplus / as sysdba
EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
EXECUTE
DBMS_STATS.GATHER_DICTIONARY_STATS;
cd
/app/oracle12.2/product/12.2.0.1/db/rdbms/admin
@catuppst.sql
@/app/oracle12.2/product/12.2.0.1/db/rdbms/admin/utlrp.sql
If you get this type of error related to APEX.
ORA-20001: MISSING GRANT: grant execute on
"MDSYS"."SDO_DIM_ARRAY" to APEX_050100
ORA-20001: MISSING GRANT: grant execute on
"MDSYS"."SDO_DIM_ELEMENT" to APEX_050100
ORA-20001: MISSING GRANT: grant execute on
"MDSYS"."SDO_ELEM_INFO_ARRAY" to APEX_050100
ORA-20001: MISSING GRANT: grant execute on
"MDSYS"."SDO_GEOMETRY" to APEX_050100
ORA-20001: MISSING GRANT: grant execute on
"MDSYS"."SDO_ORDINATE_ARRAY" to APEX_050100
ORA-20001: MISSING GRANT: grant execute on
"MDSYS"."SDO_POINT_TYPE" to APEX_050100
SOLUTION:
grant execute on
"MDSYS"."SDO_GEOMETRY" to APEX_050100;
grant execute on
"MDSYS"."SDO_DIM_ARRAY" to APEX_050100;
grant execute on
"MDSYS"."SDO_DIM_ELEMENT" to APEX_050100;
grant execute on
"MDSYS"."SDO_ELEM_INFO_ARRAY" to APEX_050100;
grant execute on
"MDSYS"."SDO_GEOMETRY" to APEX_050100;
grant execute on
"MDSYS"."SDO_ORDINATE_ARRAY" to APEX_050100;
grant execute on
"MDSYS"."SDO_POINT_TYPE" to APEX_050100;
grant execute on "INHERIT ANY
PRIVILEGES" to APEX_050100;
grant inherit any privileges to APEX_050100;
exec
sys.validate_apex;
Execute following the
command again:
@/app/oracle12.2/product/12.2.0.1/db/rdbms/admin/utlrp.sql
Check the timezone Version.
SQL> SELECT * FROM
v$timezone_file;
FILENAME VERSION CON_ID
--------------------
---------- ----------
timezlrg_14.dat 14 0
Update timeZone to 26.Required DB restart.
Download the file:
DBMS_DST_scriptsV1.9.zip
unzip
DBMS_DST_scriptsV1.9.zip
cd
DBMS_DST_scriptsV1.9/
sqlplus / as sysdba
@upg_tzv_check.sql
@upg_tzv_apply.sql
SQL> select
version FROM v$timezone_file;
VERSION
----------
26
Re-Run postupgrade_fixups.sql
@/users/oracle/Preupgrade/postupgrade_fixups.sql
@/users/oracle/Preupgrade/postupgrade_fixups.sql
Run utlu122s.sql
@$ORACLE_HOME/rdbms/admin/utlu122s.sql
Run catuppst.sql
@$ORACLE_HOME/rdbms/admin/catuppst.sql
Run utlrp.sql
$ORACLE_HOME/rdbms/admin/utlrp.sql
Check the components and Version:
col COMP_NAME format
a50;
set linesize 300
set pagesize 100
select COMP_NAME, version,
status from dba_registry;
COMP_NAME
VERSION
STATUS
--------------------------------------------------
------------------------------ -----------
Oracle Database Catalog Views 12.2.0.1.0 UPGRADED
Oracle Database Packages and Types 12.2.0.1.0 UPGRADED
JServer JAVA Virtual Machine 12.2.0.1.0 UPGRADED
Oracle XDK
12.2.0.1.0
UPGRADED
Oracle Database Java Packages 12.2.0.1.0 UPGRADED
OLAP Analytic Workspace 12.2.0.1.0 UPGRADED
Oracle Real Application Clusters 11.2.0.3.0 REMOVED
Oracle Workspace Manager 12.2.0.1.0 UPGRADED
Oracle Text 12.2.0.1.0 UPGRADED
Oracle XML Database 12.2.0.1.0 UPGRADED
Oracle Multimedia
12.2.0.1.0
UPGRADED
Spatial
12.2.0.1.0 UPGRADED
Oracle Application Express 5.1.4.00.08 VALID
Oracle OLAP API
12.2.0.1.0
UPGRADED
14 rows selected.
set echo on pages
50000 linesize 160
col comp_id for a12
col version for a15
col Comp_Name for a40
col status for a10
SELECT
substr(comp_id,1,12)Comp_ID,
Status,substr(Version,1,10)Version,substr(Comp_Name,1,40)Comp_Name,MODIFIED
FROM DBA_Registry ORDER by 1,2;
Installing
CPU JAN Patch 2020
https://updates.oracle.com/Orion/Services/download?type=readme&aru=23320230 =====>>>> JAN PATCH 12c 2020
p30463673_122010_Linux-x86-64.zip
STEP 1:
From
Grid_home:
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/30593149
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/30585969
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/30586063
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir /app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/26839277
$ORACLE_HOME/OPatch/opatch prereq
CheckConflictAgainstOHWithDetail -phBaseDir
/app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/26839277
From
Oracle DB_Home:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/30593149
$ORACLE_HOME/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -phBaseDir
/app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932/30585969
AS root
user:
export PATH=$PATH:/app/oracle12.2/product/12.2.0.1/grid/OPatch
/app/oracle12.2/product/12.2.0.1/grid/OPatch/opatchauto
apply /app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932
Alternatively, you can install separately first
Grid_Home and then Oracle_Home as follow.
-- From root user:
export
PATH=$PATH:/app/oracle12.2/product/12.2.0.1/grid/OPatch
/app/oracle12.2/product/12.2.0.1/grid/OPatch/opatchauto
apply /app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932 -oh
/app/oracle12.2/product/12.2.0.1/grid
export
PATH=$PATH:/app/oracle12.2/product/12.2.0.1/db/OPatch
/app/oracle12.2/product/12.2.0.1/db/OPatch/opatchauto
apply /app/oracle12.2/download/JAN_patch_12c_2020/30463673/30501932 -oh /app/oracle12.2/product/12.2.0.1/db
crsctl start has
Start both DB:
startup
exit
Do for both DB separately:
cd
$ORACLE_HOME/OPatch
./datapatch -verbose
sqlplus / as sysdba
@$ORACLE_HOME/rdbms/admin/utlrp.sql
STEP 2:
Patch 30502018 - Oracle JavaVM Component Release Update 12.2.0.1.200114
shutdown immediate;
From
Oracle Home:
shutdown immediate;
export PATH=$PATH:/usr/ccs/bin
/app/oracle12.2/product/12.2.0.1/db/OPatch/opatch apply
/app/oracle12.2/download/JAN_patch_12c_2020/30463673/30502018
For both DB's execute separately.
startup upgrade
exit
cd
$ORACLE_HOME/OPatch
./datapatch -verbose
sqlplus / as sysdba
shutdown immediate;
startup
@$ORACLE_HOME/rdbms/admin/utlrp.sql
Check Patch status whether everything is fine:
col ID format a5
col COMMENTS format
a20
col VERSION format
a12
col BUNDLE format a5
col ACTION_TIME
format a30
col ACTION
formaSQL> t a10
set linesize 150
select
substr(action_time,1,30) action_time, substr(id,1,8) id, substr(action,1,10)
action, substr(version,1,8) version, substr(comments,1,20) comments from
sys.registry$history ;
Patch
Installation is done:
If everything works fine you can change the
compatibility parameter:
Need to change the compatibility to 12.2.0.1.0
for both DB and ASM
NOTE: Once
compatible is set to higher version, downgrade is not possible.
On DB:
alter system set compatible='12.2.0.1.0' scope=spfile;
ON ASM:
alter diskgroup FASDBPRD1 SET attribute 'compatible.asm'='12.2.0.1.0';
alter diskgroup FASDBPRD2 SET attribute 'compatible.asm'='12.2.0.1.0';
alter diskgroup FASDBPRD3 SET attribute 'compatible.asm'='12.2.0.1.0';
alter diskgroup FASDBPRD4 SET attribute 'compatible.asm'='12.2.0.1.0';
alter diskgroup KARDBPRD1 SET attribute 'compatible.asm'='12.2.0.1.0';
alter diskgroup FASDBPRD1 set attribute 'compatible.rdbms'='12.2.0.1.0';
alter diskgroup FASDBPRD2 set attribute 'compatible.rdbms'='12.2.0.1.0';
alter diskgroup FASDBPRD3 set attribute 'compatible.rdbms'='12.2.0.1.0';
alter diskgroup FASDBPRD4 set attribute 'compatible.rdbms'='12.2.0.1.0';
alter diskgroup KARDBPRD1 set attribute 'compatible.rdbms'='12.2.0.1.0';
Check the Change is applied:
col COMPATIBILITY form a10
col DATABASE_COMPATIBILITY form
a10
col NAME form a20
select group_number, name, compatibility, database_compatibility from
v$asm_diskgroup;
Compeleted!!
No comments:
Post a Comment