These steps are for Upgrading Oracle Document, I have used 188.8.131.52 as target and 184.108.40.206 as source. You might have different versions while upgrading but the step remains same if the path you are following is certified from Oracle.
Always good to check the Oracle Support for certified path.
- Will find the 11gR2 release under: “/oracle_cds/staging/64bit/11_2_release”
- Installing 220.127.116.11 [This is just an example, in your case database version may vary]:
- Set Display environmental variable
- “export DISPLAY=<your_IP>.0:0
- Start the “runInstaller” from -20 min
“/oracle_cds/ibm/64bit/11_2_release/Oracle18.104.22.168/database” as oracle user.
- Execute root.sh script as a root user – 2 min
- Copy the “utlu112i.sql” from new ORACLE_HOME/rdbms/admin to a temp location
- Change the location to that temporary directory
- Start the sqlplus and login as sysdba into the target database (old version)
- Execute the script which was copied at temporary location with spooling enabled
- Read the spool log to get the further steps.
- Download “DBUPGDIAG.SQL” from Oracle support
- Execute the script to check the integrity issues
- Ask for the log location, give the temporary directory used above as the temporary log directory, all logs will be generated under that directory.
2. Optimizer Statistics
Gather stats on SYS Schema
- SELECT * FROM V$OPTION WHERE PARAMETER = ‘Oracle Database Vault’;
- Follow Oracle Support Document 453903.1
- Initiate the oraenv for the old version of oracle
- Change the current directory to new ORACLE_HOME
- $ emdwgrd -save -sid old_SID -path save_directory
- where old_SID is the SID of the database being upgraded and save_directory is the path to the storage place you have chosen for your Database Control files and data.
- Check using:
- SELECT username, default_tablespace
WHERE username in (‘SYS’,’SYSTEM’);
- Alter by this code:
SQL> ALTER user SYS default tablespace SYSTEM;
SQL> ALTER user SYSTEM default tablespace SYSTEM;
- SQL> SELECT name FROM v$controlfile;
SQL> SELECT file_name FROM dba_data_files;
SQL> SELECT group#, member FROM v$logfile;.
- Take a backup of all files
- lsnrctl stop testdb_lsnr
- initiate the netca from previous version of ORACLE_HOME
- delete the existing listener using netca
- stop the dbconsole also
- backup database format ‘/oracle/tempdb/andy/%u’ tag ‘before_upgrade’
- BACKUP CURRENT CONTROLFILE TO ‘/oracle/tempdb/andy’;
- Backup the whole db and pfile/spfile/control file
- 11gR1 parameters are similar to 11gR2
- We done need to modify the parameters in our scenario but may vary on your database, best thing is to refer pre-upgrade report generated earlier
- Set Oracle_HOME to new HOME [ 11gR2 home]
- Set Oracle_BASE
- Set Oracle_SID
- Update the oratab entried according to the database which you are upgrading
- Copy the .profile from user home to a new file and edit the oracle home value
- Go to $ORACLE_HOME/rdbms/admin
- Start the database in upgrade mode
- Run the following: – 40 min
- SQL> set echo on
SQL> SPOOL upgrade.log
SQL> spool off
- SQL> set echo on
- Run the Post-Upgrade Status Tool $ORACLE_HOME/rdbms/admin/utlu112s.sql
- Run utlrp.sql to compile all system objects
- select * from v$version;
- Create the listener entry in the listener.ora
- Start the listener
- Set the listener parameter in the database
- Gather the statistics on the database
- Not gathering statistics can cause performance issues.
- RMAN Catalog
Your rman catalog might be at the lower version, whereas rman catalog have to be at upper version of the database. Hence, upgrade your catalog version.