Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
36 views

Manual Upgrade 12c To 19c On Linux

Uploaded by

Mortal FC
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Manual Upgrade 12c To 19c On Linux

Uploaded by

Mortal FC
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Manual Upgrade 12c to 19c on Linux 1

Manual Upgrade 12c


to 19c on Linux
by

PRATHAMESH SURYAKANT LAD

Reference = Doc ID 2539778.1, Doc ID 1919.2

Steps checklist provided at end of the DOC

Environment

Database name = coe


Database version = 12.2.0.1.0
operating System = Redhat Linux 7.6 64 bits
Platform = Same platform
Target software version = 19.3.0.0.0
References = At the end.

first read Up-gradation Theory


Manual Upgrade 12c to 19c on Linux 2

1. Check Compatibility Before upgrade from Bellow table.

Source DB Intermediate path Target DB


12.1.0.1 --> 12.1.0.2/12.2.0.1 --> 19c
11.2.0.1/2/3 --> 11.2.0.4 --> 19c
11.1.0.6/7 --> 11.2.0.4 --> 19c
10.2.0.2/3/4/5 --> 11.2.0.4/ 12.1.0.2 --> 19c
10.1.0.5 --> 11.2.0.4/ 12.1.0.2 --> 19c
<= 9.2.0.8 --> 11.2.0.4 --> 19c

SQL> select banner from v$version;

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

2. Installed 19c software with latest patch update (RU I.e


release update)
I already installed 19c with latest release patch

2.2 Check OPatch level of source database.


[oracle@localhost ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
Manual Upgrade 12c to 19c on Linux 3

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

3. Set Fast Recovery Area

Read FRA.txt for more info

In my case I set FRA according to size of the database.

So I can set FRA at twice the size of database. but i set at 8gb

SQL> alter system set db_recovery_file_dest_size=8g;


Manual Upgrade 12c to 19c on Linux 4

SQL> alter system set


db_recovery_file_dest='/u12/app/oracle/fast_recovery_area/';

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

4. Enable Flashback database.

SQL> alter database flashback on;

SQL> select flashback_on from v$database;

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

5. check the objects should be valid.

SQL> select count(OBJECT_NAME) from dba_objects where


status='INVALID';

NOTE == if invalid object found then run


sql>@$ORACLE_HOME/rdbms/admin/utlrp.sql

SQL> col COMP_NAME for a25


SQL> col VERSION for a15
SQL> col STATUS for a10
SQL> set lines 100
SQL> set pages 100
Manual Upgrade 12c to 19c on Linux 5

SQL> select COMP_NAME,VERSION,STATUS from dba_registry;

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

6. Check for materialized views

A] Check the status of all materialized views (MV)


SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects
where OBJECT_TYPE='MATERIALIZED VIEW';
Manual Upgrade 12c to 19c on Linux 6

B] refresh any materialized views that are not fresh.


SQL> select OWNER, MVIEW_NAME, UPDATABLE, REFRESH_MODE,
REFRESH_METHOD, LAST_REFRESH_DATE from dba_mviews;

C] Check the size of your materialized view logs.


SQL> select LOG_OWNER, MASTER, LOG_TABLE from ALL_MVIEW_LOGS;

SQL> select count(*) from boss.MLOG$_ROSTER;

like so on.

D] If any materialized view logs have non-zero rows, then


refresh the base table materialized views.
A materialized view can be manually refreshed using the DBMS_MVIEW
package.

DBMS_MVIEW.REFRESH: Refreshes one or more Oracle materialized views

DBMS_MVIEW.REFRESH_ALL_MVIEWS: Refreshes all Oracle materialized


views
Manual Upgrade 12c to 19c on Linux 7

DBMS_MVIEW.REFRESH_DEPENDENT: Refreshes all table-based Oracle


materialized views

SQL> DECLARE
v_number_of_failures NUMBER(12) := 0;
BEGIN
DBMS_MVIEW.REFRESH_ALL_MVIEWS(v_number_of_failures,'C','', TRUE,
FALSE);
END;
/

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

7. Copying Transparent Encryption Oracle Wallets where you


want and edit sqlnet.ora file (if required)
SQL> select * from v$encryption_wallet;

[oracle@serverhost oracle]$ cd /u12/app/oracle/admin/coe/wallet/

[oracle@serverhost wallet]$ cp * /u19/app/oracle/admin/coe/wallet/

[oracle@serverhost wallet]$ cd $ORACLE_HOME/network/admin

