Upgrade Types
Database Upgrade Assistant (DBUA) – Interactive GUI method.
Command-Line Method for Upgrading Oracle Database – Manual Method
Oracle Data Pump – Export/Import Method
IMPORTANT POINTS TO REMEMBER
DBUA runs the Pre-Upgrade Information Tool as part of the prerequisite checks it performs before starting the upgrade. However, to reduce downtime, Oracle strongly recommends that you run the Pre-Upgrade Information Tool manually.
If the DB Is too large and DB need to be upgraded to same server, then DBUA tool is the best option to select.
Make sure there are sufficient space for the tablespaces to grow during upgrade, else upgrade will get failed in between. Like in cluster DB Diskgroup need to have sufficient free space.
If you stop upgrade, either you need to restore the DB to start again with DBUA or without restoring DB you need to upgrade DB using Manual (Command Line) upgrade procedure.
Need to Use Same OS user of Previous Database Version
Method 1 – DBUA
After running DBUA from the 18c binary, which was already installed.
ORACLE_HOME/bin
./dbua
Under Step 1 of 10
Select the database need to upgrade to higher version
Under Step 2 of 10
Select the PDB’s going to upgrade
Under Step 3 of 10
Pre-requisite check Result, this will be either Manual or Auto fixable and having severity as Warning or Error.
It may includes , apply patch to source server, OS or DB parameter changes, PGA/SGA memory suggestions, and etc.
Under Step 4 of 10
Select Upgrade Options such as
- Enable Parallel Upgrade
- Recompile Invalid Objects During Post Upgrade
- Upgrade Timezone Data
Select User tablespace to Read Only during Upgrade
You can specify the SQL script to be executed before or after upgrade
Under Step 5 of 10
Select Recovery Option
1)Flashback and Guaranteed Restore Point
2)Use RMAN backup
Under Step 6 of 10
Select the existing listener or you can create new Listener.
Under Step 7 of 10
Configure Enterprise manager or you can register in existing OMS
Method 2 – Manual Upgrade
(Local or Remote Cloning / Plug-out, Plug-In)
- Run the Pre-Upgrade Information Tool on the PDB.
Here in this script
- $ORACLE_HOME/jdk/bin/java is the Source Oracle Java Home
- /scratch/db/db1800/product/18.0.0/dbhome_1/rdbms/admin/preupgrade.jar
is the target ORACLE HOME preupgrade.jar file, it will decide on which version db going to upgrade
Run preupgrade_fixups.sql on your source database.
For example:
YOU HAVE CHOICE TO EITHER CLONE THE PDB OR UNPLUG AND PLUG THE PDB.
In Local clone method if the DB is too large and there are no much free space to duplicate the DB then you can go DBUA or Unplug and Plug method in same server. It will work on the existing DB Data files.
Local clone is suitable for smaller database where you can have the copy of the source in case of any issue.
UPGRADE USING CLONE PROCESS
- The source PDB must be open in read-only mode.
- The target database must have a database link to the source database.
- The user in the source database that the database link connects to must have the create pluggable database privilege.
Steps to create the Remote Clone PDB
- Create a common user in the source and give required permission.
(In Source)
- Create a db link from target container database to source container database.
(In Target)
- Source PDB must be in read-only mode
- In target, create the directory for the PDB’s datafiles and create pluggable database from source pdb using db link. Execute following command to create the PDB
Upgrading the Earlier Release PDB to the Later Release
In target, open the clone DB in Upgrade mode, which is now in mounted mode
Upgrade the PDB Using Upgrade Utility Command
- Method 1 : Parallel Upgrade Utility command (catctl.pl)
OR
- Method 2 : Shell utility (dbupgrade)
Post-upgrade Fixup and Invalid object compilation
- Log in to SQL*Plus, and open the PDB to execute post-upgrade fixups, and to
recompile the INVALID objects in the database:
NOTE before running datapatch make sure:
Copy the Patch folder from the source Oracle Home (OH) to the target Oracle Home (OH) same sub-directories.
From source folder /u01/app/oracle/product/12.2.0.1/dbhome_1/sqlpatch to target OH.
No comments:
Post a Comment