12c To 18c Upgrade
12c To 18c Upgrade
1)Create environment file, start and stop scripts for oracle 18c database and
give execute permission to user as follows:
2)Now download the Oracle 18c DB software from oracle.com
7)Now DBCA will be invoked and will ask for configuration option, set it as
Set up software only as we are only upgrading the database as follows:
8)Now set the Database Installation Option as Single instance database
installation as follows:
3)Now run the below PL/SQL gather statistics procedure to finish upgrade
soon.
4)Now download the preupgrade.zip file from MOS and place it in 18c DB’s
new $ORACLE_HOME/upgradeFile and unzip it as follows:
7)As the oracle DB is not available. Let us first create a pfile for our 18c by
copying it from 12c $ORACLE_HOME/dbs folder as reference to new
$ORACLE_HOME/dbs folder and edit it.
8)Now rename the init.ora pfile in new $ORACLE_HOME/dbs and edit the
content of the file as follows:
9)Now create all the new directories which are mentioned in the new pfile for
18c as follows:
10)Now copy the control files of 12c in 18c control files location as mentioned
in initodb18.ora file as follows:
15)Now copy the orapw and spfile from old $ORACLE_HOME to new
$ORACLE_HOME as follows:
16)Now switch to 18c listener
First stop the 12c listener
19)The DB is shutdown at the end of the process, so you need to start it before
moving to post-upgrade process:
20) The output from the "preupgrade.jar" lists a number of post-upgrade
recommendations. Some must be manually applied. Others are incorporated
into the "postupgrade_fixups.sql" script. In the following example we run all
the manual operations as well as the "postupgrade_fixups.sql" script.
21)Now upgrading the time zone using DBMS_DST package as follows:
Output:
22)Now do AUTOFIXUP using below command in SQL*Plus
References:
https://oracledbwr.com/oracle-18c-database-upgrade-from-12-1-0-2-to-18-3-0-0-0-using-manual-
method/
https://oracle-base.com/articles/18c/upgrading-to-18c