You are on page 1of 11

Upgrade 12c Database to 19c

21/02/2020

Steve McDonald

Version 1.4

Revised

11/01/2022 by Steve McDonald

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 1
Contents
Contents............................................................................................................................................2
Upgrade 12c IBMS Database to 19c......................................................................................................3

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 2
Upgrade 12c IBMS Database to 19c
Prerequisites
Shutdown task server / workflows / ibms jobs

Make SBACTUALS Job inactive (reactivate it after IBMS Upgrade)

REMOVE ANY EXISTING 19C INIT OR SPFILES FOR DATABASE IF THEY EXIST AS IT BREAKS
THE UPGRADE.

Remove Case Sensitive Logon line from the init ora file.
Export the spfile to the initfile:

$ cd /u01/app/oracle/product/12.2.0.1/ee_1/dbs/

$ sqlplus / as sysdba

SQL> create pfile='init<TARGET>.ora' from spfile;

Shut down the database

SQL> shutdown immediate;

Remove the spfile

$ rm spfile<TARGET>.ora

Remove the following line from init file and start the database:

Edit: init<TARGET>.ora

*.sec_case_sensitive_logon=FALSE

Start up the Database

SQL> startup;

Export the initfile to the spfile.

SQL> create spfile='spfile<TARGET>.ora' from pfile;

Run preupgrade jar

$ .oraenv to the original 12c home and run from the 19.0.0.0 home

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 3
$ java -jar /u01/app/oracle/product/19.0.0.0/ee_1/rdbms/admin/preupgrade.jar TERMINAL TEXT

Run the pre upgrade fixes (Maybe not needed when using GUI)
@/u01/app/oracle/cfgtoollogs/IBMSUAT3/preupgrade/preupgrade_fixups.sql

Gather Dictionary Statistics, Purge Recycle Bin & Compile all Invalid Objects
Ensure the Database is started.

$ sqlplus / as sysdba
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
SQL> PURGE DBA_RECYCLEBIN;
SQL> @?/rdbms/admin/utlrp.sql;

Installation

As Oracle ensure the Database is started and run the Database Upgrade Assistant from a GUI via iLO.

$ . oraenv

$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/ee_1
$ export PATH=$ORACLE_HOME/bin:$PATH
$ dbua

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 4
Choose the Database to be upgraded and Click “Next”

Click “Next” (Read the warnings, get educated then click “Next”)

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 5
Click “Yes”

Click “Next”

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 6
Choose “I have my own backup and restore strategy” and then click “Next”

Click “Next”

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 7
Click “Next”

Click “Finish”

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 8
Click “Close”

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 9
Post Upgrade Steps
 Check the /etc/oratab file to ensure it is now using Oracle19c and NOT 12c
 cd to 19.0.0.0 version of dbs directory
 . oraenv <database>
 sqlplus / as sysdba
 ensure sqlplus is 19.0.0.0 and the Version is 19.x.x.x
 Create pfile=’init<TARGET>.ora’ from spfile;
 Shutdown the Upgraded Database
 Add this line back to the pfile
*.sec_case_sensitive_logon=FALSE
 Remove this line in the pfile
*._fix_control='9185228:0'
 Add / modify the following lines to help with performance in 19c
*._fix_control='27500916:0'
*.event = '10946 trace name context forever, level 65536'
*.compatible='19.0.0'
*.open_cursors=1500
*.optimizer_adaptive_plans=FALSE
*.optimizer_adaptive_statistics=FALSE
*.optimizer_index_cost_adj=25
*.optimizer_features_enable='19.1.0'
*.processes=1500
*.temp_undo_enabled=TRUE
*.pga_aggregate_limit=0
 Copy the tnsnames.ora into the version 19 admin path
 Remove the spfile
 Startup database
 Create spfile=’spfile<TARGET>.ora’ from pfile;
 GRANT INHERIT PRIVILEGES ON USER SYS TO PILATDBA;
 GRANT INHERIT PRIVILEGES ON USER SYS TO IBMS;
 grant select on SYS.DBA_SCHEDULER_RUNNING_JOBS to IBMS with grant option;

@?/rdbms/admin/execemx emx
 Restart the Database

Execute the below using PILATDBA user.



BEGIN
privs.dev('C');
compile_all;
init_ibms_table_column;
PILATDBA.refresh_ibms_procedure_args;
COMMIT;
END;

 Refresh Data Dictionary – (Takes around 74 - 113 minutes)


Run “Refresh Data Dictionary (2).sql” as pilatdba

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 10
DEMO_PRED_SUMMARY Statistics
 Run the following as pilatdba

begin
DBMS_STATS.unlock_table_stats('RATINGS', 'DEMO_PRED_SUMMARY');
DBMS_STATS.gather_schema_stats(ownname => 'RATINGS');
DBMS_STATS.lock_table_stats('RATINGS', 'DEMO_PRED_SUMMARY');
end;

Execute the below using SYS user.

 EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
 EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
 EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=>'XDB',tabname=>'XDB$RESOURCE',estimate_percent=>NULL);
 This next stats takes AGES
EXEC dbms_stats.gather_database_stats(DBMS_STATS.AUTO_SAMPLE_SIZE,degree=>8,cascade=>true);

 Restart the Database


 Start the task server / workflows / ibms jobs

Enterprise Manager Database Express


This will show the open em port which is set by default during install

SQL> select dbms_xdb_config.gethttpsport() from dual;

To change the port

SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);

Prime Television Upgrade 12c Database to 19c Document Revision 1.4


Page | 11

You might also like