Executing the pre-upgrade jar tool
The pre-upgrade information tool is available in the new release oracle home, in pathRun the preupgrade tool
/u02/app/oracle/product/12.2.0.1/db_1/jdk/bin/java -jar /u01/app/oracle/product/19c/db_1/rdbms/admin/preupgrade.jar DIR /u02/preupgrade
select name,open_mode,log_mode from v$database;
@preupgrade_fixups.sql
Performing the pre-upgrade actions
Run the preupgrade_fixups.sql
Backing up the database / create a gaurantee restore point
>create restore point before_upgrade_19c guarantee flashback database;
>select name,guarnatee_flashback_database, time from v$restore_point;
Upgrading the database
- sqlplus / as sysdba
- shutdown immediate;
- exit
- copy the spfile, password file and listener from old ORACLE_HOME to new 19c ORACLE_HOME.
cp spfileorcl.ora orapwdprod.ora /u01/app/oracle/product/19c/db_1/dbs
cd $ORACLE_HOME/network/admin
cp listener.ora tnsnames.ora /u01/app/oracle/product/19c/db_1/network/admin
Stop listner running on 12c home and start it from 19c home.
start the database from 19c ORACLE_HOME and start the updgrade.
sqlplus / as sysdba
startup upgrade
select name,open_mode, status from v$database, v$instance;
Run the DB Upgrade utility
cd $ORACLE_HOME
pwd
cd bin
./dbupgrade -n 8
check out and wait for 30 minute
check the upgrade summary log
startup database manually and
select name,open_mode, status from v$database, v$instance;
Execute Post-Upgrade Status Tools, utlusts.sql
- @$ORACLE_HOME/rdbms/admin/utlusts.sql TEXT
- Recompile the INVALID objects using utlrp.sql
@$ORACLE_HOME/rdbms/admin/utlusts.sql TEXT
Performing the post-upgrade actions.
> Connect to sqlplus and run the postupgrade_fixup.sql script
sqlplus / as sysdba
@/u02/preupgrade postupgrade_fixup.sql
>Upgrade the timezone file version
sqlplus / as sysdba
select version from v$timezone_file;
@ORACLE_HOME/rdbms/admin/utltz_countstats.sql
@ORACLE_HOME/rdbms/admin/utltz_countstar.sql
@ORACLE_HOME/rdbms/admin/utltz_upg_check.sql
@ORACLE_HOME/rdbms/admin/utltz_upg_apply.sql
select version from v$timezone_file;
Performing the post-upgrade actions.
>Gather statistics on fixed objects
>connect to sqlplus as sys user and execute
sql>execute dbms_stats.gather_fixed_objects_stats;
select name from v$restore_point;
drop restore point before_upgrade_19c;
alter sytem set compatible='19.0.0' scope=spfile;
shutdown immediate;
startup;
show parameter compatible;
select name,open_mode, status from v$database, v$instance;
set line 1234 pages 1234
col comments for a30
col action for a15
select * from dba_registry_history;
No comments:
Post a Comment