[oracle@serverhost admin]$ cp sqlnet.ora


/u19/app/oracle/product/19.0.0/dbhome_1/network/admin/sqlnet.ora

I edit the sqlnet.ora file at target side.


Manual Upgrade 12c to 19c on Linux 8

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

8. Checking for Accounts Using Case-Insensitive Password


Version

A] Set case-sensitive password-based authentication enabled

SQL> show parameter sec_case_sensitive_logon

This value must be true. if the value is false then use below command

SQL> alter system set sec_case_sensitive_logon=TRUE scope=both;

B] Check Identify if you have accounts that use only 10G


case-insensitive password authentication versions.

SQL> select USERNAME, ACCOUNT_STATUS, PASSWORD_VERSIONS from


dba_users where ORACLE_MAINTAINED='N';

here no any user having 10g password version means no any user using
Case-Insensitive Password Version.

but if any user having 10g version then. for e.g


Manual Upgrade 12c to 19c on Linux 9

assume that user AKBAR using 10g password verion.

so If we upgrade to a new Oracle Database release without taking any


further action, then this account becomes inaccessible.
Ensure that the system is not configured in Exclusive Mode (by
setting the SQLNET.ORA parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER
to a more permissive authentication mode) before the upgrade.

SO HOW TO DEAL WITH 10G PASSWORD VERSION


==>

Fixing Accounts with Case-Insensitive Passwords

Set this value in sqlnet.ora file

SQLNET.ALLOWED_LOGON_VERSION_SERVER=11

After this change, proceed with the upgrade.

and after upgrade use the following command syntax to expire the
accounts who having 10g password verion

sql> alter user AKBAR password expire;

NOTE == we can use above step before upgrade also

So When these users log in, they are prompted to reset their
passwords. The system internally generates the missing 11G and 12C
password versions for their account, in addition to the 10G password
version. The 10G password version is still present, because the
system is running in the permissive mode.

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

9. About database vault

Source DB Target DB Do you need to What is


Release Release disable DB Database Vault
Vault Before Status After
Upgrade Upgrade

11.2 or earlier 12.1 YES Disabled. enable


Vault manually.

11.2 or earlier 12.2, 18.1 and NO Disabled. enable


later Vault manually
Manual Upgrade 12c to 19c on Linux 10

12.1 and later 12.2, 18.1 and NO Vault has the


later same enforcement
status that you
had in place
before the
upgrade.

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

10. Check no files are in Back up mode.


SQL> SELECT * FROM v$backup WHERE status='ACTIVE';

In my case one tablespace in backup mode. so i need to


remove the tablespace from backup mode.

SQL> select FILE_ID, TABLESPACE_NAME from dba_data_files where


FILE_ID=7;

SQL> alter tablespace users end backup;

SQL> SELECT * FROM v$backup WHERE status='ACTIVE';

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

11. Check no any file is in recovery mode.

SQL> select * from v$recover_file;


Manual Upgrade 12c to 19c on Linux 11

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

12. Purge Recycle bin

SQL> purge dba_recyclebin;

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

13. Check the time zone

SQL> col PROPERTY_NAME for a25


SQL> col PROPERTY_V for a15
SQL> select PROPERTY_NAME, PROPERTY_VALUE from database_properties
where PROPERTY_NAME in
('DST_PRIMARY_TT_VERSION','DST_SECONDARY_TT_VERSION','DST_UPGRADE_STA
TE');

SQL> select * from v$timezone_file;

-----------------------------------------------------------
Manual Upgrade 12c to 19c on Linux 12

14. Gather statistics

SQL> exec dbms_stats.gather_fixed_objects_stats;

SQL> exec dbms_stats.gather_schema_stats ('SYSTEM');

SQL> exec dbms_stats.gather_schema_stats ('SYS');

SQL> exec dbms_stats.gather_dictionary_stats;

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

15. Check PUBLIC Synonym AREA

SQL> col owner for a10


SQL> col SYNONYM_NAME for a15
SQL> col TABLE_OWNER for a15
SQL> col TABLE_NAME for a10
SQL> select owner, synonym_name, table_owner, table_name from
dba_synonyms where synonym_name = 'AREA';

NOTE == Before the upgrade, if Oracle Multimedia and/or Oracle


Spatial is installed, check the definition of the PUBLIC synonym
AREA. It should be defined to be a synonym for OGC_AREA, otherwise,
it causes invalid db components upon upgrading.

-----------------------------------------------------------
Manual Upgrade 12c to 19c on Linux 13

16. Take a RMAN backup

RMAN> BACKUP validate INCREMENTAL LEVEL 0 DATABASE


format='/home/oracle/bkp/coe_bkp_%U';

RMAN> backup validate archivelog all


format='/home/oracle/bkp/coe_arch_%U'

RMAN> run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
allocate channel ch3 type disk;
allocate channel ch4 type disk;
sql'alter system archive log current';
sql'alter system archive log current';
sql'alter system archive log current';
sql'alter system archive log current';
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt obsolete;
BACKUP as compressed backupset INCREMENTAL LEVEL 0 DATABASE format='/
home/oracle/bkp/coe_bkp_%U';
backup as compressed backupset current controlfile
format'/home/oracle/bkp/ctl_bkp_%U';
backup as compressed backupset archivelog all
format='/home/oracle/bkp/coe_arch_%U';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}
Manual Upgrade 12c to 19c on Linux 14

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

