Gavinsoorma.com.au



Upgrade Oracle 12c non-CDB to Oracle 19c CDBPrepare for Oracle 19c upgradeoracle@db21:~$ sqlplus sys as sysdbaConnected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionGather Dictonary Statistics SQL> exec dbms_stats.gather_dictionary_stats;PL/SQL procedure successfully completed.Gather Fixed Objects Statistics SQL> exec dbms_stats.gather_fixed_objects_stats;PL/SQL procedure successfully completed.Purge the Recycle BinSQL> purge dba_recyclebin;DBA Recyclebin purged.Check any SYS or SYSTEM owned INVALID objects SQL>select object_name,object_type from dba_objects where owner in ('SYS','SYSTEM') and status='INVALID';no rows selectedMake a note of current INVALID objects SQL> create table system.invalid_objects as select owner,object_name,object_type from dba_objects where status='INVALID';Table created.SQL> select count(*) from system.invalid_objects; COUNT(*)---------- 475Create a Flashback Database Restore Point SQL> create restore point before_upgrade guarantee flashback database;Restore point created.Run preupgrade.jar oracle@db21:~$ cd /d_admin/dba/scripts/oracle@db21:/d_admin/dba/scripts$ cp /opt/oracle/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar .oracle@db21:/d_admin/dba/scripts$ $ORACLE_HOME/jdk/bin/java -jar preupgrade.jar==================PREUPGRADE SUMMARY================== /opt/oracle/cfgtoollogs/DGPDEVL/preupgrade/preupgrade.log /opt/oracle/cfgtoollogs/DGPDEVL/preupgrade/preupgrade_fixups.sql /opt/oracle/cfgtoollogs/DGPDEVL/preupgrade/postupgrade_fixups.sqlExecute fixup scripts as indicated below:Before upgrade:Log into the database and execute the preupgrade fixups@/opt/oracle/cfgtoollogs/DGPDEVL/preupgrade/preupgrade_fixups.sqlAfter the upgrade:Log into the database and execute the postupgrade fixups@/opt/oracle/cfgtoollogs/DGPDEVL/preupgrade/postupgrade_fixups.sqlPreupgrade complete: 2020-05-21T09:55:45Executing Oracle PRE-Upgrade Fixup ScriptAuto-Generated by: Oracle Preupgrade Script Version: 19.0.0.0.0 Build: 1Generated on: 2020-05-21 09:55:40For Source Database: DGPDEVLSource Database Version: 12.2.0.1.0For Upgrade to Version: 19.0.0.0.0Preup PreupgradeAction Issue IsNumber Preupgrade Check Name Remedied Further DBA Action------ ------------------------ ---------- -------------------------------- 1. invalid_objects_exist NO Manual fixup recommended. 2. sync_standby_db NO Informational only. Further action is optional. 3. rman_recovery_version NO Informational only. Further action is optional.The fixup scripts have been run and resolved what they can. However,there are still issues originally identified by the preupgrade thathave not been remedied and are still present in the database.Depending on the severity of the specific issue, and the nature ofthe issue itself, that could mean that your database is not readyfor upgrade. To resolve the outstanding issues, start by reviewingthe preupgrade_fixups.sql and searching it for the name ofthe failed CHECK NAME or Preupgrade Action Number listed above.There you will find the original corresponding diagnostic messagefrom the preupgrade which explains in more detail what still needsto be done.Perform Oracle 19c upgradeExecute DBUA (Database Upgrade Assistant)Monitor Upgrade Logs Post-Upgrade Check the current state of the Oracle Data Dictionaryspool regInvalid.txtcolumn comp_id format A15column comp_name format A30column version format A10set echo on-- query registryset lines 132 pages 100select substr(comp_id,1,15) comp_id, substr(comp_name,1,30) comp_name, substr(version,1,10) version, statusfrom dba_registryorder by modified/COMP_ID COMP_NAME VERSION STATUS--------------- ------------------------------ ---------- -----------RAC Oracle Real Application Cluste 19.0.0.0.0 OPTION OFFCATALOG Oracle Database Catalog Views 19.0.0.0.0 VALIDCATPROC Oracle Database Packages and T 19.0.0.0.0 VALIDXDB Oracle XML Database 19.0.0.0.0 VALIDOWM Oracle Workspace Manager 19.0.0.0.0 VALIDJAVAVM JServer JAVA Virtual Machine 19.0.0.0.0 VALIDXML Oracle XDK 19.0.0.0.0 VALIDCATJAVA Oracle Database Java Packages 19.0.0.0.0 VALIDCONTEXT Oracle Text 19.0.0.0.0 VALIDORDIM Oracle Multimedia 19.0.0.0.0 VALIDAPS OLAP Analytic Workspace 19.0.0.0.0 VALIDSDO Spatial 19.0.0.0.0 VALIDXOQ Oracle OLAP API 19.0.0.0.0 VALIDOLS Oracle Label Security 19.0.0.0.0 VALIDDV Oracle Database Vault 19.0.0.0.0 VALIDows selected.Application System TestingOnce the database has been upgraded to the satisfaction of the DBA, further testing by users and or developers is required.Check/Set Initialization parameter : COMPATIBLESet the COMPATIBLE initialization parameter to an appropriate value. Oracle recommends increasing the COMPATIBLE parameter only after complete testing of the upgraded database has been performed.After you increase the COMPATIBLE parameter, the database cannot subsequently be downgraded to releases earlier than what is set for compatibility.Convert Oracle 19c Non-CDB to PDB Execute DBMS_PDB.DESCRIBEoracle@db21:/opt/oracle/product/19.0.0/dbhome_1/network/admin$ sqlplus sys as sysdbaConnected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.6.0.0.0SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startup mount;ORACLE instance started.Total System Global Area 2147478488 bytesFixed Size 8874968 bytesVariable Size 1258291200 bytesDatabase Buffers 872415232 bytesRedo Buffers 7897088 bytesDatabase mounted.SQL> alter database open read only;Database altered.SQL> exec DBMS_PDB.DESCRIBE ('/export/home/oracle/dgpdevl.xml');PL/SQL procedure successfully completed.SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.Plug in the database to existing Oracle 19c CDB SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NOSQL> create pluggable database dgpdevl using '/export/home/oracle/dgpdevl.xml' nocopy tempfile reuse;Pluggable database created.SQL> show pdbsCON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 DGPDEVL MOUNTEDSQL> alter pluggable database open;Pluggable database altered.Execute noncdb_to_pdb.sql script SQL> alter session set container=DGPDEVL;Session altered.SQL> @?/rdbms/admin/noncdb_to_pdb.sql….….13:47:57 SQL> set tab OFF13:47:57 SQL> set termout ON13:47:57 SQL> set time OFFSQL> set timing OFFSQL> set trimout ONSQL> set trimspool ONSQL> set underline "-"SQL> set verify OFFSQL> set wrap ONSQL> set xmloptimizationcheck OFFVerify PDB plug-in operation via PDB_PLUG_IN_VIOLATIONSSQL> select con_id, type, message, status from PDB_PLUG_IN_VIOLATIONS where status <>'RESOLVED' order by time; CON_ID TYPE MESSAGE STATUS---------- --------- ---------------------------------------------------------------------------------------------------- --------- 4 WARNING Character set mismatch: PDB character set US7ASCII. CDB character set AL32UTF8. PENDING 4 WARNING Database option APS mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option CATJAVA mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option CONTEXT mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option DV mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option JAVAVM mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option OLS mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option ORDIM mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option OWM mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option SDO mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option XML mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDING 4 WARNING Database option XOQ mismatch: PDB installed version NULL. CDB installed version 19.0.0.0.0. PENDINGVerify PDB is open in READ WRITE mode SQL> conn / as sysdbaConnected.SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3DGPDEVL READ WRITE NO ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download