0% found this document useful (0 votes)
228 views45 pages

12c To 18c Upgrade

The document provides steps to upgrade an existing non-container Oracle database (Non-CDB) from 12c to 18c. It involves downloading the 18c software, running the installer, executing pre-upgrade scripts, shutting down the 12c database and copying files to the 18c Oracle home, upgrading and migrating the database, and addressing post-upgrade tasks. This ensures a successful upgrade of the database to the new 18c version.

Uploaded by

Ravali Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
228 views45 pages

12c To 18c Upgrade

The document provides steps to upgrade an existing non-container Oracle database (Non-CDB) from 12c to 18c. It involves downloading the 18c software, running the installer, executing pre-upgrade scripts, shutting down the 12c database and copying files to the 18c Oracle home, upgrading and migrating the database, and addressing post-upgrade tasks. This ensures a successful upgrade of the database to the new 18c version.

Uploaded by

Ravali Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

12c to 18c : Upgrading existing non-container database (Non-

CDB) to Oracle 18c

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

3)Now do export to ORACLE_HOME, SOFTWARE_DIR, ORACLE_BASE,


ORA_INVENTORY as follows:

4)Now the downloaded 18c software is present at SOFTWARE_DIR so unzip it


using below command shown
5)After unzipping oracle 18c database software it will extract all the following
files.

6)Now run the runInstaller as oracle user as follows:

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:

9)Now set the Database Edition as Enterprise Edition as follows:


10)Now set the Installation location
11)Now set the OS Groups as dba as follows:

12)Now do Prerequisite Checks if some packages are not installed then do


install them and do prerequisite check again. If some packages can’t be
installed, then do Ignore All as follows:
13)As the shown Package is not installed, install it as root in terminal as
follows:
14)Once the shown package is installed, then do Check again for
Prerequisite Checks as follows

15)Now after Ignoring move NEXT


16)Then you will get a pop-up for confirmation to continue. Then click yes

17)Now click NEXT at Summary window as follows:


18) Now it will ask to save the database response file as follows. Then save it
and click ok
19)Now click on Install then the DB will be installed as follows:
20) After some installation there will be a pop-up window for executing some
scripts as root, then open terminal login as root user and execute those scripts
and click ok as follows:

21)Now run the shown scripts as root user


22)Once the script is executed successfully click OK on DBCA.
23)Now click finish as the database is successfully installed.
24)Now as you open the SQLPLUS you won’t see the database is upgraded to
18c because there will be some extra steps to perform to upgrade the
db_home.

Pre steps for DB upgrade:


1) Take backup
2) Recycle bin contains 11 objects in it. Recycle bin must be completely empty
before database upgrade. So, Purge the recycle bin 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:

5)Now copy preupgrade.jar file from unzipping location to 18c DB


ORACL_HOME as follows:
6)Now move upgradeFile directory to new $ORACLE_HOME/rdbms/admin as
follows:
6)Now executing preupgrade.jar file 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:

11)Now try to do execute the preupgrade.jar file in new $ORACLE_HOME as


follows:

Its output is as follows:


Doing all PREUPGRADE TASKS:
12)Now running Oracle generated PREUPGRADE fixup script by logging into
database as follows:
UPGRADE THE DATABASE:
13)Now once the pre-upgrade actions are done, do shutdown the Database
and copy all the configuration files present in 12c’s $ORACLE_HOME to 18c’s
$ORACLE_HOME as follows:
14)Now move to new $ORACLE_HOME and create sqlnet.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

Check the status of listener


Export the new ORACLE_HOME and PATH

Now starting the 18c listener


17)Now start the database with 18c ORACLE_HOME and start the upgrade as
follows:
18)You can run the upgrade using either of the following commands. The
second is just a shorthand for the former:
(OR)

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

23)Now gather fixed object stats using following command in SQL*Plus:

24)Now do run oracle recommended auto-fixup script in SQL*Plus as follows:


25)Edit the /etc/oratab file with db_name and new db_home as follows:
26)Now remove all the unnecessary files.
27)Now the 18c Oracle Database is ready to use.

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

You might also like