17. Create Flashback Restore Point

create restore point <restorepoint name> garantee flashback database;

SQL> create restore point before_upgrade guarantee flashback


database;

SQL> set lines 100


SQL> set pages 100
SQL> col name for a15
SQL> select name,PRESERVED,GUARANTEE_FLASHBACK_DATABASE,SCN from
v$restore_point;

-----------------------------------------------------------
Manual Upgrade 12c to 19c on Linux 15

18. Run preupgrade.jar file

Location = 19c oracle_home/rdbms/admin

[oracle@serverhost dbhome_1]$ ./jdk/bin/java -jar


/u19/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar
DIR /home/oracle/preupgradelogs/

NOTE ==
Read the preupgrade.log (sample log is in pdf)
and then run the preupgrade_fixups.sql

Sample Output of preupgrade.log


[oracle@serverhost preupgradelogs]$ cat preupgrade.log
Report generated by Oracle Database Pre-Upgrade Information
Tool Version
19.0.0.0.0 Build: 1 on 2022-10-28T23:27:37

Upgrade-To version: 19.0.0.0.0

=======================================
Status of the database prior to upgrade
=======================================
Database Name: COE
Container Name: coe
Manual Upgrade 12c to 19c on Linux 16

Container ID: 0
Version: 12.2.0.1.0
DB Patch Level: No Patch Bundle applied
Compatible: 12.2.0
Blocksize: 8192
Platform: Linux x86 64-bit
Timezone File: 26
Database log mode: ARCHIVELOG
Readonly: FALSE
Edition: EE

Oracle Component Upgrade Action


Current Status
---------------- --------------
--------------
Oracle Server [to be upgraded]
VALID
JServer JAVA Virtual Machine [to be upgraded]
VALID
Oracle XDK for Java [to be upgraded]
VALID
Real Application Clusters [to be upgraded]
OPTION OFF
Oracle Workspace Manager [to be upgraded]
VALID
OLAP Analytic Workspace [to be upgraded]
VALID
Oracle Label Security [to be upgraded]
VALID
Oracle Database Vault [to be upgraded]
VALID
Oracle Text [to be upgraded]
VALID
Oracle XML Database [to be upgraded]
VALID
Oracle Java Packages [to be upgraded]
VALID
Oracle Multimedia [to be upgraded]
VALID
Oracle Spatial [to be upgraded]
VALID
Oracle OLAP API [to be upgraded]
VALID

==============
BEFORE UPGRADE
Manual Upgrade 12c to 19c on Linux 17

==============

REQUIRED ACTIONS
================
1. Set DB_RECOVERY_FILE_DEST_SIZE initialization
parameter to at least 8702
MB. Check alert log during the upgrade to ensure
there is remaining free
space available in the recovery area.

DB_RECOVERY_FILE_DEST_SIZE is set at 8192 MB. There


is currently 6726 MB
of free space remaining, which may not be adequate
for the upgrade.

Currently:
Fast recovery area :
/u12/app/oracle/fast_recovery_area/
Limit : 8192 MB
Used : 1466 MB
Available : 6726 MB

The database has archivelog and flashback enabled,


and the upgrade
process will need free space to generate archived and
flashback logs to
the recovery area specified by initialization
parameter
DB_RECOVERY_FILE_DEST. The logs generated must not
overflow the limit
set by DB_RECOVERY_FILE_DEST_SIZE, as that can cause
the upgrade to not
proceed.

RECOMMENDED ACTIONS
===================
2. Update NUMERIC INITIALIZATION PARAMETERS to meet
estimated minimums.
This action may be done now or when starting the
database in upgrade mode
using the 19 ORACLE HOME.

