Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 12c Release 2 (12.2) (Doc ID 2173141.1)
0. Check Compatibility Before Upgrading Oracle Database
1. Environment
PRE-UPGRADE TASKS
2. Backup
3. Run preupgrade script
4. View Preupgrade log
5. Minimum tablespace sizes for upgrade
6. Update INITIALIZATION PARAMETERS
7. Gather DICTIONARY STATS
8. Purge Recyclebin
9. Refresh MVs
10. Run preupgrade_fixups.sql
11. Verify archive log dest size
12. Stop LISTENER
13. Create Flashback Guaranteed Restore Point
UPGRADE TASK
14. Shutdown Database
15. Copy init and password files from one version to new version
16. Startup DB in Upgrade mode
17. Run dbupgrade
18. Starup DB from New Oracle Home
POST-UPGRADE TASKS
19. Run catcon.pl to start utlrp.sql
20. Run postupgrade_fixups.sql
21. Upgrade Timezone
22. Run utlusts.sql
23. Run catuppst.sql
24. Re-Run postupgrade_fixups.sql
25. Reverify INVALID OBJECTS
26. Drop Restore point
27. Set COMPATIBALE parameter value
28. Verify DBA_REGISTRY
29. Add TNS Entries in 19c TNS home
30. Password File – orapwCID
31. Edit oratab
32. Back Up the Database
===================================================
1) Run the preupgrade tool
Preupgrade tool is available under new $ORACLE_HOME/rdbms/admin.
ls -ltr /oracle/app/oracle/product/12.2.0.1/dbhome-1/rdbms/admin/preupgrade.jar
$OLD_ORACLE_HOME/jdk/bin/java -jar $NEW_ORACLE_HOME/rdbms/admin/preupgrade.jar -FILE DIR $OS_DIRECTORY
Preupgrade generated files:
/export/home/oracle/UPG122/preupgrade.log
/export/home/oracle/UPG122/preupgrade_fixups.sql
/export/home/oracle/UPG122/postupgrade_fixups.sql
Run :- SQL> @/export/home/oracle/UPG122/preupgrade_fixups.sql
2) stop the listener and shutdown the database
3) Set environment variables to NEW ORACLE_HOME(12.2)
SQL> startup UPGRADE
Update Timezone
Download DBMS_DST_scriptsV1.9.zip from Oracle Support 1585343.1 Scripts to automatically update the RDBMS DST (timezone) version in an 11gR2 or 12c database . (Doc ID 1585343.1) [oracle@rac1 DBMS_DST_scriptsV1.9]$ pwd /home/oracle/TZ/DBMS_DST_scriptsV1.9 [oracle@rac1 DBMS_DST_scriptsV1.9]$ ls -ltr total 68 -rw-r--r--. 1 oracle dba 31010 Aug 22 2014 upg_tzv_check.sql -rw-r--r--. 1 oracle dba 19502 Aug 22 2014 upg_tzv_apply.sql -rw-r--r--. 1 oracle dba 6294 Jan 8 2015 countstarTSTZ.sql -rw-r--r--. 1 oracle dba 7213 Mar 17 18:30 countstatsTSTZ.sql [oracle@rac1 DBMS_DST_scriptsV1.9]$ [oracle@rac1 DBMS_DST_scriptsV1.9]$ which sqlplus /u01/app/oracle/product/12.2.0.1/bin/sqlplus [oracle@rac1 DBMS_DST_scriptsV1.9]$ [oracle@rac1 DBMS_DST_scriptsV1.9]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Sun Sep 16 00:54:44 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> @upg_tzv_check.sql INFO: Starting with RDBMS DST update preparation. INFO: NO actual RDBMS DST update will be done by this script. INFO: If an ERROR occurs the script will EXIT sqlplus. INFO: Doing checks for known issues ... INFO: Database version is 12.2.0.1 . INFO: Database RDBMS DST version is DSTv14 . INFO: No known issues detected. INFO: Now detecting new RDBMS DST version. A prepare window has been successfully started. INFO: Newest RDBMS DST version detected is DSTv26 . INFO: Next step is checking all TSTZ data. INFO: It might take a while before any further output is seen ... A prepare window has been successfully ended. INFO: A newer RDBMS DST version than the one currently used is found. INFO: Note that NO DST update was yet done. INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update. INFO: Note that the upg_tzv_apply.sql script will INFO: restart the database 2 times WITHOUT any confirmation or prompt. SQL> SQL> SELECT version FROM v$timezone_file; VERSION ---------- 18 <---- 1 row selected. SQL> @upg_tzv_apply.sql INFO: If an ERROR occurs the script will EXIT sqlplus. INFO: The database RDBMS DST version will be updated to DSTv26 . WARNING: This script will restart the database 2 times WARNING: WITHOUT asking ANY confirmation. WARNING: Hit control-c NOW if this is not intended. INFO: Restarting the database in UPGRADE mode to start the DST upgrade. Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 1660944384 bytes Fixed Size 8621376 bytes Variable Size 1157628608 bytes Database Buffers 486539264 bytes Redo Buffers 8155136 bytes Database mounted. Database opened. INFO: Starting the RDBMS DST upgrade. INFO: Upgrading all SYS owned TSTZ data. INFO: It might take time before any further output is seen ... An upgrade window has been successfully started. INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data. Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 1660944384 bytes Fixed Size 8621376 bytes Variable Size 1056965312 bytes Database Buffers 587202560 bytes Redo Buffers 8155136 bytes Database mounted. Database opened. INFO: Upgrading all non-SYS TSTZ data. INFO: It might take time before any further output is seen ... INFO: Do NOT start any application yet that uses TSTZ data! INFO: Next is a list of all upgraded tables: Table list: "IX"."AQ$_ORDERS_QUEUETABLE_L" Number of failures: 0 Table list: "IX"."AQ$_ORDERS_QUEUETABLE_S" Number of failures: 0 Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_L" Number of failures: 0 Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_S" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S" Number of failures: 0 Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES" Number of failures: 0 Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES2" Number of failures: 0 Table list: "APEX_050000"."WWV_FLOW_FEEDBACK" Number of failures: 0 Table list: "APEX_050000"."WWV_FLOW_FEEDBACK_FOLLOWUP" Number of failures: 0 Table list: "APEX_050000"."WWV_FLOW_WORKSHEET_NOTIFY" Number of failures: 0 INFO: Total failures during update of TSTZ data: 0 . An upgrade window has been successfully ended. INFO: Your new Server RDBMS DST version is DSTv26 . INFO: The RDBMS DST update is successfully finished. INFO: Make sure to exit this sqlplus session. INFO: Do not use it for timezone related selects. SQL> SQL> SELECT version FROM v$timezone_file; VERSION ---------- 26 <---- 1 row selected. SQL>
No comments:
Post a Comment