Pre-Upgrade Preparation
Before starting the upgrade, ensure the following tasks are completed to avoid issues:
rman target /
RUN {
ALLOCATE CHANNEL c1 TYPE DISK;
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL c1;
}
Also back up the entire ORACLE_HOME directory as a fallback.fs.file-max, kernel.sem; user limits in /etc/security/limits.conf; installed dependencies such as libaio1, unixodbc).alien to convert to DEB format for Ubuntu:sudo alien -dv oracle-package.rpm
~/.bash_profile to include Oracle-specific variables (adjust paths as needed):export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export ORACLE_SID=hellodb
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG='AMERICAN_AMERICA.AL32UTF8'
Run source ~/.bash_profile to apply changes.Install New Oracle Software
./runInstaller from the unzipped directory). For silent install, use a response file (e.g., response_file.rsp) with parameters like ORACLE_HOME, ORACLE_SID, and UNIX_GROUP_NAME. Example silent command:./runInstaller -silent -responseFile /path/to/response_file.rsp
/u01/app/oraInventory/orainstRoot.sh, /u01/app/oracle/product/12.2.0/dbhome_1/root.sh) to set permissions and configure system files.Run the Upgrade
dbua
Follow the interactive wizard to select the database to upgrade, review pre-upgrade checks, and initiate the process. DBUA automates tasks like fixing configuration issues and updating data dictionary tables.sqlplus / as sysdba
SHUTDOWN IMMEDIATE;
STARTUP UPGRADE;
@?/rdbms/admin/catalog.sql;
@?/rdbms/admin/catproc.sql;
@?/rdbms/admin/utlrp.sql; -- Recompile invalid objects
SHUTDOWN IMMEDIATE;
STARTUP;
The STARTUP UPGRADE command starts the database in upgrade mode, and the scripts update the data dictionary and PL/SQL components.Post-Upgrade Verification
v$version:sqlplus / as sysdba
SELECT * FROM v$version;
SELECT COUNT(*) FROM employees;) and test critical applications to ensure compatibility.utlrp.sql (run as SYSDBA) to avoid runtime errors.Post-Upgrade Cleanup
/u01/app/oracle/product/11.2.0/dbhome_1) to free up space.