Parameter Currently
19 minimum
--------- ---------
------------------
Manual Upgrade 12c to 19c on Linux 18

*sga_target 406847488
1002438656

The database upgrade process requires certain


initialization parameters
to meet minimum values. The Oracle upgrade process
itself has minimum
values which may be higher and are marked with an
asterisk. After
upgrading, those asterisked parameter values may be
reset if needed.

3. If an auto-login Oracle Transparent Data Encryption


(TDE) Keystore is
correctly set up, no action needs to be taken.
Otherwise, before starting
up the database in upgrade mode in the new Oracle
Database Oracle Home,
either open the TDE Keystore, or ensure that an auto-
login TDE Keystore
is configured for the system. If errors are seen
while the database
upgrade is running because the TDE Keystore is
closed, then open the TDE
Keystore and resume the upgrade (see "catctl.pl -R").
It may be
necessary to open the TDE Keystore as the upgrade
progresses in a non-CDB
or CDB (e.g., in CDB$ROOT and PDB) if no auto-login
TDE Keystore has been
configured, as the upgrade process can shutdown and
startup the
database.

The database is using TDE. The database upgrade


process can involve
operations (certain SQL statements and/or database
startups) that need to
access the encryption key.

If Oracle Transparent Data Encryption (TDE) is in


use, the database
system must have access to its Oracle Transparent
Data Encryption Master
Encryption Key during database upgrade. For more
information on
Manual Upgrade 12c to 19c on Linux 19

configuring Transparent Data Encryption, refer to the


12.2 Oracle
Database Advanced Security Guide, Section 3:
Configuring Transparent Data
Encryption.

4. (AUTOFIXUP) Gather stale data dictionary statistics


prior to database
upgrade in off-peak time using:

EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

Dictionary statistics do not exist or are stale (not


up-to-date).

Dictionary statistics help the Oracle optimizer find


efficient SQL
execution plans and are essential for proper upgrade
timing. Oracle
recommends gathering dictionary statistics in the
last 24 hours before
database upgrade.

For information on managing optimizer statistics,


refer to the 12.2.0.1
Oracle Database SQL Tuning Guide.

INFORMATION ONLY
================
5. To help you keep track of your tablespace
allocations, the following
AUTOEXTEND tablespaces are expected to successfully
EXTEND during the
upgrade process.

Min Size
Tablespace Size For
Upgrade
---------- ----------
-----------
SYSAUX 580 MB 592
MB
SYSTEM 820 MB 929
MB
TEMP 32 MB 150
MB
Manual Upgrade 12c to 19c on Linux 20

UNDOTBS1 85 MB 439
MB

Minimum tablespace sizes for upgrade are estimates.

6. Consider removing the following deprecated


initialization parameters.

Parameter
---------
sec_case_sensitive_logon

These deprecated parameters probably will be obsolete


in a future release.

7. Check the Oracle Backup and Recovery User's Guide for


information on how
to manage an RMAN recovery catalog schema.

If you are using a version of the recovery catalog


schema that is older
than that required by the RMAN client version, then
you must upgrade the
catalog schema.

It is good practice to have the catalog schema the


same or higher version
than the RMAN client version you are using.

ORACLE GENERATED FIXUP SCRIPT


=============================
All of the issues in database COE
which are identified above as BEFORE UPGRADE
"(AUTOFIXUP)" can be resolved by
executing the following

SQL>@/home/oracle/preupgradelogs/preupgrade_fixups.sql

=============
AFTER UPGRADE
=============

REQUIRED ACTIONS
================
None
Manual Upgrade 12c to 19c on Linux 21

RECOMMENDED ACTIONS
===================
8. Upgrade the database time zone file using the
DBMS_DST package.

The database is using time zone file version 26 and


the target 19 release
ships with time zone file version 32.

Oracle recommends upgrading to the desired (latest)


version of the time
zone file. For more information, refer to "Upgrading
the Time Zone File
and Timestamp with Time Zone Data" in the 19 Oracle
Database
Globalization Support Guide.

9. To identify directory objects with symbolic links in


the path name, run
$ORACLE_HOME/rdbms/admin/utldirsymlink.sql AS SYSDBA
after upgrade.
Recreate any directory objects listed, using path
names that contain no
symbolic links.

Some directory object path names may currently


contain symbolic links.

Starting in Release 18c, symbolic links are not


allowed in directory
object path names used with BFILE data types, the
UTL_FILE package, or
external tables.

