Oracle 12c To 19c Manual Upgradation - 1 - 230911 - 140607
Oracle 12c To 19c Manual Upgradation - 1 - 230911 - 140607
ORACLE DATABASE UPGRADE FROM 12C TO 19C DATABASE USING MANUAL UPGRADE:
Step-1:
Set the oracle 19c home & base locations
Step-2:
create a new directory for backup and upgrade.
[oracle@oracle12c u01]$ ls
Step 3:
Take backup of listener.ora, tnsnames.ora, sqlnet.ora, spfile & pfile, password file.
/u01/app/oracle/product/12.2.0/dbhome_1/dbs
EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
Step-6:
Purge Recyclebin
Step-7:
Refresh materialized views
SQL> declare
begin
end;
Step-9:
Run preupgrade_fixups.sql
SQL> @/u01/preupgrade/preupgrade_fixups.sql
Step-10:
Verify archive log dest.
Step-11:
Stop LISTENER
FLASHBACK_ON
------------------
NO
System altered.
Step-13:
Shutdown Database
Step-14:
Copy init and password files from 12c to 19c dbs home
[oracle@oracle19c dbs]$ ls
Step-15:
Startup DB in Upgrade mode from 19c home
/u01/app/oracle/product/19.0.0/dbhome_1/bin/sqlplus
Step-16:
Run dbupgrade.
All things will be done automatically no manual intervention needed after running ./dbupgrade
LOG FILES:
Step-17:
Startup DB from 19c home.
SQL> startup
Step-18:
Run utlrp.sql
SQL> @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/utlrp.sql
Session altered.
TIMESTAMP
------------------------------------------------------
TIMESTAMP
----------------------------------------------------------
COUNT(*)
----------
SQL> @/u01/preupgrade/postupgrade_fixups.sql
Step-19:
Upgrade Timezone
VERSION
----------
26
SQL> @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/utltz_upg_check.sql
Session altered.
Session altered.
SQL> @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/utltz_upg_apply.sql
Session altered.
VERSION
----------
32
Step-20:
Run utlusts.sql
SQL> @/u01/app/oracle/product/19.0.0/db_1/rdbms/admin/utlusts.sql TEXT
Step-21:
Once you have confirmed that upgrade is successful and there is no rollback, you can drop the restore
point
SQL> col name for a20
col GUARANTEE_FLASHBACK_DATABASE for a10
col TIME for a60
set lines 190
select NAME, GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;SQL> SQL> SQL> SQL>
NAME GUARANTEE_ TIME
------------- ---------- -----------------------
PRE_UPGRADE YES 16-FEB-21 07.47.48.000000000 AM
SQL> drop restore point PRE_UPGRADE;
Restore point dropped.
Step-22:
Update Compatible parameter value to 19.0.0
SQL> show parameter COMPATIBLE
NAME TYPE VALUE
----------------------------- ----------- ---------
compatible string 12.2.0
noncdb_compatible boolean FALSE
SQL> ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;
System altered.
SQL> shut immediate;
SQL> startup;
SQL> show parameter COMPATIBLE
NAME TYPE VALUE
--------------------------- ----------- -----------
compatible string 19.0.0
noncdb_compatible boolean FALSE
Step-22:
• Verify Component name and status from DBA_REGISTRY.
• Check Listener status.
• Verify PasswordFile.
[oracle@oracle19c dbs]$ ls -ltr
total 18332
-rwxrwxr-x. 1 oracle oinstall 3079 May 14 2015 init.ora
-rwxrwxr-x. 1 oracle oinstall 24 Feb 8 12:49 lkORACLE19C
-rwxrwxr-x. 1 oracle oinstall 24 Feb 8 12:52 lkORACLE19
-rwxrwxr-x. 1 oracle oinstall 2048 Feb 8 12:58 orapworacle19c
-rwxrwxr-x. 1 oracle oinstall 18726912 Feb 9 09:09 snapcf_oracle19c.f
-rwxrwxr-x. 1 oracle oinstall 24 Feb 11 07:39 lkORACLE12C
-rwxrwxr-x. 1 oracle oinstall 799 Feb 11 08:40 initoracle12c.ora
-rwxrwxr-x. 1 oracle oinstall 3584 Feb 12 07:12 spfileoracle19c.ora
-rwxrwxr-x. 1 oracle oinstall 1544 Feb 12 15:59 hc_oracle19c.dat
-rw-r-----. 1 oracle oinstall 3584 Feb 16 08:43 orapworacle12c
-rwxrwxr-x. 1 oracle oinstall 1544 Feb 16 09:20 hc_oracle12c.dat
-rw-r-----. 1 oracle oinstall 3584 Feb 16 09:20 spfileoracle12c.ora
Step-23:
Edit oratab to change the new version for Database.
[oracle@oracle19c dbs]$ vi /etc/oratab
[oracle@oracle19c dbs]$ cat /etc/oratab | grep -i oracle*
oracle19c:/u01/app/oracle/product/19.0.0/db_1:N
oracle12c:/u01/app/oracle/product/12.2.0/db_1:N