10. (AUTOFIXUP) Gather dictionary statistics after the


upgrade using the
command:

EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;

Oracle recommends gathering dictionary statistics


after upgrade.

Dictionary statistics provide essential information


to the Oracle
Manual Upgrade 12c to 19c on Linux 22

optimizer to help it find efficient SQL execution


plans. After a database
upgrade, statistics need to be re-gathered as there
can now be tables
that have significantly changed during the upgrade or
new tables that do
not have statistics gathered yet.

11. Gather statistics on fixed objects after the upgrade


and when there is a
representative workload on the system using the
command:

EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

This recommendation is given for all preupgrade runs.

Fixed object statistics provide essential information


to the Oracle
optimizer to help it find efficient SQL execution
plans. Those
statistics are specific to the Oracle Database
release that generates
them, and can be stale upon database upgrade.

For information on managing optimizer statistics,


refer to the 12.2.0.1
Oracle Database SQL Tuning Guide.

ORACLE GENERATED FIXUP SCRIPT


=============================
All of the issues in database COE
which are identified above as AFTER UPGRADE "(AUTOFIXUP)"
can be resolved by
executing the following

SQL>@/home/oracle/preupgradelogs/postupgrade_fixups.sql

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

19. Execute required action mention in preupgrade.log

A] REQUIRED ACTIONS

A.1 DB_RECOVERY_FILE_DEST_SIZE initialization parameter to


at least 8702 MB
Manual Upgrade 12c to 19c on Linux 23

SQL> alter system set db_recovery_file_dest_size=15360m scope=both;

SQL> show parameter db_recovery_file_dest_size

B] RECOMMENDED ACTIONS

B.1 Update NUMERIC INITIALIZATION PARAMETERS to meet


estimated minimums.
SQL> alter system set sga_max_size=1024m scope=spfile;

Then take a restart

Now set sga_target

SQL> alter system set sga_target=1002438656 scope=both;

SQL> show parameter sga


Manual Upgrade 12c to 19c on Linux 24

B.2 TDE wallet should be auto login or open in new home


during upgrade.
SQL> select WRL_PARAMETER, STATUS, WALLET_TYPE from
v$encryption_wallet;

B.3 Make sure tablespaces must be autoextended or having


sufficient size.
SQL> select TABLESPACE_NAME, BYTES/1024/1024, STATUS, AUTOEXTENSIBLE
from dba_data_files;

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

20. Run the preupgrade_fixups.sql


Location is seen in preupgradelog

SQL> @/home/oracle/preupgradelogs/preupgrade_fixups.sql
Manual Upgrade 12c to 19c on Linux 25

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

21. Create pfile and Shutdown the database


SQL> create pfile from spfile;

SQL> shut immediate;

-----------------------------------------------------------
Manual Upgrade 12c to 19c on Linux 26

22. Copy the all imp files to 19c end and stop all the job
like rman, crontab

[oracle@serverhost dbs]$ cp initcoe.ora spfilecoe.ora orapwcoe


/u19/app/oracle/product/19.0.0/dbhome_1/dbs
[oracle@serverhost dbs]$
[oracle@serverhost dbs]$ cd ../network/admin/
[oracle@serverhost admin]$ cp listener.ora sqlnet.ora tnsnames.ora
/u19/app/oracle/product/19.0.0/dbhome_1/network/admin/

[oracle@ci6142 ~]$ su - root

[root@ci6142 ~]# systemctl stop crond.service


[root@ci6142 ~]# systemctl status crond.service

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

23. Set the 19c path and startup in upgrade mode.

[oracle@serverhost ~]$ export ORACLE_BASE=/u19/app/oracle


[oracle@serverhost ~]$ export
ORACLE_HOME=/u19/app/oracle/product/19.0.0/dbhome_1
[oracle@serverhost ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@serverhost ~]$ export ORACLE_SID=coe
[oracle@serverhost ~]$
[oracle@serverhost ~]$ sqlplus / as sysdba

SQL> startup upgrade;


Manual Upgrade 12c to 19c on Linux 27

NOTE == Status must be open migrate


-----------------------------------------------------------
24. Exit the session and run dbupgrade script.

[oracle@serverhost ~]$ nohup $ORACLE_HOME/bin/dbupgrade &


[1] 44881
nohup: ignoring input and appending output to ‘nohup.out’
[oracle@serverhost ~]$
[oracle@serverhost ~]$ jobs
[1]+ Running nohup $ORACLE_HOME/bin/dbupgrade &

[oracle@serverhost ~]$ ll |grep nohup


-rw-------. 1 oracle oinstall 3087 Oct 29 16:13 nohup.out
[oracle@serverhost ~]$
[oracle@serverhost ~]$ tail -50000f nohup.out
Manual Upgrade 12c to 19c on Linux 28

Sample Output of preupgrade.log


Argument list for
[/u19/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 0
Run in c = 0
Do not run in C = 0
Input Directory d = 0
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 0
Child Process I = 0
Log Dir l = 0
Priority List Name L = 0
Upgrade Mode active M = 0
SQL Process Count n = 0
SQL PDB Process Count N = 0
Open Mode Normal o = 0
Start Phase p = 0
End Phase P = 0
Reverse Order r = 0
AutoUpgrade Resume R = 0
Script s = 0
Serial Run S = 0
RO User Tablespaces T = 0
Display Phases y = 0
Debug catcon.pm z = 0
Debug catctl.pl Z = 0

catctl.pl VERSION: [19.0.0.0.0]


STATUS: [Production]
BUILD: [RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417]

/u19/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/orahome =
[/u19/app/oracle/product/19.0.0/dbhome_1]
/u19/app/oracle/product/19.0.0/dbhome_1/bin/orabasehome =
[/u19/app/oracle/product/19.0.0/dbhome_1]
catctlGetOraBaseLogDir = [/u19/app/oracle/product/19.0.0/dbhome_1]

Analyzing file
/u19/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catupgrd.sql

Log file directory = [/tmp/cfgtoollogs/upgrade20221029161232]

catcon::set_log_file_base_path: ALL catcon-related output will be


written to
[/tmp/cfgtoollogs/upgrade20221029161232/catupgrd_catcon_44892.lst]

catcon::set_log_file_base_path: catcon: See


[/tmp/cfgtoollogs/upgrade20221029161232/catupgrd*.log] files for
output generated by scripts
Manual Upgrade 12c to 19c on Linux 29

catcon::set_log_file_base_path: catcon: See


[/tmp/cfgtoollogs/upgrade20221029161232/catupgrd_*.lst] files for
spool files, if any

Number of Cpus = 2
Database Name = coe
DataBase Version = 12.2.0.1.0
catcon::set_log_file_base_path: ALL catcon-related output will be
written to
[/u19/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/coe/upgrade20221
029161245/catupgrd_catcon_44892.lst]

catcon::set_log_file_base_path: catcon: See [/u19/app/oracle/product/


19.0.0/dbhome_1/cfgtoollogs/coe/upgrade20221029161245/catupgrd*.log]
files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/u19/app/oracle/product/


19.0.0/dbhome_1/cfgtoollogs/coe/upgrade20221029161245/catupgrd_*.lst]
files for spool files, if any

Log file directory =


[/u19/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/coe/upgrade20221
029161245]

Parallel SQL Process Count = 4


Components in [coe]
Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS
ORDIM OWM SDO XDB XML XOQ]
Not Installed [APEX EM MGW ODM RAC WK]

------------------------------------------------------
Phases [0-107] Start Time:[2022_10_29 16:13:00]
------------------------------------------------------
*********** Executing Change Scripts ***********
Serial Phase #:0 [coe] Files:1 Time: 60s
*************** Catalog Core SQL ***************
Serial Phase #:1 [coe] Files:5 Time: 93s
Restart Phase #:2 [coe] Files:1 Time: 6s
e] Files:1 Time: 0s
***************** Post Upgrade *****************
.
.
.

Serial Phase #:103 [coe] Files:1 Time: 28s


**************** Summary report ****************
Serial Phase #:104 [coe] Files:1 Time: 4s
*** End PDB Application Upgrade Post-Shutdown **
Serial Phase #:105 [coe] Files:1 Time: 2s
Serial Phase #:106 [coe] Files:1 Time: 0s
Serial Phase #:107 [coe] Files:1 Time: 30s
Manual Upgrade 12c to 19c on Linux 30

------------------------------------------------------
Phases [0-107] End Time:[2022_10_29 18:13:44]
------------------------------------------------------

Grand Total Time: 7244s

LOG FILES: (/u19/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/coe/


upgrade20221029161245/catupgrd*.log)

Upgrade Summary Report Located in:


/u19/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/coe/
upgrade20221029161245/upg_summary.log

Grand Total Upgrade Time: [0d:2h:0m:44s]

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

25. Check the Summary report

[oracle@serverhost upgrade20221029161245]$ cat


$ORACLE_HOME/cfgtoollogs/coe/upgrade20221029161245/upg_summary.log

-----------------------------------------------------------
Manual Upgrade 12c to 19c on Linux 31

26. Startup the dabase and check invalid objects.


SQL> select count(*) from dba_objects where status='INVALID';

So we need to run utlrp.sql


SQL> @?/rdbms/admin/utlrp.sql

Check again for invalid objects

SQL> select count(*) from dba_objects where status='INVALID';

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

27. Run postupgrade_fixups script.

SQL> @/home/oracle/preupgradelogs/postupgrade_fixups.sql

Session altered.
Manual Upgrade 12c to 19c on Linux 32

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

28. Upgrade the timezone

SQL> @?/rdbms/admin/utltz_upg_check.sql

SQL> @?/rdbms/admin/utltz_upg_apply.sql
Manual Upgrade 12c to 19c on Linux 33

Check the Timezone

SQL> set lines 100


SQL> col PROPERTY_NAME for a25
SQL> col PROPERTY_VALUE for a15
SQL> select PROPERTY_NAME, PROPERTY_VALUE from database_properties
where PROPERTY_NAME in
('DST_PRIMARY_TT_VERSION','DST_SECONDARY_TT_VERSION','DST_UPGRADE_STA
TE');

SQL> select * from v$timezone_file;


Manual Upgrade 12c to 19c on Linux 34

Another way to Upgrade Time-Zone


A] Check the status from database_properties

B] Run below script to prepare for upgrade

DECLARE
l_tz_version PLS_INTEGER;
BEGIN
l_tz_version := DBMS_DST.get_latest_timezone_version;

DBMS_OUTPUT.put_line('l_tz_version=' || l_tz_version);
DBMS_DST.begin_prepare(l_tz_version);
END;
/
C] Check the status again, It should be like
PROPERTY_NAME PROPERTY_VALUE
------------------------- ---------------
DST_SECONDARY_TT_VERSION 26
DST_PRIMARY_TT_VERSION 32
DST_UPGRADE_STATE UPGRADE

D] Empty the below tables


TRUNCATE TABLE sys.dst$affected_tables;
TRUNCATE TABLE sys.dst$error_table;
Manual Upgrade 12c to 19c on Linux 35

E] Find tables affected by the upgrade.

EXEC DBMS_DST.find_affected_tables;

F] Check the results of the call.


SELECT * FROM sys.dst$affected_tables;
SELECT * FROM sys.dst$error_table;

G] end the prepare phase.

EXEC DBMS_DST.end_prepare;

H] Put the database into upgrade mode.

SHUTDOWN IMMEDIATE;
STARTUP UPGRADE;

I] Begin the upgrade to the latest version.

SET SERVEROUTPUT ON
DECLARE
l_tz_version PLS_INTEGER;
BEGIN
SELECT DBMS_DST.get_latest_timezone_version
INTO l_tz_version
FROM dual;

DBMS_OUTPUT.put_line('l_tz_version=' || l_tz_version);
DBMS_DST.begin_upgrade(l_tz_version);
END;
/
J] Restart the database.

SHUTDOWN IMMEDIATE;
STARTUP;

K] Do the upgrade of the database file zone file.

SET SERVEROUTPUT ON
DECLARE
l_failures PLS_INTEGER;
BEGIN
DBMS_DST.upgrade_database(l_failures);
Manual Upgrade 12c to 19c on Linux 36

DBMS_OUTPUT.put_line('DBMS_DST.upgrade_database : l_failures=' ||
l_failures);
DBMS_DST.end_upgrade(l_failures);
DBMS_OUTPUT.put_line('DBMS_DST.end_upgrade : l_failures=' ||
l_failures);
END;
/

L] Check any table whether pending


COLUMN owner FORMAT A30
COLUMN table_name FORMAT A30

SELECT owner, table_name, upgrade_in_progress FROM dba_tstz_tables


ORDER BY 1,2;

M] Check the status from database_properties

It should be

PROPERTY_NAME PROPERTY_VALUE
------------------------- ---------------
DST_SECONDARY_TT_VERSION 0
DST_PRIMARY_TT_VERSION 32
DST_UPGRADE_STATE NONE

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

29. Gather the statistics

SQL> exec dbms_stats.gather_fixed_objects_stats;

SQL> exec dbms_stats.gather_dictionary_stats;

-----------------------------------------------------------
Manual Upgrade 12c to 19c on Linux 37

30. Set 19c ORACLE_HOME in listener file

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

31. Edit 19c ORACLE_HOME in /etc/oratab

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

32. Crosscheck the user's password version (read step no 8)

SQL> select USERNAME, ACCOUNT_STATUS, PASSWORD_VERSIONS from


dba_users where ORACLE_MAINTAINED='N';

If found user with password version 10g then expire the


password of that account.

sql> alter user <username> password expire;

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

33. Drop restore point

SQL> select name,PRESERVED,GUARANTEE_FLASHBACK_DATABASE,SCN from


v$restore_point;

SQL> drop restore point BEFORE_UPGRADE;


Manual Upgrade 12c to 19c on Linux 38

SQL> select name,PRESERVED,GUARANTEE_FLASHBACK_DATABASE,SCN from


v$restore_point;

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

34. Start listener

LSNRCTL> start prod12c

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

35. Set compatibility at 19.0.0 and restart the DB

if all oke then set it

SQL> alter system set compatible='19.0.0' scope=spfile;


Manual Upgrade 12c to 19c on Linux 39

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

36. Take a RMAN level 0 backup

RMAN> BACKUP validate INCREMENTAL LEVEL 0 DATABASE


format='/home/oracle/bkp19/coe_bkp_%U';

RMAN> backup validate archivelog all


format='/home/oracle/bkp19/coe_arch_%U';

run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
allocate channel ch3 type disk;
allocate channel ch4 type disk;
sql'alter system archive log current';
sql'alter system archive log current';
sql'alter system archive log current';
sql'alter system archive log current';
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt obsolete;
BACKUP as compressed backupset INCREMENTAL LEVEL 0 DATABASE format='/
home/oracle/bkp19/coe_bkp_%U';
backup as compressed backupset current controlfile
format'/home/oracle/bkp19/ctl_bkp_%U';
backup as compressed backupset archivelog all
format='/home/oracle/bkp19/coe_arch_%U';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}
Manual Upgrade 12c to 19c on Linux 40

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

37. start the jobs like crontab

[oracle@ci6142 ~]$ su - root


[root@ci6142 ~]# systemctl start crond.service
[root@ci6142 ~]# systemctl status crond.service

===========================================================

Steps Checklist

Step No Step
Check Compatibility Before upgrade from Bellow
01
table.
Manual Upgrade 12c to 19c on Linux 41

Installed 19c software with latest patch update


02
(RU I.e release update)

2.2 Check OPatch level of source database.

03 Set Fast Recovery Area

04 Enable Flashback database.

check the version of all the component and objects


05
should be valid.

06 Check for materialized views

06.A Check the status of all materialized views (MV)

06.B refresh any materialized views that are not fresh.

06.C Check the size of your materialized view logs.

If any materialized view logs have non-zero rows,


06.D
then refresh the base table materialized views.

Copying Transparent Encryption Oracle Wallets


07 where you want and edit sqlnet.ora file (if
required)

Checking for Accounts Using Case-Insensitive


08
Password Version

Set case-sensitive password-based authentication


08.A
enabled.

Check Identify if you have accounts that use only


08.B 10G case-insensitive password authentication
versions.

09 About database vault.

10 Check no files are in Back up mode.

11 Check no any file is in recovery mode.

12 Purge Recycle bin.

13 Check the time zone.

14 Gather statistics.

15 Check PUBLIC Synonym AREA.

16 Take a RMAN backup.


Manual Upgrade 12c to 19c on Linux 42

17 Create Flashback Restore Point.

18 Run preupgrade.jar file.

19 Execute required action mention in preupgrade.log.

20 Run the preupgrade_fixups.sql.

21 Create pfile and Shutdown the database.

Copy the all imp files to 19c end and stop all the
22
job like rman, crontab

23 Set the 19c path and startup in upgrade mode.

24 Exit the session and run dbupgrade script.

25 Check the Summary report.

26 Startup the dabase and check invalid objects.

27 Run postupgrade_fixups script.

Upgrade the timezone / Another way to Upgrade


28
Time-Zone.

29 Gather the statistics.

30 Set 19c ORACLE_HOME in listener file.

31 Edit 19c ORACLE_HOME in /etc/oratab .

Crosscheck the user's password version (read step


32
no 8).

33 Drop restore point.

34 Start listener.

35 Set compatibility at 19.0.0 and restart the DB.

36 Take a RMAN level 0 backup.

37 start the jobs like crontab

===========================================================

The End

You might also like