当前位置:   article > 正文

Oracle Database 11.2.0.4升级到 12.2.0.1_database time zone version is 26. it is older than

database time zone version is 26. it is older than current release time zone

参考MOS :
手动升级到 Non-CDB Oracle Database 12c Release 2(12.2)的完整核对清单 (Doc ID 2297983.1)
Updating the RDBMS DST version in 12c Release 1 (12.1.0.1 and up) using DBMS_DST (Doc ID 1509653.1)
Scripts to update the RDBMS DST (timezone) version in an 11gR2 or 12c database . (Doc ID 1585343.1)
"CATPROC.SQL" EXECUTION HANGS IF DATABASE HAS JOBS RUNNING (Doc ID 1077852.6)
Oracle 12.2.0.1 Installation Fails With "PRVG-0449 : Proper soft limit for maximum stack size was not found on node "node1" [Expected >= "10240" ; Found = "8192"]" (Doc ID 2287806.1)

 

OS :radhat7.6
RDBMS: 11.2.0.4 ---> 12.2.0.1

步骤:
1 安装12.2.0.1的Sofeware,安装目录/u01/app/oracle/product/12.2.0/dbhome_1。其中11.2.0.4的目录是/u01/app/oracle/product/11.2.0/dbhome_1
2 执行dbupgdiag.sql(可以从 note 556610.1 下载这个脚本).主要是确认是否有失效对象或组件。
3 清空回收站  
4 检查物化视图是否刷新完毕 。
5 收集统计信息 ,目的是为了减少停机时间。
6 检查时区设置 。
7 检查是否存在备份 。
8 升级前先解决Outstanding分布式事务 。
9 Preupgrade 检查 。
10 进行升级
11 升级后步骤(环境变量,oratab文件更新,升级catalog,post-upgrade fixup脚本等等)

详细步骤
1  安装software,略。在安装的时候,提示错误,参考上面的MOS Doc ID 2287806.1解决。

2  执行dbupgdiag.sql

  1. sql> alter session set nls_language='American';
  2. sql> @dbupgdiag.sql
  3. sql> exit

--- 上面步骤过程 -

  1. [oracle@wls10306-02 12.2.0]$ cd dbhome_1/rdbms/admin/
  2. [oracle@wls10306-02 admin]$ ll dbup*
  3. -rw-r--r-- 1 oracle oinstall 24633 Jan 16 16:14 dbupgdiag.sql
  4. [oracle@wls10306-02 admin]$ sqlplus /nolog
  5. SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 16 16:14:52 2020
  6. Copyright (c) 1982, 2013, Oracle. All rights reserved.
  7. SQL> conn / as sysdba
  8. Connected.
  9. SQL> alter session set nls_language='American';
  10. Session altered.
  11. SQL> @dbupgdiag.sql
  12. Enter location for Spooled output:
  13. Enter value for 1: /tmp
  14. 16_Jan_2020_0415 .log
  15. test_
  16. *** Start of LogFile ***
  17. Oracle Database Upgrade Diagnostic Utility 01-16-2020 16:15:40
  18. ===============
  19. Hostname
  20. ===============
  21. wls10306-02
  22. ===============
  23. Database Name
  24. ===============
  25. TEST
  26. ===============
  27. Database Uptime
  28. ===============
  29. 16:08 16-JAN-20
  30. =================
  31. Database Wordsize
  32. =================
  33. This is a 64-bit database
  34. ================
  35. Software Version
  36. ================
  37. Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  38. PL/SQL Release 11.2.0.4.0 - Production
  39. CORE 11.2.0.4.0 Production
  40. TNS for Linux: Version 11.2.0.4.0 - Production
  41. NLSRTL Version 11.2.0.4.0 - Production
  42. =============
  43. Compatibility
  44. =============
  45. Compatibility is set as 11.2.0.4.0
  46. ================
  47. Archive Log Mode
  48. ================
  49. Database log mode No Archive Mode
  50. Automatic archival Disabled
  51. Archive destination USE_DB_RECOVERY_FILE_DEST
  52. Oldest online log sequence 7
  53. Current log sequence 9
  54. ================
  55. Auditing Check
  56. ================
  57. NAME TYPE VALUE
  58. ------------------------------------ ----------- ------------------------------
  59. audit_file_dest string /u01/app/oracle/admin/test/adu
  60. mp
  61. audit_sys_operations boolean FALSE
  62. audit_syslog_level string
  63. audit_trail string DB
  64. ================
  65. Cluster Check
  66. ================
  67. NAME TYPE VALUE
  68. ------------------------------------ ----------- ------------------------------
  69. cluster_database boolean FALSE
  70. cluster_database_instances integer 1
  71. DOC>################################################################
  72. DOC>
  73. DOC> If CLUSTER_DATABASE is set to TRUE, change it to FALSE before
  74. DOC> upgrading the database
  75. DOC>
  76. DOC>################################################################
  77. DOC>#
  78. ===========================================
  79. Tablespace and the owner of the aud$ table ( IF Oracle Label Security and Oracle Database Vault are installed then aud$ will be in SYSTEM.AUD$)
  80. ===========================================
  81. OWNER TABLESPACE_NAME
  82. ------------ ------------------------------
  83. SYS SYSTEM
  84. ============================================================================
  85. count of records in the sys.aud$ table where dbid is null- Standard Auditing
  86. ============================================================================
  87. 0
  88. ============================================================================================
  89. count of records in the system.aud$ when dbid is null, Std Auditing with OLS or DV installed
  90. ============================================================================================
  91. select count(*) from system.aud$ where dbid is null
  92. *
  93. ERROR at line 1:
  94. ORA-00942: table or view does not exist
  95. =============================================================================
  96. count of records in the sys.fga_log$ when dbid is null, Fine Grained Auditing
  97. =============================================================================
  98. 0
  99. ==========================================
  100. Oracle Label Security is installed or not
  101. ==========================================
  102. Oracle Label Security is NOT installed at database level
  103. ================
  104. Number of AQ Records in Message Queue Tables
  105. ================
  106. SYS - ALERT_QT - 11
  107. SYS - AQ$_MEM_MC - 0
  108. SYS - AQ_EVENT_TABLE - 0
  109. SYS - AQ_PROP_TABLE - 0
  110. SYS - KUPC$DATAPUMP_QUETAB - 0
  111. SYS - KUPC$DATAPUMP_QUETAB_1 - 0
  112. SYS - SCHEDULER$_EVENT_QTAB - 0
  113. SYS - SCHEDULER$_REMDB_JOBQTAB - 0
  114. SYS - SCHEDULER_FILEWATCHER_QT - 0
  115. SYS - SYS$SERVICE_METRICS_TAB - 0
  116. SYSMAN - MGMT_LOADER_QTABLE - 0
  117. SYSMAN - MGMT_NOTIFY_INPUT_QTABLE - 0
  118. SYSMAN - MGMT_NOTIFY_QTABLE - 0
  119. SYSMAN - MGMT_PAF_MSG_QTABLE_1 - 0
  120. SYSMAN - MGMT_PAF_MSG_QTABLE_2 - 0
  121. SYSMAN - MGMT_TASK_QTABLE - 28
  122. SYSTEM - DEF$_AQCALL - 0
  123. SYSTEM - DEF$_AQERROR - 0
  124. WMSYS - WM$EVENT_QUEUE_TABLE - 0
  125. ================
  126. Time Zone version
  127. ================
  128. 14
  129. ================
  130. Local Listener
  131. ================
  132. ================
  133. Default and Temporary Tablespaces By User
  134. ================
  135. USERNAME TEMPORARY_TABLESPACE DEFAULT_TABLESPACE
  136. ---------------------------- ---------------------- ----------------------
  137. MGMT_VIEW TEMP SYSTEM
  138. SYS TEMP SYSTEM
  139. SYSTEM TEMP SYSTEM
  140. DBSNMP TEMP SYSAUX
  141. SYSMAN TEMP SYSAUX
  142. WEBLOGIC TEMP USERS
  143. APPS TEMP USERS
  144. OUTLN TEMP SYSTEM
  145. FLOWS_FILES TEMP SYSAUX
  146. MDSYS TEMP SYSAUX
  147. ORDSYS TEMP SYSAUX
  148. EXFSYS TEMP SYSAUX
  149. WMSYS TEMP SYSAUX
  150. APPQOSSYS TEMP SYSAUX
  151. APEX_030200 TEMP SYSAUX
  152. OWBSYS_AUDIT TEMP SYSAUX
  153. ORDDATA TEMP SYSAUX
  154. CTXSYS TEMP SYSAUX
  155. ANONYMOUS TEMP SYSAUX
  156. XDB TEMP SYSAUX
  157. ORDPLUGINS TEMP SYSAUX
  158. OWBSYS TEMP SYSAUX
  159. SI_INFORMTN_SCHEMA TEMP SYSAUX
  160. OLAPSYS TEMP SYSAUX
  161. SCOTT TEMP USERS
  162. ORACLE_OCM TEMP USERS
  163. XS$NULL TEMP USERS
  164. BI TEMP USERS
  165. PM TEMP USERS
  166. MDDATA TEMP USERS
  167. IX TEMP USERS
  168. SH TEMP USERS
  169. DIP TEMP USERS
  170. OE TEMP USERS
  171. APEX_PUBLIC_USER TEMP USERS
  172. HR TEMP USERS
  173. SPATIAL_CSW_ADMIN_USR TEMP USERS
  174. SPATIAL_WFS_ADMIN_USR TEMP USERS
  175. ================
  176. Component Status
  177. ================
  178. Comp ID Component Status Version Org_Version Prv_Version
  179. ------- ---------------------------------- --------- -------------- -------------- --------------
  180. AMD OLAP Catalog VALID 11.2.0.4.0
  181. APEX Oracle Application Express VALID 3.2.1.00.12
  182. APS OLAP Analytic Workspace VALID 11.2.0.4.0
  183. CATALOG Oracle Database Catalog Views VALID 11.2.0.4.0
  184. CATJAVA Oracle Database Java Packages VALID 11.2.0.4.0
  185. CATPROC Oracle Database Packages and Types VALID 11.2.0.4.0
  186. CONTEXT Oracle Text VALID 11.2.0.4.0
  187. EM Oracle Enterprise Manager VALID 11.2.0.4.0
  188. EXF Oracle Expression Filter VALID 11.2.0.4.0
  189. JAVAVM JServer JAVA Virtual Machine VALID 11.2.0.4.0
  190. ORDIM Oracle Multimedia VALID 11.2.0.4.0
  191. OWB OWB VALID 11.2.0.4.0
  192. OWM Oracle Workspace Manager VALID 11.2.0.4.0
  193. RUL Oracle Rules Manager VALID 11.2.0.4.0
  194. SDO Spatial VALID 11.2.0.4.0
  195. XDB Oracle XML Database VALID 11.2.0.4.0
  196. XML Oracle XDK VALID 11.2.0.4.0
  197. XOQ Oracle OLAP API VALID 11.2.0.4.0
  198. ======================================================
  199. List of Invalid Database Objects Owned by SYS / SYSTEM
  200. ======================================================
  201. Number of Invalid Objects
  202. ------------------------------------------------------------------
  203. There are no Invalid Objects
  204. DOC>################################################################
  205. DOC>
  206. DOC> If there are no Invalid objects below will result in zero rows.
  207. DOC>
  208. DOC>################################################################
  209. DOC>#
  210. no rows selected
  211. ================================
  212. List of Invalid Database Objects
  213. ================================
  214. Number of Invalid Objects
  215. ------------------------------------------------------------------
  216. There are no Invalid Objects
  217. DOC>################################################################
  218. DOC>
  219. DOC> If there are no Invalid objects below will result in zero rows.
  220. DOC>
  221. DOC>################################################################
  222. DOC>#
  223. no rows selected
  224. ======================================================
  225. Count of Invalids by Schema
  226. ======================================================
  227. ==============================================================
  228. Identifying whether a database was created as 32-bit or 64-bit
  229. ==============================================================
  230. DOC>###########################################################################
  231. DOC>
  232. DOC> Result referencing the string 'B023' ==> Database was created as 32-bit
  233. DOC> Result referencing the string 'B047' ==> Database was created as 64-bit
  234. DOC> When String results in 'B023' and when upgrading database to 10.2.0.3.0
  235. DOC> (64-bit) , For known issue refer below articles
  236. DOC>
  237. DOC> Note 412271.1 ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While
  238. DOC> Upgrading Or Patching Databases To 10.2.0.3
  239. DOC> Note 579523.1 ORA-600 [22635], ORA-600 [KOKEIIX1], ORA-7445 [KOPESIZ] and
  240. DOC> OCI-21500 [KOXSIHREAD1] Reported While Upgrading To 11.1.0.6
  241. DOC>
  242. DOC>###########################################################################
  243. DOC>#
  244. Metadata Initial DB Creation Info
  245. -------- -----------------------------------
  246. B047 Database was created as 64-bit
  247. ===================================================
  248. Number of Duplicate Objects Owned by SYS and SYSTEM
  249. ===================================================
  250. Counting duplicate objects ....
  251. COUNT(1)
  252. ----------
  253. 0
  254. =========================================
  255. Duplicate Objects Owned by SYS and SYSTEM
  256. =========================================
  257. Querying duplicate objects ....
  258. DOC>
  259. DOC>################################################################################
  260. DOC>Below are expected and required duplicates objects and OMITTED in the report .
  261. DOC>
  262. DOC>Without replication installed:
  263. DOC>INDEX AQ$_SCHEDULES_PRIMARY
  264. DOC>TABLE AQ$_SCHEDULES
  265. DOC>
  266. DOC>If replication is installed by running catrep.sql:
  267. DOC>INDEX AQ$_SCHEDULES_PRIMARY
  268. DOC>PACKAGE DBMS_REPCAT_AUTH
  269. DOC>PACKAGE BODY DBMS_REPCAT_AUTH
  270. DOC>TABLE AQ$_SCHEDULES
  271. DOC>
  272. DOC>If any objects found please follow below article.
  273. DOC>Note 1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM schema
  274. DOC>Read the Exceptions carefully before taking actions.
  275. DOC>
  276. DOC>################################################################################
  277. DOC>#
  278. ========================
  279. Password protected roles
  280. ========================
  281. DOC>
  282. DOC>################################################################################
  283. DOC>
  284. DOC> In version 11.2 password protected roles are no longer enabled by default so if
  285. DOC> an application relies on such roles being enabled by default and no action is
  286. DOC> performed to allow the user to enter the password with the set role command, it
  287. DOC> is recommended to remove the password from those roles (to allow for existing
  288. DOC> privileges to remain available). For more information see:
  289. DOC>
  290. DOC> Note 745407.1 : What Roles Can Be Set as Default for a User?
  291. DOC>
  292. DOC>################################################################################
  293. DOC>#
  294. Querying for password protected roles ....
  295. Password protected Role Assigned by default to user
  296. ------------------------------ ------------------------------
  297. OWB$CLIENT OWBSYS
  298. ================
  299. JVM Verification
  300. ================
  301. ================================================
  302. Checking Existence of Java-Based Users and Roles
  303. ================================================
  304. DOC>
  305. DOC>################################################################################
  306. DOC>
  307. DOC> There should not be any Java Based users for database version 9.0.1 and above.
  308. DOC> If any users found, it is faulty JVM.
  309. DOC>
  310. DOC>################################################################################
  311. DOC>#
  312. User Existence
  313. ---------------------------
  314. No Java Based Users
  315. DOC>
  316. DOC>###############################################################
  317. DOC>
  318. DOC> Healthy JVM Should contain Six Roles. For 12.2 Seven Roles
  319. DOC> If there are more or less than six role, JVM is inconsistent.
  320. DOC>
  321. DOC>###############################################################
  322. DOC>#
  323. Role
  324. ------------------------------
  325. There are 6 JAVA related roles
  326. Roles
  327. ROLE
  328. ------------------------------
  329. JAVA_DEPLOY
  330. JAVAUSERPRIV
  331. JAVAIDPRIV
  332. JAVASYSPRIV
  333. JAVADEBUGPRIV
  334. JAVA_ADMIN
  335. =========================================
  336. List of Invalid Java Objects owned by SYS
  337. =========================================
  338. There are no SYS owned invalid JAVA objects
  339. DOC>
  340. DOC>#################################################################
  341. DOC>
  342. DOC> Check the status of the main JVM interface packages DBMS_JAVA
  343. DOC> and INITJVMAUX and make sure it is VALID.
  344. DOC>
  345. DOC> If there are no Invalid objects below will result in zero rows.
  346. DOC>
  347. DOC>#################################################################
  348. DOC>#
  349. no rows selected
  350. DOC>
  351. DOC>#################################################################
  352. DOC>
  353. DOC> If the JAVAVM component is not installed in the database (for
  354. DOC> example, after creating the database with custom scripts), the
  355. DOC> next query will report the following error:
  356. DOC>
  357. DOC> select dbms_java.longname('foo') "JAVAVM TESTING" from dual
  358. DOC> *
  359. DOC> ERROR at line 1:
  360. DOC> ORA-00904: "DBMS_JAVA"."LONGNAME": invalid identifier
  361. DOC>
  362. DOC> If the JAVAVM component is installed, the query should succeed
  363. DOC> with 'foo' as result.
  364. DOC>
  365. DOC>#################################################################
  366. DOC>#
  367. JAVAVM TESTING
  368. ---------------
  369. foo
  370. ===================================
  371. Oracle Multimedia/InterMedia status
  372. ===================================
  373. .
  374. Oracle Multimedia/interMedia is installed and listed with the following version: 11.2.0.4.0 and status: VALID
  375. .
  376. Checking for installed Database Schemas...
  377. ORDSYS user exists.
  378. ORDPLUGINS user exists.
  379. MDSYS user exists.
  380. SI_INFORMTN_SCHEMA user exists.
  381. ORDDATA user exists.
  382. .
  383. Checking for Prerequisite Components...
  384. JAVAVM installed and listed as valid
  385. XDK installed and listed as valid
  386. XDB installed and listed as valid
  387. Validating Oracle Multimedia/interMedia...(no output if component status is valid)
  388. PL/SQL procedure successfully completed.
  389. *** End of LogFile ***
  390. Upload db_upg_diag_test_16_Jan_2020_0415.log from "/tmp" directory
  391. SQL>

3 清空回收站 ,略 。
4 检查物化视图是否刷新完毕。

  1. SQL> SELECT o.name FROM sys.obj$ o, sys.user$ u, sys.sum$ s WHERE o.type# = 42 AND bitand(s.mflags, 8) =8;
  2. no rows selected
  3. SQL>

5 收集统计信息

  1. SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
  2. PL/SQL procedure successfully completed.
  3. SQL>

6 检查时区设置

  1. SQL> select * from v$timezone_file;
  2. FILENAME VERSION CON_ID
  3. -------------------- ---------- ----------
  4. timezlrg_14.dat 14 0
  5. SQL>
  6. SQL> col property_name for a30
  7. SQL> SELECT property_name, SUBSTR(property_value, 1, 30) value
  8. FROM database_properties
  9. WHERE property_name LIKE 'DST_%'
  10. ORDER BY property_name; 2 3 4
  11. PROPERTY_NAME VALUE
  12. ------------------------------ ------------------------------------------------------------------------------------------------------------------------
  13. DST_PRIMARY_TT_VERSION 14
  14. DST_SECONDARY_TT_VERSION 0
  15. DST_UPGRADE_STATE NONE
  16. SQL>

7 检查没有文件处于backup mode

  1. SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';
  2. SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';
  3. no rows selected
  4. SQL>

8 检查升级前是否有分布式事务,如果有,执行purge.

  1. SQL> Select * from dba_2pc_pending;
  2. SQL> select local_tran_id FROM dba_2pc_pending;
  3. SQL> execute dbms_transaction.purge_lost_db_entry('');
  4. SQL> commit;

9 检查Preupgrade,在源库执行,会生成一些建议之类的等等。按照建议执行脚本即可,本次测试没有执行这个
$Earlier_release_Oracle_home/jdk/bin/java -jar $New_release_Oracle_home/rdbms/admin/preupgrade.jar FILE TEXT DIR output_dir

10 进行升级
用12c的软件路径启动数据库,启动到upgrade模式 ,在linux命令行下执行dbupgrade命令,该命令调用catctl.pl文件和catupgrd.sql脚本。

  1. CONNECT / AS SYSDBA
  2. SQL> startup upgrade;
  3. SQL> exit
  4. ./dbupgrade

-- 或者执行下面的命令

  1. cd $ORACLE_HOME/rdbms/admin
  2. catctl
  3. or
  4. cd $ORACLE_HOME/rdbms/admin
  5. $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql

-- 在dbupgrade里面有一段如下,可以看出,执行那个perl命令和执行dbupgrade命令效果是一样的,我这里直接执行dbupgrade命令了。

  1. if [[ $# -gt 0 ]]
  2. then
  3. $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib $ORACLE_HOME/rdbms/admin/catctl.pl "$@" $ORACLE_HOME/rdbms/admin/catupgrd.sql
  4. else
  5. $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib $ORACLE_HOME/rdbms/admin/catctl.pl $ORACLE_HOME/rdbms/admin/catupgrd.sql
  6. fi
  7. exit $?

-- 执行过程 ,其中23步这里卡了大约4小时,原因是job_queue_processes参数。设置为0后,立刻通过。(可能和之前没有进行preupgrade脚本执行有关)(之前怀疑是这个脚本运行的时候,以4个并-行来运行导致的,测试机只有1个cpu,现在看应该不是并-行引起的。)

  1. [oracle@wls10306-02 bin]$ ls dbup*
  2. dbupgrade
  3. [oracle@wls10306-02 bin]$ ./dbupgrade
  4. Argument list for [/u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl]
  5. Run in c = 0
  6. Do not run in C = 0
  7. Input Directory d = 0
  8. Echo OFF e = 1
  9. Simulate E = 0
  10. Forced cleanup F = 0
  11. Log Id i = 0
  12. Child Process I = 0
  13. Log Dir l = 0
  14. Priority List Name L = 0
  15. Upgrade Mode active M = 0
  16. SQL Process Count n = 0
  17. SQL PDB Process Count N = 0
  18. Open Mode Normal o = 0
  19. Start Phase p = 0
  20. End Phase P = 0
  21. Reverse Order r = 0
  22. AutoUpgrade Resume R = 0
  23. Script s = 0
  24. Serial Run S = 0
  25. RO User Tablespaces T = 0
  26. Display Phases y = 0
  27. Debug catcon.pm z = 0
  28. Debug catctl.pl Z = 0
  29. catctl.pl VERSION: [12.2.0.1.0]
  30. STATUS: [production]
  31. BUILD: [RDBMS_12.2.0.1.0_LINUX.X64_170125]
  32. Unable to Create [/tmp/cfgtoollogs/upgrade20200116165036]
  33. Defaulting to [/tmp]
  34. /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/12.2.0/dbhome_1]
  35. /u01/app/oracle/product/12.2.0/dbhome_1/bin/orabasehome = [/u01/app/oracle/product/12.2.0/dbhome_1]
  36. catctlGetOrabase = [/u01/app/oracle/product/12.2.0/dbhome_1]
  37. Analyzing file /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catupgrd.sql
  38. Log file directory = [/tmp]
  39. catcon: ALL catcon-related output will be written to [/tmp/catupgrd_catcon_16733.lst]
  40. catcon: See [/tmp/catupgrd*.log] files for output generated by scripts
  41. catcon: See [/tmp/catupgrd_*.lst] files for spool files, if any
  42. Number of Cpus = 1
  43. Database Name = test
  44. DataBase Version = 11.2.0.4.0
  45. catcon: ALL catcon-related output will be written to [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037/catupgrd_catcon_16733.lst]
  46. catcon: See [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037/catupgrd*.log] files for output generated by scripts
  47. catcon: See [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037/catupgrd_*.lst] files for spool files, if any
  48. Log file directory = [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037]
  49. cannot remove directory for /tmp/.X11-unix: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  50. cannot remove directory for /tmp/.XIM-unix: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  51. cannot remove directory for /tmp/.Test-unix: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  52. cannot remove directory for /tmp/.font-unix: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  53. cannot remove directory for /tmp/.ICE-unix: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  54. cannot remove directory for /tmp/hsperfdata_root: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  55. cannot chdir to child for /tmp/vmware-root_6977-3879638603: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  56. cannot chdir to child for /tmp/vmware-root_7058-2856323751: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  57. cannot unlink file for /tmp/cfgtoollogs/upgrade20200116163737/catupgrd_trace.log: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  58. cannot restore permissions to 0100644 for /tmp/cfgtoollogs/upgrade20200116163737/catupgrd_trace.log: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  59. cannot unlink file for /tmp/cfgtoollogs/upgrade20200116163737/catupgrd0.log: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  60. cannot restore permissions to 0100644 for /tmp/cfgtoollogs/upgrade20200116163737/catupgrd0.log: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  61. cannot remove directory for /tmp/cfgtoollogs/upgrade20200116163737: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  62. cannot remove directory for /tmp/cfgtoollogs: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  63. cannot chdir to child for /tmp/wlstTemproot: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  64. cannot remove directory for /tmp/.oracle: 1 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  65. cannot chdir to child for /tmp/vmware-root_9576-3126016563: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  66. cannot chdir to child for /tmp/vmware-root_6997-3853881822: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  67. cannot chdir to child for /tmp/vmware-root_7076-2822900872: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  68. cannot chdir to child for /tmp/vmware-root_7016-2864909219: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  69. cannot chdir to child for /tmp/vmware-root_7060-2856454816: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  70. cannot chdir to child for /tmp/vmware-root_7007-3879114322: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  71. cannot chdir to child for /tmp/vmware-root_7027-3854537185: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  72. cannot chdir to child for /tmp/vmware-root_7045-3887961966: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  73. cannot remove directory for /tmp: 13 at /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/catctl.pl line 3024.
  74. Parallel SQL Process Count = 4
  75. Components in [test]
  76. Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT EM JAVAVM ORDIM OWM SDO XDB XML XOQ]
  77. Not Installed [DV MGW ODM OLS RAC WK]
  78. ------------------------------------------------------
  79. Phases [0-115] Start Time:[2020_01_16 16:50:38]
  80. ------------------------------------------------------
  81. *********** Executing Change Scripts ***********
  82. Serial Phase #:0 [test] Files:1 Time: 181s
  83. *************** Catalog Core SQL ***************
  84. Serial Phase #:1 [test] Files:5 Time: 81s
  85. Restart Phase #:2 [test] Files:1 Time: 1s
  86. *********** Catalog Tables and Views ***********
  87. Parallel Phase #:3 [test] Files:19 Time: 51s
  88. Restart Phase #:4 [test] Files:1 Time: 0s
  89. ************* Catalog Final Scripts ************
  90. Serial Phase #:5 [test] Files:6 Time: 33s
  91. ***************** Catproc Start ****************
  92. Serial Phase #:6 [test] Files:1 Time: 24s
  93. ***************** Catproc Types ****************
  94. Serial Phase #:7 [test] Files:2 Time: 25s
  95. Restart Phase #:8 [test] Files:1 Time: 0s
  96. **************** Catproc Tables ****************
  97. Parallel Phase #:9 [test] Files:69 Time: 113s
  98. Restart Phase #:10 [test] Files:1 Time: 1s
  99. ************* Catproc Package Specs ************
  100. Serial Phase #:11 [test] Files:1 Time: 75s
  101. Restart Phase #:12 [test] Files:1 Time: 1s
  102. ************** Catproc Procedures **************
  103. Parallel Phase #:13 [test] Files:97 Time: 38s
  104. Restart Phase #:14 [test] Files:1 Time: 0s
  105. Parallel Phase #:15 [test] Files:118 Time: 40s
  106. Restart Phase #:16 [test] Files:1 Time: 1s
  107. Serial Phase #:17 [test] Files:13 Time: 4s
  108. Restart Phase #:18 [test] Files:1 Time: 1s
  109. ***************** Catproc Views ****************
  110. Parallel Phase #:19 [test] Files:33 Time: 95s
  111. Restart Phase #:20 [test] Files:1 Time: 1s
  112. Serial Phase #:21 [test] Files:3 Time: 15s
  113. Restart Phase #:22 [test] Files:1 Time: 0s
  114. Parallel Phase #:23 [test] Files:24 Time: 13912s
  115. Restart Phase #:24 [test] Files:1 Time: 0s
  116. Parallel Phase #:25 [test] Files:11 Time: 102s
  117. Restart Phase #:26 [test] Files:1 Time: 0s
  118. Serial Phase #:27 [test] Files:1 Time: 0s
  119. Serial Phase #:28 [test] Files:3 Time: 6s
  120. Serial Phase #:29 [test] Files:1 Time: 0s
  121. Restart Phase #:30 [test] Files:1 Time: 1s
  122. *************** Catproc CDB Views **************
  123. Serial Phase #:31 [test] Files:1 Time: 1s
  124. Restart Phase #:32 [test] Files:1 Time: 0s
  125. Serial Phase #:34 [test] Files:1 Time: 0s
  126. ***************** Catproc PLBs *****************
  127. Serial Phase #:35 [test] Files:283 Time: 137s
  128. Serial Phase #:36 [test] Files:1 Time: 0s
  129. Restart Phase #:37 [test] Files:1 Time: 0s
  130. Serial Phase #:38 [test] Files:1 Time: 7s
  131. Restart Phase #:39 [test] Files:1 Time: 0s
  132. *************** Catproc DataPump ***************
  133. Serial Phase #:40 [test] Files:3 Time: 80s
  134. Restart Phase #:41 [test] Files:1 Time: 1s
  135. ****************** Catproc SQL *****************
  136. Parallel Phase #:42 [test] Files:13 Time: 119s
  137. Restart Phase #:43 [test] Files:1 Time: 0s
  138. Parallel Phase #:44 [test] Files:12 Time: 31s
  139. Restart Phase #:45 [test] Files:1 Time: 0s
  140. Parallel Phase #:46 [test] Files:2 Time: 1s
  141. Restart Phase #:47 [test] Files:1 Time: 1s
  142. ************* Final Catproc scripts ************
  143. Serial Phase #:48 [test] Files:1 Time: 8s
  144. Restart Phase #:49 [test] Files:1 Time: 0s
  145. ************** Final RDBMS scripts *************
  146. Serial Phase #:50 [test] Files:1 Time: 31s
  147. ************ Upgrade Component Start ***********
  148. Serial Phase #:51 [test] Files:1 Time: 1s
  149. Restart Phase #:52 [test] Files:1 Time: 0s
  150. **************** Upgrading Java ****************
  151. Serial Phase #:53 [test] Files:1 Time: 332s
  152. Restart Phase #:54 [test] Files:1 Time: 1s
  153. ***************** Upgrading XDK ****************
  154. Serial Phase #:55 [test] Files:1 Time: 58s
  155. Restart Phase #:56 [test] Files:1 Time: 0s
  156. ********* Upgrading APS,OLS,DV,CONTEXT *********
  157. Serial Phase #:57 [test] Files:1 Time: 77s
  158. ***************** Upgrading XDB ****************
  159. Restart Phase #:58 [test] Files:1 Time: 0s
  160. Serial Phase #:60 [test] Files:3 Time: 33s
  161. Serial Phase #:61 [test] Files:3 Time: 9s
  162. Parallel Phase #:62 [test] Files:9 Time: 4s
  163. Parallel Phase #:63 [test] Files:24 Time: 6s
  164. Serial Phase #:64 [test] Files:4 Time: 7s
  165. Serial Phase #:65 [test] Files:1 Time: 0s
  166. Serial Phase #:66 [test] Files:30 Time: 4s
  167. Serial Phase #:67 [test] Files:1 Time: 0s
  168. Parallel Phase #:68 [test] Files:6 Time: 4s
  169. Serial Phase #:69 [test] Files:2 Time: 20s
  170. Serial Phase #:70 [test] Files:3 Time: 101s
  171. Restart Phase #:71 [test] Files:1 Time: 0s
  172. ********* Upgrading CATJAVA,OWM,MGW,RAC ********
  173. Serial Phase #:72 [test] Files:1 Time: 109s
  174. **************** Upgrading ORDIM ***************
  175. Restart Phase #:73 [test] Files:1 Time: 0s
  176. Serial Phase #:75 [test] Files:1 Time: 1s
  177. Parallel Phase #:76 [test] Files:2 Time: 99s
  178. Serial Phase #:77 [test] Files:1 Time: 86s
  179. Restart Phase #:78 [test] Files:1 Time: 1s
  180. Parallel Phase #:79 [test] Files:2 Time: 14s
  181. Serial Phase #:80 [test] Files:2 Time: 1s
  182. ***************** Upgrading SDO ****************
  183. Restart Phase #:81 [test] Files:1 Time: 0s
  184. Serial Phase #:83 [test] Files:1 Time: 47s
  185. Serial Phase #:84 [test] Files:1 Time: 2s
  186. Restart Phase #:85 [test] Files:1 Time: 0s
  187. Serial Phase #:86 [test] Files:1 Time: 32s
  188. Restart Phase #:87 [test] Files:1 Time: 1s
  189. Parallel Phase #:88 [test] Files:3 Time: 184s
  190. Restart Phase #:89 [test] Files:1 Time: 0s
  191. Serial Phase #:90 [test] Files:1 Time: 6s
  192. Restart Phase #:91 [test] Files:1 Time: 0s
  193. Serial Phase #:92 [test] Files:1 Time: 3s
  194. Restart Phase #:93 [test] Files:1 Time: 0s
  195. Parallel Phase #:94 [test] Files:4 Time: 146s
  196. Restart Phase #:95 [test] Files:1 Time: 0s
  197. Serial Phase #:96 [test] Files:1 Time: 1s
  198. Restart Phase #:97 [test] Files:1 Time: 0s
  199. Serial Phase #:98 [test] Files:2 Time: 62s
  200. Restart Phase #:99 [test] Files:1 Time: 0s
  201. Serial Phase #:100 [test] Files:1 Time: 1s
  202. Restart Phase #:101 [test] Files:1 Time: 0s
  203. *********** Upgrading Misc. ODM, OLAP **********
  204. Serial Phase #:102 [test] Files:1 Time: 36s
  205. **************** Upgrading APEX ****************
  206. Restart Phase #:103 [test] Files:1 Time: 0s
  207. Serial Phase #:104 [test] Files:1 Time: 792s
  208. Restart Phase #:105 [test] Files:1 Time: 1s
  209. *********** Final Component scripts ***********
  210. Serial Phase #:106 [test] Files:1 Time: 0s
  211. ************* Final Upgrade scripts ************
  212. Serial Phase #:107 [test] Files:1 Time: 144s
  213. ********** End PDB Application Upgrade *********
  214. Serial Phase #:108 [test] Files:1 Time: 1s
  215. ******************* Migration ******************
  216. Serial Phase #:109 [test] Files:1 Time: 51s
  217. Serial Phase #:110 [test] Files:1 Time: 0s
  218. Serial Phase #:111 [test] Files:1 Time: 92s
  219. ***************** Post Upgrade *****************
  220. Serial Phase #:112 [test] Files:1 Time: 775s
  221. **************** Summary report ****************
  222. Serial Phase #:113 [test] Files:1 Time: 1s
  223. Serial Phase #:114 [test] Files:1 Time: 0s
  224. Serial Phase #:115 [test] Files:1 Time: 24s
  225. ------------------------------------------------------
  226. Phases [0-115] End Time:[2020_01_16 22:00:27]
  227. ------------------------------------------------------
  228. Grand Total Time: 18602s
  229. LOG FILES: (/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037/catupgrd*.log)
  230. Upgrade Summary Report Located in:
  231. /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037/upg_summary.log
  232. Grand Total Upgrade Time: [0d:5h:10m:2s]
  233. [oracle@wls10306-02 bin]$
  234. [END] 2020/1/17 8:18:03

-- 检查组件,已经都是12.2.0.1的了 。但是下面提示timezone版本还是比较低的。

  1. SQL> @?/rdbms/admin/utlu122s.sql
  2. Oracle Database 12.2 Post-Upgrade Status Tool 01-17-2020 08:22:55
  3. Component Current Version Elapsed Time
  4. Name Status Number HH:MM:SS
  5. Oracle Server UPGRADED 12.2.0.1.0 04:13:32
  6. JServer JAVA Virtual Machine UPGRADED 12.2.0.1.0 00:05:31
  7. Oracle Workspace Manager UPGRADED 12.2.0.1.0 00:01:27
  8. OLAP Analytic Workspace UPGRADED 12.2.0.1.0 00:00:19
  9. OLAP Catalog OPTION OFF 11.2.0.4.0 00:00:00
  10. Oracle OLAP API UPGRADED 12.2.0.1.0 00:00:19
  11. Oracle XDK UPGRADED 12.2.0.1.0 00:00:57
  12. Oracle Text UPGRADED 12.2.0.1.0 00:00:56
  13. Oracle XML Database UPGRADED 12.2.0.1.0 00:03:06
  14. Oracle Database Java Packages UPGRADED 12.2.0.1.0 00:00:20
  15. Oracle Multimedia UPGRADED 12.2.0.1.0 00:03:20
  16. Spatial UPGRADED 12.2.0.1.0 00:08:02
  17. Oracle Application Express UPGRADED 5.0.4.00.12 00:13:10
  18. Final Actions 00:03:15
  19. Post Upgrade 00:12:52
  20. Total Upgrade Time: 05:07:42
  21. Database time zone version is 14. It is older than current release time
  22. zone version 26. Time zone upgrade is needed using the DBMS_DST package.
  23. Summary Report File = /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200116165037/upg_summary.log
  24. 08:22:56 SQL>
  25. 08:22:56 SQL>

-- 检查组件状态

  1. set line 200
  2. col COMP_ID format a10
  3. col COMP_NAME format a35
  4. select substr(comp_id,1,15) comp_id,substr(comp_name,1,30)
  5. comp_name,substr(version,1,10) version,status
  6. from dba_registry order by modified;
  7. COMP_ID COMP_NAME VERSION STATUS
  8. ---------- ----------------------------------- ---------------------------------------- --------------------------------------------
  9. CATALOG Oracle Database Catalog Views 12.2.0.1.0 UPGRADED
  10. CATPROC Oracle Database Packages and T 12.2.0.1.0 UPGRADED
  11. JAVAVM JServer JAVA Virtual Machine 12.2.0.1.0 UPGRADED
  12. XML Oracle XDK 12.2.0.1.0 UPGRADED
  13. APS OLAP Analytic Workspace 12.2.0.1.0 UPGRADED
  14. AMD OLAP Catalog 11.2.0.4.0 OPTION OFF
  15. CONTEXT Oracle Text 12.2.0.1.0 UPGRADED
  16. XDB Oracle XML Database 12.2.0.1.0 UPGRADED
  17. CATJAVA Oracle Database Java Packages 12.2.0.1.0 UPGRADED
  18. OWM Oracle Workspace Manager 12.2.0.1.0 UPGRADED
  19. ORDIM Oracle Multimedia 12.2.0.1.0 UPGRADED
  20. COMP_ID COMP_NAME VERSION STATUS
  21. ---------- ----------------------------------- ---------------------------------------- --------------------------------------------
  22. SDO Spatial 12.2.0.1.0 UPGRADED
  23. XOQ Oracle OLAP API 12.2.0.1.0 UPGRADED
  24. APEX Oracle Application Express 5.0.4.00.1 UPGRADED
  25. 14 rows selected.

-- 检查兼容性 ,因为之前使用的是11.2.0.4的spfile,里面的兼容性是11.2.0.4.0 。需要修改下 。

  1. SQL> show parameter compatible
  2. NAME TYPE VALUE
  3. ------------------------------------ ----------- ------------------------------
  4. compatible string 11.2.0.4.0
  5. noncdb_compatible boolean FALSE
  6. SQL> show parameter compatible
  7. NAME TYPE VALUE
  8. ------------------------------------ ----------- ------------------------------
  9. compatible string 12.2.0.1.0
  10. noncdb_compatible boolean FALSE
  11. SQL>

11 升级后步骤,升级timezone,其他的略。
-- 升级timezone
Download the DBMS_DST_scriptsV1.9.zip file and unzip, it contains 4 files: upg_tzv_check.sql and upg_tzv_apply.sql , countstatsTSTZ.sql and countstarTSTZ.sql .
Copy the 4 files to your database server, the location of the scripts can be any directory on the server.

  1. [oracle@wls10306-02 DBMS_DST_scriptsV1.9]$ ll
  2. total 68
  3. -rw-r--r-- 1 oracle oinstall 6294 Jan 8 2015 countstarTSTZ.sql
  4. -rw-r--r-- 1 oracle oinstall 7213 Mar 17 2018 countstatsTSTZ.sql
  5. -rw-r--r-- 1 oracle oinstall 19502 Aug 22 2014 upg_tzv_apply.sql
  6. -rw-r--r-- 1 oracle oinstall 31010 Aug 22 2014 upg_tzv_check.sql
  7. [oracle@wls10306-02 DBMS_DST_scriptsV1.9]$

执行countstatsTSTZ.sql 、upg_tzv_check.sql、upg_tzv_apply.sql

countstatsTSTZ.sql  -- list the stats num_row of all tables that have a TSTZ column (= processed by DBMS_DST ) and have actual data according to the stats.
upg_tzv_check.sql   -- it will detect the highest installed DST patch automatically and needs no downtime, this can be executed on a live production database but it WILL purge the dba_recyclebin.
upg_tzv_apply.sql   -- 这个应该是应用timezone ,真正的安装timezone

  1. SQL> @/home/oracle/DBMS_DST_scriptsV1.9/countstatsTSTZ.sql
  2. .
  3. Amount of TSTZ data using num_rows stats info in DBA_TABLES.
  4. .
  5. For SYS tables first...
  6. Note: empty tables are not listed.
  7. Stat date - Owner.Tablename.Columnname - num_rows
  8. 16/01/2020 - SYS.AQ$_ALERT_QT_S.CREATION_TIME - 5
  9. 16/01/2020 - SYS.AQ$_ALERT_QT_S.DELETION_TIME - 5
  10. 16/01/2020 - SYS.AQ$_ALERT_QT_S.MODIFICATION_TIME - 5
  11. 24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.CREATION_TIME - 3
  12. 24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.DELETION_TIME - 3
  13. 24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.MODIFICATION_TIME - 3
  14. 24/08/2013 - SYS.AQ$_AQ_PROP_TABLE_S.CREATION_TIME - 1
  15. 24/08/2013 - SYS.AQ$_AQ_PROP_TABLE_S.DELETION_TIME - 1
  16. 24/08/2013 - SYS.AQ$_AQ_PROP_TABLE_S.MODIFICATION_TIME - 1
  17. 24/08/2013 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.CREATION_TIME - 1
  18. 24/08/2013 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.DELETION_TIME - 1
  19. 24/08/2013 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.MODIFICATION_TIME - 1
  20. 24/08/2013 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.CREATION_TIME - 1
  21. 24/08/2013 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.DELETION_TIME - 1
  22. 24/08/2013 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.MODIFICATION_TIME - 1
  23. 24/08/2013 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.CREATION_TIME - 1
  24. 24/08/2013 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.DELETION_TIME - 1
  25. 24/08/2013 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.MODIFICATION_TIME - 1
  26. 16/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.CREATION_TIME - 1
  27. 16/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.DELETION_TIME - 1
  28. 16/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.MODIFICATION_TIME - 1
  29. 24/08/2013 - SYS.KET$_AUTOTASK_STATUS.ABA_START_TIME - 1
  30. 24/08/2013 - SYS.KET$_AUTOTASK_STATUS.ABA_STATE_TIME - 1
  31. 24/08/2013 - SYS.KET$_AUTOTASK_STATUS.MW_RECORD_TIME - 1
  32. 24/08/2013 - SYS.KET$_AUTOTASK_STATUS.MW_START_TIME - 1
  33. 24/08/2013 - SYS.KET$_AUTOTASK_STATUS.RECONCILE_TIME - 1
  34. 24/08/2013 - SYS.KET$_CLIENT_CONFIG.FIELD_2 - 7
  35. 24/08/2013 - SYS.KET$_CLIENT_CONFIG.LAST_CHANGE - 7
  36. 16/01/2020 - SYS.OPTSTAT_HIST_CONTROL$.SPARE6 - 19
  37. 16/01/2020 - SYS.OPTSTAT_HIST_CONTROL$.SVAL2 - 19
  38. 16/01/2020 - SYS.RADM_FPTM$.TSWTZ_COL - 1
  39. 16/01/2020 - SYS.SCHEDULER$_EVENT_LOG.LOG_DATE - 85
  40. 24/08/2013 - SYS.SCHEDULER$_GLOBAL_ATTRIBUTE.ATTR_TSTAMP - 11
  41. 16/01/2020 - SYS.SCHEDULER$_JOB.END_DATE - 14
  42. 16/01/2020 - SYS.SCHEDULER$_JOB.LAST_ENABLED_TIME - 14
  43. 16/01/2020 - SYS.SCHEDULER$_JOB.LAST_END_DATE - 14
  44. 16/01/2020 - SYS.SCHEDULER$_JOB.LAST_START_DATE - 14
  45. 16/01/2020 - SYS.SCHEDULER$_JOB.NEXT_RUN_DATE - 14
  46. 16/01/2020 - SYS.SCHEDULER$_JOB.START_DATE - 14
  47. 16/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.LOG_DATE - 85
  48. 16/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.REQ_START_DATE - 85
  49. 16/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.START_DATE - 85
  50. 24/08/2013 - SYS.SCHEDULER$_SCHEDULE.END_DATE - 3
  51. 24/08/2013 - SYS.SCHEDULER$_SCHEDULE.REFERENCE_DATE - 3
  52. 16/01/2020 - SYS.SCHEDULER$_WINDOW.ACTUAL_START_DATE - 9
  53. 16/01/2020 - SYS.SCHEDULER$_WINDOW.END_DATE - 9
  54. 16/01/2020 - SYS.SCHEDULER$_WINDOW.LAST_START_DATE - 9
  55. 16/01/2020 - SYS.SCHEDULER$_WINDOW.MANUAL_OPEN_TIME - 9
  56. 16/01/2020 - SYS.SCHEDULER$_WINDOW.NEXT_START_DATE - 9
  57. 16/01/2020 - SYS.SCHEDULER$_WINDOW.START_DATE - 9
  58. 16/01/2020 - SYS.WRI$_ALERT_HISTORY.CREATION_TIME - 6
  59. 16/01/2020 - SYS.WRI$_ALERT_HISTORY.TIME_SUGGESTED - 6
  60. 16/01/2020 - SYS.WRI$_ALERT_OUTSTANDING.CREATION_TIME - 1
  61. 16/01/2020 - SYS.WRI$_ALERT_OUTSTANDING.TIME_SUGGESTED - 1
  62. 16/01/2020 - SYS.WRI$_OPTSTAT_IND_HISTORY.SAVTIME - 1126
  63. 16/01/2020 - SYS.WRI$_OPTSTAT_IND_HISTORY.SPARE6 - 1126
  64. 16/01/2020 - SYS.WRI$_OPTSTAT_OPR.END_TIME - 224
  65. 16/01/2020 - SYS.WRI$_OPTSTAT_OPR.SPARE6 - 224
  66. 16/01/2020 - SYS.WRI$_OPTSTAT_OPR.START_TIME - 224
  67. 16/01/2020 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SAVTIME - 735
  68. 16/01/2020 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SPARE6 - 735
  69. Total numrow of SYS TSTZ columns is : 5000
  70. There are in total 154 non-SYS TSTZ columns.
  71. .
  72. For non-SYS tables ...
  73. Note: empty tables are not listed.
  74. Stat date - Owner.Tablename.Columnname - num_rows
  75. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_L.DEQUEUE_TIME - 2
  76. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_S.CREATION_TIME - 4
  77. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_S.DELETION_TIME - 4
  78. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_S.MODIFICATION_TIME - 4
  79. 24/08/2013 - IX.AQ$_STREAMS_QUEUE_TABLE_S.CREATION_TIME - 1
  80. 24/08/2013 - IX.AQ$_STREAMS_QUEUE_TABLE_S.DELETION_TIME - 1
  81. 24/08/2013 - IX.AQ$_STREAMS_QUEUE_TABLE_S.MODIFICATION_TIME - 1
  82. Total numrow of non-SYS TSTZ columns is : 17
  83. There are in total 32 non-SYS TSTZ columns.
  84. Total Minutes elapsed : 0
  85. SQL>
  1. SQL> @/home/oracle/DBMS_DST_scriptsV1.9/upg_tzv_check.sql
  2. INFO: Starting with RDBMS DST update preparation.
  3. INFO: NO actual RDBMS DST update will be done by this script.
  4. INFO: If an ERROR occurs the script will EXIT sqlplus.
  5. INFO: Doing checks for known issues ...
  6. INFO: Database version is 12.2.0.1 .
  7. INFO: Database RDBMS DST version is DSTv14 .
  8. INFO: No known issues detected.
  9. INFO: Now detecting new RDBMS DST version.
  10. A prepare window has been successfully started.
  11. INFO: Newest RDBMS DST version detected is DSTv26 .
  12. INFO: Next step is checking all TSTZ data.
  13. INFO: It might take a while before any further output is seen ...
  14. A prepare window has been successfully ended.
  15. INFO: A newer RDBMS DST version than the one currently used is found.
  16. INFO: Note that NO DST update was yet done.
  17. INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update.
  18. INFO: Note that the upg_tzv_apply.sql script will
  19. INFO: restart the database 2 times WITHOUT any confirmation or prompt.
  20. SQL>

--第三个脚本执行错误了,后面有解决方法。

  1. SQL> @/home/oracle/DBMS_DST_scriptsV1.9/upg_tzv_apply.sql -- 这个地方出错了,后面有处理过程
  2. INFO: If an ERROR occurs the script will EXIT sqlplus.
  3. INFO: The database RDBMS DST version will be updated to DSTv26 .
  4. WARNING: This script will restart the database 2 times
  5. WARNING: WITHOUT asking ANY confirmation.
  6. WARNING: Hit control-c NOW if this is not intended.
  7. INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
  8. Database closed.
  9. Database dismounted.
  10. ORACLE instance shut down.
  11. ORACLE instance started.
  12. Total System Global Area 830472192 bytes
  13. Fixed Size 8626144 bytes
  14. Variable Size 511705120 bytes
  15. Database Buffers 306184192 bytes
  16. Redo Buffers 3956736 bytes
  17. Database mounted.
  18. Database opened.
  19. INFO: Starting the RDBMS DST upgrade.
  20. INFO: Upgrading all SYS owned TSTZ data.
  21. INFO: It might take time before any further output is seen ...
  22. An upgrade window has been successfully started.
  23. INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
  24. Database closed.
  25. Database dismounted.
  26. ORACLE instance shut down.
  27. SP2-1540: Oracle Database cannot startup in an Edition session.
  28. ERROR:
  29. ORA-01034: ORACLE not available
  30. Process ID: 72111
  31. Session ID: 32 Serial number: 36090
  32. Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

-- 再次检查timezone,变成了26 。

  1. SQL> select * from v$timezone_file;
  2. FILENAME VERSION CON_ID
  3. -------------------- ---------- ----------
  4. timezlrg_26.dat 26 0
  5. SQL>
  6. SQL> SELECT property_name, SUBSTR(property_value, 1, 30) value
  7. FROM database_properties
  8. WHERE property_name LIKE 'DST_%'
  9. ORDER BY property_name; 2 3 4
  10. PROPERTY_NAME
  11. ------------------------------
  12. VALUE
  13. ------------------------------------------------------------------------------------------------------------------------
  14. DST_PRIMARY_TT_VERSION
  15. 26
  16. DST_SECONDARY_TT_VERSION
  17. 14
  18. DST_UPGRADE_STATE
  19. UPGRADE

-- 正常情况下,上面的查询DST_SECONDARY_TT_VERSION应该是0,DST_UPGRADE_STATE应该是None 。根据MOS 1509653.1 进行处理。

  1. CONN / as sysdba
  2. alter session set "_with_subquery"=materialize;
  3. alter session set "_simple_view_merging"=TRUE;
  4. set serveroutput on
  5. VAR numfail number
  6. BEGIN
  7. DBMS_DST.UPGRADE_DATABASE(:numfail,
  8. parallel => TRUE,
  9. log_errors => TRUE,
  10. log_errors_table => 'SYS.DST$ERROR_TABLE',
  11. log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
  12. error_on_overlap_time => FALSE,
  13. error_on_nonexisting_time => FALSE);
  14. DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
  15. END;
  16. /
  17. VAR fail number
  18. BEGIN
  19. DBMS_DST.END_UPGRADE(:fail);
  20. DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
  21. END;
  22. /
  23. SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
  24. FROM DATABASE_PROPERTIES
  25. WHERE PROPERTY_NAME LIKE 'DST_%'
  26. ORDER BY PROPERTY_NAME;
  27. SQL> alter session set "_with_subquery"=materialize;
  28. Session altered.
  29. SQL> alter session set "_simple_view_merging"=TRUE;
  30. Session altered.
  31. SQL> set serveroutput on
  32. SQL> VAR numfail number
  33. BEGIN
  34. DBMS_DST.UPGRADE_DATABASE(:numfail,
  35. parallel => TRUE,
  36. log_errors => TRUE,
  37. log_errors_table => 'SYS.DST$ERROR_TABLE',
  38. log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
  39. error_on_overlap_time => FALSE,
  40. error_on_nonexisting_time => FALSE)SQL> 2 3 4 5 6 7 8 ;
  41. DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
  42. END; 9 10
  43. 11 /
  44. Table list: "IX"."AQ$_ORDERS_QUEUETABLE_L"
  45. Number of failures: 0
  46. Table list: "IX"."AQ$_ORDERS_QUEUETABLE_S"
  47. Number of failures: 0
  48. Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_L"
  49. Number of failures: 0
  50. Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_S"
  51. Number of failures: 0
  52. Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
  53. Number of failures: 0
  54. Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
  55. Number of failures: 0
  56. Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES"
  57. Number of failures: 0
  58. Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES2"
  59. Number of failures: 0
  60. Table list: "APEX_050000"."WWV_FLOW_FEEDBACK"
  61. Number of failures: 0
  62. Table list: "APEX_050000"."WWV_FLOW_FEEDBACK_FOLLOWUP"
  63. Number of failures: 0
  64. Table list: "APEX_050000"."WWV_FLOW_WORKSHEET_NOTIFY"
  65. Number of failures: 0
  66. Failures:0
  67. PL/SQL procedure successfully completed.
  68. SQL> VAR fail number
  69. BEGIN
  70. DBMS_DST.END_UPGRADE(:fail);
  71. DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
  72. END;SQL> 2 3 4
  73. 5 /
  74. An upgrade window has been successfully ended.
  75. Failures:0
  76. PL/SQL procedure successfully completed.

-- 处理完毕后,再次查看时区,正常了。

  1. SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
  2. FROM DATABASE_PROPERTIES
  3. WHERE PROPERTY_NAME LIKE 'DST_%'
  4. ORDER BY PROPERTY_NAME; 2 3 4
  5. PROPERTY_NAME
  6. ----------------------------------------
  7. VALUE
  8. ------------------------------------------------------------------------------------------------------------------------
  9. DST_PRIMARY_TT_VERSION
  10. 26
  11. DST_SECONDARY_TT_VERSION
  12. 0
  13. DST_UPGRADE_STATE
  14. NONE
  15. SQL>

11.2.0.4 ---> 12.2.0.1 到此结束。
END

---- 2010-01-17 下午,在另一个机器上做升级,还是11.2.0.4升级到12.2.0.1

-- 产生预检查修复脚-本,也可以通过MOS 1577379.1  884522.1下载 (在上午做第一次升-级的时候,跳过这个步骤了,这次升-级做一下。其实就是产生一些预升-级的脚-本,跑一些,但是这些脚本好些还是需要手-工执-行的,然后产生post脚本,检查状态。其实这个预升-级的脚-本不做也可以。做下post脚-本查看下结果,有需要修改的修改下。就可以了)

 

  1. /u01/app/oracle/product/11.2.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/preupgrade.jar FILE TEXT DIR /u01/
  2. ++++++++++++++++++++++++++++
  3. [oracle@wls10306-01 ~]$ /u01/app/oracle/product/11.2.0/dbhome_1/jdk/bin/java -jar /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/preupgrade.jar FILE TEXT DIR /u01/
  4. Preupgrade generated files:
  5. /u01/preupgrade.log
  6. /u01/preupgrade_fixups.sql
  7. /u01/postupgrade_fixups.sql
  8. [oracle@wls10306-01 ~]$
  9. [oracle@wls10306-01 ~]$
  10. [oracle@wls10306-01 u01]$ ll
  11. total 508
  12. drwxrwxr-x. 4 oracle oinstall 40 Jan 6 15:31 app
  13. drwxr-xr-x 7 oracle oinstall 136 Aug 27 2013 database
  14. -rw-r--r-- 1 oracle oinstall 5373 Jan 17 13:52 dbms_registry_basic.sql
  15. -rw-r--r-- 1 oracle oinstall 12693 Jan 17 13:52 dbms_registry_extended.sql
  16. drwxr-xr-x 3 oracle oinstall 21 Jan 17 13:52 oracle
  17. -rw-r--r-- 1 oracle oinstall 8129 Jan 17 13:53 postupgrade_fixups.sql
  18. -rw-r--r-- 1 oracle oinstall 7027 Jan 17 13:52 preupgrade_driver.sql
  19. -rw-r--r-- 1 oracle oinstall 9196 Jan 17 13:53 preupgrade_fixups.sql
  20. -rw-r--r-- 1 oracle oinstall 10685 Jan 17 13:53 preupgrade.log
  21. -rw-r--r-- 1 oracle oinstall 60144 Jan 17 13:52 preupgrade_messages.properties
  22. -rw-r--r-- 1 oracle oinstall 390244 Jan 17 13:52 preupgrade_package.sql
  23. drwxr-xr-x 3 oracle oinstall 24 Jan 17 13:52 upgrade
  24. [oracle@wls10306-01 u01]$

-- 执行preupgrade_fixups.sql 。大部分失败了,需要手-工执-行。

  1. SQL> @/u01/preupgrade_fixups.sql
  2. Executing Oracle PRE-Upgrade Fixup Script
  3. Auto-Generated by: Oracle Preupgrade Script
  4. Version: 12.2.0.1.0 Build: 1
  5. Generated on: 2020-01-17 13:53:04
  6. For Source Database: TEST
  7. Source Database Version: 11.2.0.4.0
  8. For Upgrade to Version: 12.2.0.1.0
  9. Fixup
  10. Check Name Status Further DBA Action
  11. ---------- ------ ------------------
  12. em_present Failed Manual fixup recommended.
  13. amd_exists Failed Manual fixup recommended.
  14. dictionary_stats Passed None
  15. trgowner_no_admndbtrg Failed Manual fixup recommended.
  16. mv_refresh Failed Manual fixup recommended.
  17. apex_upgrade_msg Failed Manual fixup recommended.
  18. PL/SQL procedure successfully completed.
  19. SQL> SQL>

-- 删除em
从12c的ORACLE_HOME中copy emremove.sql 到11.2.0.4的oracle home

  1. emctl stop dbconsole
  2. cp /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/emremove.sql /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/
  3. SQL> @?/rdbms/admin/emremove.sql
  4. old 70: IF (upper('&LOGGING') = 'VERBOSE')
  5. new 70: IF (upper('VERBOSE') = 'VERBOSE')
  6. This script will drop the Oracle Enterprise Manager related schemas and objects.
  7. This script might take few minutes to complete; it has 6 phases to complete the process.
  8. The script may take longer if you have SYSMAN and related sessions are active
  9. from Oracle Enterprise Manager(OEM) application.
  10. Recommendations:
  11. You are recommended to shutdown DB Control application immediately before running this
  12. OEM repository removal script.
  13. To shutdown DB Control application, you need to run: emctl stop dbconsole
  14. Steps to be performed manually (after this script is run):
  15. Please note that you need to remove the DB Control Configuration Files
  16. manually to remove DB Control completly; remove the following
  17. directories from your filesystem:
  18. <ORACLE_HOME>/<hostname_sid>
  19. <ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>
  20. If the dbcontrol is upgraded from lower version, for example, from 10.2.0.3 to 10.2.0.4,
  21. then the following directory also needs to be removed from the file system.
  22. <ORACLE_HOME>/<hostname_sid>.upgrade
  23. <ORACLE_HOME>/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>.upgrade
  24. On Microsoft platforms, also delete the DB Console service, generally with name
  25. OracleDBConsole<sid>
  26. Starting phase 1 : Dropping AQ related objests, EM jobs and all Oracle Enterprise Manager related schemas; except SYSMAN ...
  27. dropping AQ related objests from SYSMAN ...
  28. saved job_queue_process=1000, set to 0, now removing Oracle EM jobs ...
  29. finding users who needs to be dropped ...
  30. found user name: MGMT_VIEW
  31. found [sql%notfound]: no session found; or already killed.
  32. Dropping user : "MGMT_VIEW"...
  33. Finished phase 1
  34. Starting phase 2 : Dropping SYSMAN schema ...
  35. found [sql%notfound]: SYSMAN related sessions are already killed; no session found
  36. dropping user : MGMT_VIEW...
  37. SYSMAN dropped
  38. Finished phase 3
  39. Starting phase 4 : Dropping Oracle Enterprise Manager related MGMT_USER role ...
  40. Finished phase 4
  41. Starting phase 5 : Dropping Oracle Enterprise Manager related public synonyms ...
  42. Dropping synonym : ECM_UTIL ...
  43. Dropping synonym : EMD_MNTR ...
  44. Dropping synonym : MGMT$ALERT_ANNOTATIONS ...
  45. Dropping synonym : MGMT$ALERT_CURRENT ...
  46. Dropping synonym : MGMT$ALERT_HISTORY ...
  47. Dropping synonym : MGMT$ALERT_NOTIF_LOG ...
  48. Dropping synonym : MGMT$APPLIED_PATCHES ...
  49. Dropping synonym : MGMT$APPLIED_PATCHSETS ...
  50. Dropping synonym : MGMT$APPL_PATCH_AND_PATCHSET ...
  51. Dropping synonym : MGMT$AUDIT_LOG ...
  52. Dropping synonym : MGMT$AVAILABILITY_CURRENT ...
  53. Dropping synonym : MGMT$AVAILABILITY_HISTORY ...
  54. Dropping synonym : MGMT$BLACKOUTS ...
  55. Dropping synonym : MGMT$BLACKOUT_HISTORY ...
  56. Dropping synonym : MGMT$CLUSTER_INTERCONNECTS ...
  57. Dropping synonym : MGMT$CPF_ADVISORY_INFO ...
  58. Dropping synonym : MGMT$CPF_HOMES_INFO ...
  59. Dropping synonym : MGMT$CPF_PATCH_DATA ...
  60. Dropping synonym : MGMT$CPF_PATCH_INFO ...
  61. Dropping synonym : MGMT$CSA_CLIENTS ...
  62. Dropping synonym : MGMT$CSA_CLIENT_RULE_VIOLS ...
  63. Dropping synonym : MGMT$CSA_COLLECTIONS ...
  64. Dropping synonym : MGMT$CSA_FAILED ...
  65. Dropping synonym : MGMT$CSA_HOST_COOKIES ...
  66. Dropping synonym : MGMT$CSA_HOST_CPUS ...
  67. Dropping synonym : MGMT$CSA_HOST_CUSTOM ...
  68. Dropping synonym : MGMT$CSA_HOST_IOCARDS ...
  69. Dropping synonym : MGMT$CSA_HOST_NICS ...
  70. Dropping synonym : MGMT$CSA_HOST_OS_COMPONENTS ...
  71. Dropping synonym : MGMT$CSA_HOST_OS_FILESYSTEMS ...
  72. Dropping synonym : MGMT$CSA_HOST_OS_PROPERTIES ...
  73. Dropping synonym : MGMT$CSA_HOST_RULES ...
  74. Dropping synonym : MGMT$CSA_HOST_SW ...
  75. Dropping synonym : MGMT$CSM_DOMAIN_DAILY ...
  76. Dropping synonym : MGMT$CSM_DOMAIN_DIST_DAILY ...
  77. Dropping synonym : MGMT$CSM_DOMAIN_DIST_HOURLY ...
  78. Dropping synonym : MGMT$CSM_DOMAIN_HOURLY ...
  79. Dropping synonym : MGMT$CSM_IP_DAILY ...
  80. Dropping synonym : MGMT$CSM_IP_DIST_DAILY ...
  81. Dropping synonym : MGMT$CSM_IP_DIST_HOURLY ...
  82. Dropping synonym : MGMT$CSM_IP_HOURLY ...
  83. Dropping synonym : MGMT$CSM_METRIC_DETAILS ...
  84. Dropping synonym : MGMT$CSM_MT_DSR_DAILY ...
  85. Dropping synonym : MGMT$CSM_MT_DSR_DIST_DAILY ...
  86. Dropping synonym : MGMT$CSM_MT_DSR_DIST_HOURLY ...
  87. Dropping synonym : MGMT$CSM_MT_DSR_HOURLY ...
  88. Dropping synonym : MGMT$CSM_MT_IP_DAILY ...
  89. Dropping synonym : MGMT$CSM_MT_IP_DIST_DAILY ...
  90. Dropping synonym : MGMT$CSM_MT_IP_DIST_HOURLY ...
  91. Dropping synonym : MGMT$CSM_MT_IP_HOURLY ...
  92. Dropping synonym : MGMT$CSM_MT_METRIC_DETAILS ...
  93. Dropping synonym : MGMT$CSM_MT_URL_DAILY ...
  94. Dropping synonym : MGMT$CSM_MT_URL_DIST_DAILY ...
  95. Dropping synonym : MGMT$CSM_MT_URL_DIST_HOURLY ...
  96. Dropping synonym : MGMT$CSM_MT_URL_HOURLY ...
  97. Dropping synonym : MGMT$CSM_REGION ...
  98. Dropping synonym : MGMT$CSM_REGION_DAILY ...
  99. Dropping synonym : MGMT$CSM_REGION_DIST_DAILY ...
  100. Dropping synonym : MGMT$CSM_REGION_DIST_HOURLY ...
  101. Dropping synonym : MGMT$CSM_REGION_HOURLY ...
  102. Dropping synonym : MGMT$CSM_SUBNET_DAILY ...
  103. Dropping synonym : MGMT$CSM_SUBNET_DIST_DAILY ...
  104. Dropping synonym : MGMT$CSM_SUBNET_DIST_HOURLY ...
  105. Dropping synonym : MGMT$CSM_SUBNET_HOURLY ...
  106. Dropping synonym : MGMT$CSM_URL_DAILY ...
  107. Dropping synonym : MGMT$CSM_URL_DIST_DAILY ...
  108. Dropping synonym : MGMT$CSM_URL_DIST_HOURLY ...
  109. Dropping synonym : MGMT$CSM_URL_HOURLY ...
  110. Dropping synonym : MGMT$CSM_WATCHLIST ...
  111. Dropping synonym : MGMT$CS_CONFIG_STANDARDS ...
  112. Dropping synonym : MGMT$CS_EVAL_SUMMARY_RULE ...
  113. Dropping synonym : MGMT$CS_EVAL_SUMMARY_STANDARD ...
  114. Dropping synonym : MGMT$DB_CONTROLFILES ...
  115. Dropping synonym : MGMT$DB_CONTROLFILES_ALL ...
  116. Dropping synonym : MGMT$DB_DATAFILES ...
  117. Dropping synonym : MGMT$DB_DATAFILES_ALL ...
  118. Dropping synonym : MGMT$DB_DBNINSTANCEINFO ...
  119. Dropping synonym : MGMT$DB_DBNINSTANCEINFO_ALL ...
  120. Dropping synonym : MGMT$DB_FEATUREUSAGE ...
  121. Dropping synonym : MGMT$DB_INIT_PARAMS ...
  122. Dropping synonym : MGMT$DB_INIT_PARAMS_ALL ...
  123. Dropping synonym : MGMT$DB_LICENSE ...
  124. Dropping synonym : MGMT$DB_LICENSE_ALL ...
  125. Dropping synonym : MGMT$DB_OPTIONS ...
  126. Dropping synonym : MGMT$DB_OPTIONS_ALL ...
  127. Dropping synonym : MGMT$DB_REDOLOGS ...
  128. Dropping synonym : MGMT$DB_REDOLOGS_ALL ...
  129. Dropping synonym : MGMT$DB_ROLLBACK_SEGS ...
  130. Dropping synonym : MGMT$DB_ROLLBACK_SEGS_ALL ...
  131. Dropping synonym : MGMT$DB_SGA ...
  132. Dropping synonym : MGMT$DB_SGA_ALL ...
  133. Dropping synonym : MGMT$DB_TABLESPACES ...
  134. Dropping synonym : MGMT$DB_TABLESPACES_ALL ...
  135. Dropping synonym : MGMT$DELTA_COMPONENTS ...
  136. Dropping synonym : MGMT$DELTA_COMPONENT_DETAILS ...
  137. Dropping synonym : MGMT$DELTA_FS_MOUNT ...
  138. Dropping synonym : MGMT$DELTA_HARDWARE ...
  139. Dropping synonym : MGMT$DELTA_HOST_CONFIG ...
  140. Dropping synonym : MGMT$DELTA_INIT ...
  141. Dropping synonym : MGMT$DELTA_ONEOFF_PATCHES ...
  142. Dropping synonym : MGMT$DELTA_ORACLE_HOME ...
  143. Dropping synonym : MGMT$DELTA_OS_COMPONENTS ...
  144. Dropping synonym : MGMT$DELTA_OS_COMP_DETAILS ...
  145. Dropping synonym : MGMT$DELTA_OS_KERNEL_PARAMS ...
  146. Dropping synonym : MGMT$DELTA_PATCHSETS ...
  147. Dropping synonym : MGMT$DELTA_PATCHSET_DETAILS ...
  148. Dropping synonym : MGMT$DELTA_VENDOR_SW ...
  149. Dropping synonym : MGMT$DELTA_VIEW ...
  150. Dropping synonym : MGMT$DELTA_VIEW_DETAILS ...
  151. Dropping synonym : MGMT$E2E_1DAY ...
  152. Dropping synonym : MGMT$E2E_HOURLY ...
  153. Dropping synonym : MGMT$E2E_RAW ...
  154. Dropping synonym : MGMT$ECM_CONFIG_HISTORY ...
  155. Dropping synonym : MGMT$ECM_CONFIG_HISTORY_KEY1 ...
  156. Dropping synonym : MGMT$ECM_CONFIG_HISTORY_KEY2 ...
  157. Dropping synonym : MGMT$ECM_CONFIG_HISTORY_KEY3 ...
  158. Dropping synonym : MGMT$ECM_CONFIG_HISTORY_KEY4 ...
  159. Dropping synonym : MGMT$ECM_CONFIG_HISTORY_KEY5 ...
  160. Dropping synonym : MGMT$ECM_CONFIG_HISTORY_KEY6 ...
  161. Dropping synonym : MGMT$ECM_CURRENT_SNAPSHOTS ...
  162. Dropping synonym : MGMT$ECM_VISIBLE_SNAPSHOTS ...
  163. Dropping synonym : MGMT$EM_HOMES_PLATFORM ...
  164. Dropping synonym : MGMT$ESA_ALL_PRIVS_REPORT ...
  165. Dropping synonym : MGMT$ESA_ANY_DICT_REPORT ...
  166. Dropping synonym : MGMT$ESA_ANY_PRIV_REPORT ...
  167. Dropping synonym : MGMT$ESA_AUDIT_SYSTEM_REPORT ...
  168. Dropping synonym : MGMT$ESA_BECOME_USER_REPORT ...
  169. Dropping synonym : MGMT$ESA_CATALOG_REPORT ...
  170. Dropping synonym : MGMT$ESA_CONN_PRIV_REPORT ...
  171. Dropping synonym : MGMT$ESA_CREATE_PRIV_REPORT ...
  172. Dropping synonym : MGMT$ESA_DBA_GROUP_REPORT ...
  173. Dropping synonym : MGMT$ESA_DBA_ROLE_REPORT ...
  174. Dropping synonym : MGMT$ESA_DIRECT_PRIV_REPORT ...
  175. Dropping synonym : MGMT$ESA_EXMPT_ACCESS_REPORT ...
  176. Dropping synonym : MGMT$ESA_KEY_OBJECTS_REPORT ...
  177. Dropping synonym : MGMT$ESA_OH_OWNERSHIP_REPORT ...
  178. Dropping synonym : MGMT$ESA_OH_PERMISSION_REPORT ...
  179. Dropping synonym : MGMT$ESA_POWER_PRIV_REPORT ...
  180. Dropping synonym : MGMT$ESA_PUB_PRIV_REPORT ...
  181. Dropping synonym : MGMT$ESA_SYS_PUB_PKG_REPORT ...
  182. Dropping synonym : MGMT$ESA_TABSP_OWNERS_REPORT ...
  183. Dropping synonym : MGMT$ESA_TRC_AUD_PERM_REPORT ...
  184. Dropping synonym : MGMT$ESA_TRC_AUD_PERM_REP_NT ...
  185. Dropping synonym : MGMT$ESA_WITH_ADMIN_REPORT ...
  186. Dropping synonym : MGMT$ESA_WITH_GRANT_REPORT ...
  187. Dropping synonym : MGMT$GROUP_DERIVED_MEMBERSHIPS ...
  188. Dropping synonym : MGMT$GROUP_FLAT_MEMBERSHIPS ...
  189. Dropping synonym : MGMT$GROUP_MEMBERS ...
  190. Dropping synonym : MGMT$GRP_METRICS_DAILY ...
  191. Dropping synonym : MGMT$GRP_METRICS_HOURLY ...
  192. Dropping synonym : MGMT$GRP_METRICS_RAW ...
  193. Dropping synonym : MGMT$HA_BACKUP ...
  194. Dropping synonym : MGMT$HA_FILES ...
  195. Dropping synonym : MGMT$HA_FILES_ALL ...
  196. Dropping synonym : MGMT$HA_INFO ...
  197. Dropping synonym : MGMT$HA_INFO_ALL ...
  198. Dropping synonym : MGMT$HA_INIT_PARAMS ...
  199. Dropping synonym : MGMT$HA_INIT_PARAMS_ALL ...
  200. Dropping synonym : MGMT$HA_MTTR ...
  201. Dropping synonym : MGMT$HA_RMAN_CONFIG ...
  202. Dropping synonym : MGMT$HA_RMAN_CONFIG_ALL ...
  203. Dropping synonym : MGMT$HOMES_AFFECTED ...
  204. Dropping synonym : MGMT$HOSTPATCH_GROUPS ...
  205. Dropping synonym : MGMT$HOSTPATCH_GRP_COMPL_HIST ...
  206. Dropping synonym : MGMT$HOSTPATCH_HOSTS ...
  207. Dropping synonym : MGMT$HOSTPATCH_HOST_COMPL ...
  208. Dropping synonym : MGMT$HW_NIC ...
  209. Dropping synonym : MGMT$INTERFACE_STATS ...
  210. Dropping synonym : MGMT$JOBS ...
  211. Dropping synonym : MGMT$JOB_ANNOTATIONS ...
  212. Dropping synonym : MGMT$JOB_EXECUTION_HISTORY ...
  213. Dropping synonym : MGMT$JOB_NOTIFICATION_LOG ...
  214. Dropping synonym : MGMT$JOB_STEP_HISTORY ...
  215. Dropping synonym : MGMT$JOB_TARGETS ...
  216. Dropping synonym : MGMT$MESSAGES ...
  217. Dropping synonym : MGMT$METRIC_CATEGORIES ...
  218. Dropping synonym : MGMT$METRIC_COLLECTION ...
  219. Dropping synonym : MGMT$METRIC_CURRENT ...
  220. Dropping synonym : MGMT$METRIC_DAILY ...
  221. Dropping synonym : MGMT$METRIC_DETAILS ...
  222. Dropping synonym : MGMT$METRIC_ERROR_CURRENT ...
  223. Dropping synonym : MGMT$METRIC_ERROR_HISTORY ...
  224. Dropping synonym : MGMT$METRIC_HOURLY ...
  225. Dropping synonym : MGMT$MISSING_TARGETS ...
  226. Dropping synonym : MGMT$MISSING_TARGETS_IN_GROUPS ...
  227. Dropping synonym : MGMT$ORACLE_SW_ENT_INSTALL ...
  228. Dropping synonym : MGMT$ORACLE_SW_ENT_TARGETS ...
  229. Dropping synonym : MGMT$ORACLE_SW_GRP_INSTALL ...
  230. Dropping synonym : MGMT$ORACLE_SW_GRP_TARGETS ...
  231. Dropping synonym : MGMT$OS_COMPONENTS ...
  232. Dropping synonym : MGMT$OS_FS_MOUNT ...
  233. Dropping synonym : MGMT$OS_HW_SUMMARY ...
  234. Dropping synonym : MGMT$OS_KERNEL_PARAMS ...
  235. Dropping synonym : MGMT$OS_PATCHES ...
  236. Dropping synonym : MGMT$OS_PROPERTIES ...
  237. Dropping synonym : MGMT$OS_SUMMARY ...
  238. Dropping synonym : MGMT$PATCH_ADVISORIES ...
  239. Dropping synonym : MGMT$POLICIES ...
  240. Dropping synonym : MGMT$POLICY_PARAMETERS ...
  241. Dropping synonym : MGMT$POLICY_VIOLATION_CONTEXT ...
  242. Dropping synonym : MGMT$POLICY_VIOLATION_CTXT ...
  243. Dropping synonym : MGMT$POLICY_VIOLATION_CURRENT ...
  244. Dropping synonym : MGMT$POLICY_VIOLATION_HISTORY ...
  245. Dropping synonym : MGMT$POLICY_VIOL_ANNOTATIONS ...
  246. Dropping synonym : MGMT$POLICY_VIOL_NOTIF_LOG ...
  247. Dropping synonym : MGMT$RACDB_INTERCONNECTS ...
  248. Dropping synonym : MGMT$SOFTWARE_COMPONENTS ...
  249. Dropping synonym : MGMT$SOFTWARE_COMPONENT_ONEOFF ...
  250. Dropping synonym : MGMT$SOFTWARE_COMP_PATCHSET ...
  251. Dropping synonym : MGMT$SOFTWARE_DEPENDENCIES ...
  252. Dropping synonym : MGMT$SOFTWARE_HOMES ...
  253. Dropping synonym : MGMT$SOFTWARE_HOME_PROPERTIES ...
  254. Dropping synonym : MGMT$SOFTWARE_ONEOFF_PATCHES ...
  255. Dropping synonym : MGMT$SOFTWARE_OTHERS ...
  256. Dropping synonym : MGMT$SOFTWARE_PATCHES_IN_HOMES ...
  257. Dropping synonym : MGMT$SOFTWARE_PATCHSETS ...
  258. Dropping synonym : MGMT$STEPS ...
  259. Dropping synonym : MGMT$STEP_GROUPS ...
  260. Dropping synonym : MGMT$STEP_METRICS_DAILY ...
  261. Dropping synonym : MGMT$STEP_METRICS_HOURLY ...
  262. Dropping synonym : MGMT$STEP_METRICS_RAW ...
  263. Dropping synonym : MGMT$STORAGE_REPORT_DATA ...
  264. Dropping synonym : MGMT$STORAGE_REPORT_DISK ...
  265. Dropping synonym : MGMT$STORAGE_REPORT_ISSUES ...
  266. Dropping synonym : MGMT$STORAGE_REPORT_KEYS ...
  267. Dropping synonym : MGMT$STORAGE_REPORT_LOCALFS ...
  268. Dropping synonym : MGMT$STORAGE_REPORT_NFS ...
  269. Dropping synonym : MGMT$STORAGE_REPORT_PATHS ...
  270. Dropping synonym : MGMT$STORAGE_REPORT_VOLUME ...
  271. Dropping synonym : MGMT$TARGET ...
  272. Dropping synonym : MGMT$TARGET_ASSOCIATIONS ...
  273. Dropping synonym : MGMT$TARGET_COMPONENTS ...
  274. Dropping synonym : MGMT$TARGET_COMPOSITE ...
  275. Dropping synonym : MGMT$TARGET_FLAT_MEMBERS ...
  276. Dropping synonym : MGMT$TARGET_MEMBERS ...
  277. Dropping synonym : MGMT$TARGET_METRIC_COLLECTIONS ...
  278. Dropping synonym : MGMT$TARGET_METRIC_SETTINGS ...
  279. Dropping synonym : MGMT$TARGET_POLICIES ...
  280. Dropping synonym : MGMT$TARGET_POLICY_EVAL_SUMM ...
  281. Dropping synonym : MGMT$TARGET_POLICY_SETTINGS ...
  282. Dropping synonym : MGMT$TARGET_PROPERTIES ...
  283. Dropping synonym : MGMT$TARGET_TYPE ...
  284. Dropping synonym : MGMT$TARGET_TYPE_DEF ...
  285. Dropping synonym : MGMT$TARGET_TYPE_PROPERTIES ...
  286. Dropping synonym : MGMT$TEMPLATES ...
  287. Dropping synonym : MGMT$TEMPLATE_METRICCOLLECTION ...
  288. Dropping synonym : MGMT$TEMPLATE_METRIC_SETTINGS ...
  289. Dropping synonym : MGMT$TEMPLATE_POLICY_SETTINGS ...
  290. Dropping synonym : MGMT$TXN_PERF_DAY ...
  291. Dropping synonym : MGMT$TXN_PERF_HOUR ...
  292. Dropping synonym : MGMT$TXN_PERF_RAW ...
  293. Dropping synonym : MGMT_ADMIN ...
  294. Dropping synonym : MGMT_AVAILABILITY ...
  295. Dropping synonym : MGMT_TARGET_BLACKOUTS ...
  296. Dropping synonym : MGMT_COLLECTION_PROPERTIES ...
  297. Dropping synonym : MGMT_CREDENTIAL ...
  298. Dropping synonym : MGMT_CURRENT_AVAILABILITY ...
  299. Dropping synonym : MGMT_CURRENT_METRICS ...
  300. Dropping synonym : MGMT_CURRENT_METRIC_ERRORS ...
  301. Dropping synonym : MGMT_CURRENT_SEVERITY ...
  302. Dropping synonym : MGMT_DELTA ...
  303. Dropping synonym : MGMT_DELTA_ENTRY ...
  304. Dropping synonym : MGMT_DELTA_ENTRY_VALUES ...
  305. Dropping synonym : MGMT_DELTA_IDS ...
  306. Dropping synonym : MGMT_DELTA_ID_VALUES ...
  307. Dropping synonym : MGMT_DELTA_VALUE ...
  308. Dropping synonym : MGMT_DELTA_VALUES ...
  309. Dropping synonym : MGMT_GLOBAL ...
  310. Dropping synonym : MGMT_GUID_ARRAY ...
  311. Dropping synonym : MGMT_GUID_OBJ ...
  312. Dropping synonym : MGMT_IP_TGT_GUID_ARRAY ...
  313. Dropping synonym : MGMT_JOB ...
  314. Dropping synonym : MGMT_JOBS ...
  315. Dropping synonym : MGMT_JOB_EXECPLAN ...
  316. Dropping synonym : MGMT_JOB_EXECUTION ...
  317. Dropping synonym : MGMT_JOB_EXEC_SUMMARY ...
  318. Dropping synonym : MGMT_JOB_OUTPUT ...
  319. Dropping synonym : MGMT_JOB_PARAMETER ...
  320. Dropping synonym : MGMT_JOB_SCHEDULE ...
  321. Dropping synonym : MGMT_JOB_TARGET ...
  322. Dropping synonym : MGMT_LOG ...
  323. Dropping synonym : MGMT_LONG_TEXT ...
  324. Dropping synonym : MGMT_MESSAGES ...
  325. Dropping synonym : MGMT_METRICS ...
  326. Dropping synonym : MGMT_METRICS_1DAY ...
  327. Dropping synonym : MGMT_METRICS_1HOUR ...
  328. Dropping synonym : MGMT_METRICS_COMPOSITE_KEYS ...
  329. Dropping synonym : MGMT_METRICS_RAW ...
  330. Dropping synonym : MGMT_METRIC_COLLECTIONS ...
  331. Dropping synonym : MGMT_METRIC_ERRORS ...
  332. Dropping synonym : MGMT_METRIC_THRESHOLDS ...
  333. Dropping synonym : MGMT_NAME_VALUE ...
  334. Dropping synonym : MGMT_NAME_VALUES ...
  335. Dropping synonym : MGMT_PAF$APPLICATIONS ...
  336. Dropping synonym : MGMT_PAF$INSTANCES ...
  337. Dropping synonym : MGMT_PAF$PROCEDURES ...
  338. Dropping synonym : MGMT_PAF$STATES ...
  339. Dropping synonym : MGMT_PAF_JOBS ...
  340. Dropping synonym : MGMT_PAF_PROCS_LATEST ...
  341. Dropping synonym : MGMT_PREFERENCES ...
  342. Dropping synonym : MGMT_SEVERITY ...
  343. Dropping synonym : MGMT_SEVERITY_ARRAY ...
  344. Dropping synonym : MGMT_SEVERITY_OBJ ...
  345. Dropping synonym : MGMT_STRING_METRIC_HISTORY ...
  346. Dropping synonym : MGMT_TARGET ...
  347. Dropping synonym : MGMT_TARGETS ...
  348. Dropping synonym : MGMT_TARGET_MEMBERSHIPS ...
  349. Dropping synonym : MGMT_TARGET_PROPERTIES ...
  350. Dropping synonym : MGMT_TYPE_PROPERTIES ...
  351. Dropping synonym : MGMT_USER ...
  352. Dropping synonym : MGMT_VIEW_UTIL ...
  353. Dropping synonym : SETEMVIEWUSERCONTEXT ...
  354. Dropping synonym : SMP_EMD_AVAIL_OBJ ...
  355. Dropping synonym : SMP_EMD_DELETE_REC_ARRAY ...
  356. Dropping synonym : SMP_EMD_INTEGER_ARRAY ...
  357. Dropping synonym : SMP_EMD_INTEGER_ARRAY_ARRAY ...
  358. Dropping synonym : SMP_EMD_NVPAIR ...
  359. Dropping synonym : SMP_EMD_NVPAIR_ARRAY ...
  360. Dropping synonym : SMP_EMD_STRING_ARRAY ...
  361. Dropping synonym : SMP_EMD_STRING_ARRAY_ARRAY ...
  362. Dropping synonym : SMP_EMD_TARGET_OBJ ...
  363. Dropping synonym : SMP_EMD_TARGET_OBJ_ARRAY ...
  364. Finished phase 5
  365. Starting phase 6 : Dropping Oracle Enterprise Manager related other roles ...
  366. Process DBSNMP user
  367. User DBSNMP is locked
  368. Done processing DBSNMP user
  369. Finished phase 6
  370. The Oracle Enterprise Manager related schemas and objects are dropped.
  371. Do the manual steps to studown the DB Control if not done before running this script and then delete the DB Control configuration files
  372. PL/SQL procedure successfully completed.
  373. SQL>

-- 删除olap Remove OLAP Catalog by running the 11.2.0.4.0, 大量的synonym,view,type,role等drop。

  1. SQL> @?/olap/admin/catnoamd.sql
  2. Synonym dropped.
  3. View dropped.
  4. Type dropped.
  5. View dropped.
  6. Type dropped.
  7. PL/SQL procedure successfully completed.
  8. Role dropped.
  9. PL/SQL procedure successfully completed.
  10. 1 row deleted.
  11. SQL>

-- Gather stale data dictionary statistics prior to database upgrade in off-peak time using

  1. SQL> EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
  2. PL/SQL procedure successfully completed.
  3. SQL>
  4. --授予ADMINISTER DATABASE TRIGGER权限,查询没有值,不授予
  5. SQL> SELECT OWNER,
  6. TRIGGER_NAME FROM DBA_TRIGGERS WHERE BASE_OBJECT_TYPE='DATABASE' AND
  7. OWNER NOT IN (SELECT GRANTEE FROM DBA_SYS_PRIVS WHERE
  8. PRIVILEGE='ADMINISTER DATABASE TRIGGER') 2 3 4 ;
  9. no rows selected
  10. SQL>

--刷新物化视图 ,略
--手动升-级apex,根据1088970.1 。目的是为了减少升-级时间。这里不升-级。

开始升-级 ,job_queue_process=0 后, 23步没有卡,很快就结束了。耗时大约90分钟(虚拟机电脑配置差,2G内存)。
./dbupgrade 

  1. [oracle@wls10306-01 bin]$ ./dbupgrade
  2. Argument list for [/u01/app/oracle/product/12.2.0/dbhome_1//rdbms/admin/catctl.pl]
  3. Run in c = 0
  4. Do not run in C = 0
  5. Input Directory d = 0
  6. Echo OFF e = 1
  7. Simulate E = 0
  8. Forced cleanup F = 0
  9. Log Id i = 0
  10. Child Process I = 0
  11. Log Dir l = 0
  12. Priority List Name L = 0
  13. Upgrade Mode active M = 0
  14. SQL Process Count n = 0
  15. SQL PDB Process Count N = 0
  16. Open Mode Normal o = 0
  17. Start Phase p = 0
  18. End Phase P = 0
  19. Reverse Order r = 0
  20. AutoUpgrade Resume R = 0
  21. Script s = 0
  22. Serial Run S = 0
  23. RO User Tablespaces T = 0
  24. Display Phases y = 0
  25. Debug catcon.pm z = 0
  26. Debug catctl.pl Z = 0
  27. catctl.pl VERSION: [12.2.0.1.0]
  28. STATUS: [production]
  29. BUILD: [RDBMS_12.2.0.1.0_LINUX.X64_170125]
  30. /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/12.2.0/dbhome_1/]
  31. /u01/app/oracle/product/12.2.0/dbhome_1//bin/orabasehome = [/u01/app/oracle/product/12.2.0/dbhome_1/]
  32. catctlGetOrabase = [/u01/app/oracle/product/12.2.0/dbhome_1/]
  33. Analyzing file /u01/app/oracle/product/12.2.0/dbhome_1//rdbms/admin/catupgrd.sql
  34. Log file directory = [/tmp/cfgtoollogs/upgrade20200117143709]
  35. catcon: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20200117143709/catupgrd_catcon_17337.lst]
  36. catcon: See [/tmp/cfgtoollogs/upgrade20200117143709/catupgrd*.log] files for output generated by scripts
  37. catcon: See [/tmp/cfgtoollogs/upgrade20200117143709/catupgrd_*.lst] files for spool files, if any
  38. Number of Cpus = 1
  39. Database Name = test
  40. DataBase Version = 11.2.0.4.0
  41. catcon: ALL catcon-related output will be written to [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711/catupgrd_catcon_17337.lst]
  42. catcon: See [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711/catupgrd*.log] files for output generated by scripts
  43. catcon: See [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711/catupgrd_*.lst] files for spool files, if any
  44. Log file directory = [/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711]
  45. Parallel SQL Process Count = 4
  46. Components in [test]
  47. Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT JAVAVM ORDIM OWM SDO XDB XML XOQ]
  48. Not Installed [DV EM MGW ODM OLS RAC WK]
  49. ------------------------------------------------------
  50. Phases [0-115] Start Time:[2020_01_17 14:37:12]
  51. ------------------------------------------------------
  52. *********** Executing Change Scripts ***********
  53. Serial Phase #:0 [test] Files:1 Time: 233s
  54. *************** Catalog Core SQL ***************
  55. Serial Phase #:1 [test] Files:5 Time: 72s
  56. Restart Phase #:2 [test] Files:1 Time: 0s
  57. *********** Catalog Tables and Views ***********
  58. Parallel Phase #:3 [test] Files:19 Time: 47s
  59. Restart Phase #:4 [test] Files:1 Time: 0s
  60. ************* Catalog Final Scripts ************
  61. Serial Phase #:5 [test] Files:6 Time: 32s
  62. ***************** Catproc Start ****************
  63. Serial Phase #:6 [test] Files:1 Time: 28s
  64. ***************** Catproc Types ****************
  65. Serial Phase #:7 [test] Files:2 Time: 24s
  66. Restart Phase #:8 [test] Files:1 Time: 0s
  67. **************** Catproc Tables ****************
  68. Parallel Phase #:9 [test] Files:69 Time: 74s
  69. Restart Phase #:10 [test] Files:1 Time: 1s
  70. ************* Catproc Package Specs ************
  71. Serial Phase #:11 [test] Files:1 Time: 54s
  72. Restart Phase #:12 [test] Files:1 Time: 0s
  73. ************** Catproc Procedures **************
  74. Parallel Phase #:13 [test] Files:97 Time: 38s
  75. Restart Phase #:14 [test] Files:1 Time: 1s
  76. Parallel Phase #:15 [test] Files:118 Time: 34s
  77. Restart Phase #:16 [test] Files:1 Time: 0s
  78. Serial Phase #:17 [test] Files:13 Time: 4s
  79. Restart Phase #:18 [test] Files:1 Time: 1s
  80. ***************** Catproc Views ****************
  81. Parallel Phase #:19 [test] Files:33 Time: 60s
  82. Restart Phase #:20 [test] Files:1 Time: 0s
  83. Serial Phase #:21 [test] Files:3 Time: 13s
  84. Restart Phase #:22 [test] Files:1 Time: 1s
  85. Parallel Phase #:23 [test] Files:24 Time: 261s
  86. Restart Phase #:24 [test] Files:1 Time: 0s
  87. Parallel Phase #:25 [test] Files:11 Time: 122s
  88. Restart Phase #:26 [test] Files:1 Time: 0s
  89. Serial Phase #:27 [test] Files:1 Time: 0s
  90. Serial Phase #:28 [test] Files:3 Time: 5s
  91. Serial Phase #:29 [test] Files:1 Time: 0s
  92. Restart Phase #:30 [test] Files:1 Time: 1s
  93. *************** Catproc CDB Views **************
  94. Serial Phase #:31 [test] Files:1 Time: 1s
  95. Restart Phase #:32 [test] Files:1 Time: 0s
  96. Serial Phase #:34 [test] Files:1 Time: 0s
  97. ***************** Catproc PLBs *****************
  98. Serial Phase #:35 [test] Files:283 Time: 136s
  99. Serial Phase #:36 [test] Files:1 Time: 0s
  100. Restart Phase #:37 [test] Files:1 Time: 0s
  101. Serial Phase #:38 [test] Files:1 Time: 8s
  102. Restart Phase #:39 [test] Files:1 Time: 1s
  103. *************** Catproc DataPump ***************
  104. Serial Phase #:40 [test] Files:3 Time: 77s
  105. Restart Phase #:41 [test] Files:1 Time: 1s
  106. ****************** Catproc SQL *****************
  107. Parallel Phase #:42 [test] Files:13 Time: 124s
  108. Restart Phase #:43 [test] Files:1 Time: 1s
  109. Parallel Phase #:44 [test] Files:12 Time: 42s
  110. Restart Phase #:45 [test] Files:1 Time: 1s
  111. Parallel Phase #:46 [test] Files:2 Time: 2s
  112. Restart Phase #:47 [test] Files:1 Time: 0s
  113. ************* Final Catproc scripts ************
  114. Serial Phase #:48 [test] Files:1 Time: 12s
  115. Restart Phase #:49 [test] Files:1 Time: 0s
  116. ************** Final RDBMS scripts *************
  117. Serial Phase #:50 [test] Files:1 Time: 38s
  118. ************ Upgrade Component Start ***********
  119. Serial Phase #:51 [test] Files:1 Time: 0s
  120. Restart Phase #:52 [test] Files:1 Time: 1s
  121. **************** Upgrading Java ****************
  122. Serial Phase #:53 [test] Files:1 Time: 678s
  123. Restart Phase #:54 [test] Files:1 Time: 1s
  124. ***************** Upgrading XDK ****************
  125. Serial Phase #:55 [test] Files:1 Time: 83s
  126. Restart Phase #:56 [test] Files:1 Time: 1s
  127. ********* Upgrading APS,OLS,DV,CONTEXT *********
  128. Serial Phase #:57 [test] Files:1 Time: 100s
  129. ***************** Upgrading XDB ****************
  130. Restart Phase #:58 [test] Files:1 Time: 1s
  131. Serial Phase #:60 [test] Files:3 Time: 43s
  132. Serial Phase #:61 [test] Files:3 Time: 15s
  133. Parallel Phase #:62 [test] Files:9 Time: 6s
  134. Parallel Phase #:63 [test] Files:24 Time: 10s
  135. Serial Phase #:64 [test] Files:4 Time: 15s
  136. Serial Phase #:65 [test] Files:1 Time: 0s
  137. Serial Phase #:66 [test] Files:30 Time: 6s
  138. Serial Phase #:67 [test] Files:1 Time: 0s
  139. Parallel Phase #:68 [test] Files:6 Time: 6s
  140. Serial Phase #:69 [test] Files:2 Time: 39s
  141. Serial Phase #:70 [test] Files:3 Time: 161s
  142. Restart Phase #:71 [test] Files:1 Time: 1s
  143. ********* Upgrading CATJAVA,OWM,MGW,RAC ********
  144. Serial Phase #:72 [test] Files:1 Time: 188s
  145. **************** Upgrading ORDIM ***************
  146. Restart Phase #:73 [test] Files:1 Time: 1s
  147. Serial Phase #:75 [test] Files:1 Time: 1s
  148. Parallel Phase #:76 [test] Files:2 Time: 160s
  149. Serial Phase #:77 [test] Files:1 Time: 126s
  150. Restart Phase #:78 [test] Files:1 Time: 1s
  151. Parallel Phase #:79 [test] Files:2 Time: 21s
  152. Serial Phase #:80 [test] Files:2 Time: 2s
  153. ***************** Upgrading SDO ****************
  154. Restart Phase #:81 [test] Files:1 Time: 0s
  155. Serial Phase #:83 [test] Files:1 Time: 60s
  156. Serial Phase #:84 [test] Files:1 Time: 2s
  157. Restart Phase #:85 [test] Files:1 Time: 1s
  158. Serial Phase #:86 [test] Files:1 Time: 43s
  159. Restart Phase #:87 [test] Files:1 Time: 1s
  160. Parallel Phase #:88 [test] Files:3 Time: 257s
  161. Restart Phase #:89 [test] Files:1 Time: 1s
  162. Serial Phase #:90 [test] Files:1 Time: 9s
  163. Restart Phase #:91 [test] Files:1 Time: 0s
  164. Serial Phase #:92 [test] Files:1 Time: 4s
  165. Restart Phase #:93 [test] Files:1 Time: 1s
  166. Parallel Phase #:94 [test] Files:4 Time: 218s
  167. Restart Phase #:95 [test] Files:1 Time: 0s
  168. Serial Phase #:96 [test] Files:1 Time: 1s
  169. Restart Phase #:97 [test] Files:1 Time: 0s
  170. Serial Phase #:98 [test] Files:2 Time: 85s
  171. Restart Phase #:99 [test] Files:1 Time: 0s
  172. Serial Phase #:100 [test] Files:1 Time: 1s
  173. Restart Phase #:101 [test] Files:1 Time: 1s
  174. *********** Upgrading Misc. ODM, OLAP **********
  175. Serial Phase #:102 [test] Files:1 Time: 41s
  176. **************** Upgrading APEX ****************
  177. Restart Phase #:103 [test] Files:1 Time: 1s
  178. Serial Phase #:104 [test] Files:1 Time: 1044s
  179. Restart Phase #:105 [test] Files:1 Time: 0s
  180. *********** Final Component scripts ***********
  181. Serial Phase #:106 [test] Files:1 Time: 1s
  182. ************* Final Upgrade scripts ************
  183. Serial Phase #:107 [test] Files:1 Time: 148s
  184. ********** End PDB Application Upgrade *********
  185. Serial Phase #:108 [test] Files:1 Time: 1s
  186. ******************* Migration ******************
  187. Serial Phase #:109 [test] Files:1 Time: 59s
  188. Serial Phase #:110 [test] Files:1 Time: 0s
  189. Serial Phase #:111 [test] Files:1 Time: 50s
  190. ***************** Post Upgrade *****************
  191. Serial Phase #:112 [test] Files:1 Time: 169s
  192. **************** Summary report ****************
  193. Serial Phase #:113 [test] Files:1 Time: 2s
  194. Serial Phase #:114 [test] Files:1 Time: 0s
  195. Serial Phase #:115 [test] Files:1 Time: 19s
  196. ------------------------------------------------------
  197. Phases [0-115] End Time:[2020_01_17 16:07:49]
  198. ------------------------------------------------------
  199. Grand Total Time: 5449s
  200. LOG FILES: (/u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711/catupgrd*.log)
  201. Upgrade Summary Report Located in:
  202. /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711/upg_summary.log
  203. Grand Total Upgrade Time: [0d:1h:30m:49s]
  204. [oracle@wls10306-01 bin]$
  1. SQL> @?/rdbms/admin/utlu122s.sql
  2. Oracle Database 12.2 Post-Upgrade Status Tool 01-17-2020 16:09:04
  3. Component Current Version Elapsed Time
  4. Name Status Number HH:MM:SS
  5. Oracle Server UPGRADED 12.2.0.1.0 00:25:42
  6. JServer JAVA Virtual Machine UPGRADED 12.2.0.1.0 00:11:16
  7. Oracle Workspace Manager UPGRADED 12.2.0.1.0 00:02:33
  8. OLAP Analytic Workspace UPGRADED 12.2.0.1.0 00:00:20
  9. Oracle OLAP API UPGRADED 12.2.0.1.0 00:00:21
  10. Oracle XDK UPGRADED 12.2.0.1.0 00:01:22
  11. Oracle Text UPGRADED 12.2.0.1.0 00:01:18
  12. Oracle XML Database UPGRADED 12.2.0.1.0 00:05:00
  13. Oracle Database Java Packages UPGRADED 12.2.0.1.0 00:00:33
  14. Oracle Multimedia UPGRADED 12.2.0.1.0 00:05:10
  15. Spatial UPGRADED 12.2.0.1.0 00:11:21
  16. Oracle Application Express UPGRADED 5.0.4.00.12 00:17:22
  17. Final Actions 00:03:28
  18. Post Upgrade 00:02:48
  19. Total Upgrade Time: 01:29:17
  20. Database time zone version is 14. It is older than current release time
  21. zone version 26. Time zone upgrade is needed using the DBMS_DST package.
  22. Summary Report File = /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/test/upgrade20200117143711/upg_summary.log
  23. 16:09:05 SQL>
  24. 16:09:05 SQL>

-- 运行post 脚-本

  1. [oracle@wls10306-01 u01]$ sqlplus /nolog
  2. SQL*Plus: Release 12.2.0.1.0 Production on Fri Jan 17 16:12:16 2020
  3. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> @/u01/postupgrade_fixups.sql
  7. Session altered.
  8. PL/SQL procedure successfully completed.
  9. PL/SQL procedure successfully completed.
  10. Package created.
  11. No errors.
  12. Package body created.
  13. No errors.
  14. Package created.
  15. No errors.
  16. Package body created.
  17. No errors.
  18. Executing Oracle POST-Upgrade Fixup Script
  19. Auto-Generated by: Oracle Preupgrade Script
  20. Version: 12.2.0.1.0 Build: 1
  21. Generated on: 2020-01-17 13:53:06
  22. For Source Database: TEST
  23. Source Database Version: 11.2.0.4.0
  24. For Upgrade to Version: 12.2.0.1.0
  25. Fixup
  26. Check Name Status Further DBA Action
  27. ---------- ------ ------------------
  28. depend_usr_tables Failed Manual fixup recommended.
  29. old_time_zones_exist Failed Manual fixup recommended.
  30. post_dictionary Passed None
  31. fixed_objects Passed None
  32. upg_by_std_upgrd Passed None
  33. PL/SQL procedure successfully completed.
  34. Session altered.
  35. SQL>

-- 升级time-zone。这次执行三个脚-本,没有出错。

  1. [oracle@wls10306-01 bin]$ sqlplus /nolog
  2. SQL*Plus: Release 12.2.0.1.0 Production on Fri Jan 17 16:17:51 2020
  3. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> @/home/oracle/DBMS_DST_scriptsV1.9/countstatsTSTZ.sql
  7. .
  8. Amount of TSTZ data using num_rows stats info in DBA_TABLES.
  9. .
  10. For SYS tables first...
  11. Note: empty tables are not listed.
  12. Stat date - Owner.Tablename.Columnname - num_rows
  13. 17/01/2020 - SYS.AQ$_ALERT_QT_S.CREATION_TIME - 5
  14. 17/01/2020 - SYS.AQ$_ALERT_QT_S.DELETION_TIME - 5
  15. 17/01/2020 - SYS.AQ$_ALERT_QT_S.MODIFICATION_TIME - 5
  16. 24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.CREATION_TIME - 3
  17. 24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.DELETION_TIME - 3
  18. 24/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.MODIFICATION_TIME - 3
  19. 24/08/2013 - SYS.AQ$_AQ_PROP_TABLE_S.CREATION_TIME - 1
  20. 24/08/2013 - SYS.AQ$_AQ_PROP_TABLE_S.DELETION_TIME - 1
  21. 24/08/2013 - SYS.AQ$_AQ_PROP_TABLE_S.MODIFICATION_TIME - 1
  22. 17/01/2020 - SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.CREATION_TIME - 1
  23. 17/01/2020 - SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.DELETION_TIME - 1
  24. 17/01/2020 - SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.MODIFICATION_TIME - 1
  25. 17/01/2020 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.CREATION_TIME - 1
  26. 17/01/2020 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.DELETION_TIME - 1
  27. 17/01/2020 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.MODIFICATION_TIME - 1
  28. 17/01/2020 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.CREATION_TIME - 3
  29. 17/01/2020 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.DELETION_TIME - 3
  30. 17/01/2020 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.MODIFICATION_TIME - 3
  31. 24/08/2013 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.CREATION_TIME - 1
  32. 24/08/2013 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.DELETION_TIME - 1
  33. 24/08/2013 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.MODIFICATION_TIME - 1
  34. 24/08/2013 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.CREATION_TIME - 1
  35. 24/08/2013 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.DELETION_TIME - 1
  36. 24/08/2013 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.MODIFICATION_TIME - 1
  37. 17/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.CREATION_TIME - 1
  38. 17/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.DELETION_TIME - 1
  39. 17/01/2020 - SYS.AQ$_SUBSCRIBER_TABLE.MODIFICATION_TIME - 1
  40. 17/01/2020 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.CREATION_TIME - 4
  41. 17/01/2020 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.DELETION_TIME - 4
  42. 17/01/2020 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.MODIFICATION_TIME - 4
  43. 17/01/2020 - SYS.KET$_AUTOTASK_STATUS.ABA_START_TIME - 1
  44. 17/01/2020 - SYS.KET$_AUTOTASK_STATUS.ABA_STATE_TIME - 1
  45. 17/01/2020 - SYS.KET$_AUTOTASK_STATUS.MW_RECORD_TIME - 1
  46. 17/01/2020 - SYS.KET$_AUTOTASK_STATUS.MW_START_TIME - 1
  47. 17/01/2020 - SYS.KET$_AUTOTASK_STATUS.RECONCILE_TIME - 1
  48. 17/01/2020 - SYS.KET$_CLIENT_CONFIG.FIELD_2 - 7
  49. 17/01/2020 - SYS.KET$_CLIENT_CONFIG.LAST_CHANGE - 7
  50. 17/01/2020 - SYS.OPTSTAT_HIST_CONTROL$.SPARE6 - 39
  51. 17/01/2020 - SYS.OPTSTAT_HIST_CONTROL$.SVAL2 - 39
  52. 17/01/2020 - SYS.OPTSTAT_SNAPSHOT$.TIMESTAMP - 360
  53. 17/01/2020 - SYS.OPTSTAT_USER_PREFS$.CHGTIME - 35
  54. 17/01/2020 - SYS.RADM_FPTM$.TSWTZ_COL - 1
  55. 17/01/2020 - SYS.REG$.NTFN_GROUPING_START_TIME - 2
  56. 17/01/2020 - SYS.REG$.REG_TIME - 2
  57. 17/01/2020 - SYS.SCHEDULER$_EVENT_LOG.LOG_DATE - 32
  58. 17/01/2020 - SYS.SCHEDULER$_GLOBAL_ATTRIBUTE.ATTR_TSTAMP - 11
  59. 17/01/2020 - SYS.SCHEDULER$_JOB.END_DATE - 26
  60. 17/01/2020 - SYS.SCHEDULER$_JOB.LAST_ENABLED_TIME - 26
  61. 17/01/2020 - SYS.SCHEDULER$_JOB.LAST_END_DATE - 26
  62. 17/01/2020 - SYS.SCHEDULER$_JOB.LAST_START_DATE - 26
  63. 17/01/2020 - SYS.SCHEDULER$_JOB.NEXT_RUN_DATE - 26
  64. 17/01/2020 - SYS.SCHEDULER$_JOB.START_DATE - 26
  65. 17/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.LOG_DATE - 18
  66. 17/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.REQ_START_DATE - 18
  67. 17/01/2020 - SYS.SCHEDULER$_JOB_RUN_DETAILS.START_DATE - 18
  68. 17/01/2020 - SYS.SCHEDULER$_SCHEDULE.END_DATE - 4
  69. 17/01/2020 - SYS.SCHEDULER$_SCHEDULE.REFERENCE_DATE - 4
  70. 17/01/2020 - SYS.SCHEDULER$_WINDOW.ACTUAL_START_DATE - 9
  71. 17/01/2020 - SYS.SCHEDULER$_WINDOW.END_DATE - 9
  72. 17/01/2020 - SYS.SCHEDULER$_WINDOW.LAST_START_DATE - 9
  73. 17/01/2020 - SYS.SCHEDULER$_WINDOW.MANUAL_OPEN_TIME - 9
  74. 17/01/2020 - SYS.SCHEDULER$_WINDOW.NEXT_START_DATE - 9
  75. 17/01/2020 - SYS.SCHEDULER$_WINDOW.START_DATE - 9
  76. 17/01/2020 - SYS.TAB_STATS$.SPARE6 - 1122
  77. 17/01/2020 - SYS.WRI$_ALERT_HISTORY.CREATION_TIME - 53
  78. 17/01/2020 - SYS.WRI$_ALERT_HISTORY.TIME_SUGGESTED - 53
  79. 17/01/2020 - SYS.WRI$_ALERT_OUTSTANDING.CREATION_TIME - 1
  80. 17/01/2020 - SYS.WRI$_ALERT_OUTSTANDING.TIME_SUGGESTED - 1
  81. 17/01/2020 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SAVTIME - 33185
  82. 17/01/2020 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SPARE6 - 33185
  83. 17/01/2020 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SAVTIME - 58022
  84. 17/01/2020 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SPARE6 - 58022
  85. 17/01/2020 - SYS.WRI$_OPTSTAT_IND_HISTORY.SAVTIME - 4124
  86. 17/01/2020 - SYS.WRI$_OPTSTAT_IND_HISTORY.SPARE6 - 4124
  87. 17/01/2020 - SYS.WRI$_OPTSTAT_OPR.END_TIME - 200
  88. 17/01/2020 - SYS.WRI$_OPTSTAT_OPR.SPARE6 - 200
  89. 17/01/2020 - SYS.WRI$_OPTSTAT_OPR.START_TIME - 200
  90. 17/01/2020 - SYS.WRI$_OPTSTAT_OPR_TASKS.END_TIME - 6409
  91. 17/01/2020 - SYS.WRI$_OPTSTAT_OPR_TASKS.SPARE6 - 6409
  92. 17/01/2020 - SYS.WRI$_OPTSTAT_OPR_TASKS.START_TIME - 6409
  93. 17/01/2020 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SAVTIME - 3836
  94. 17/01/2020 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SPARE6 - 3836
  95. 17/01/2020 - SYS.XS$PRIN.END_DATE - 15
  96. 17/01/2020 - SYS.XS$PRIN.START_DATE - 15
  97. Total numrow of SYS TSTZ columns is : 220296
  98. There are in total 154 non-SYS TSTZ columns.
  99. .
  100. For non-SYS tables ...
  101. Note: empty tables are not listed.
  102. Stat date - Owner.Tablename.Columnname - num_rows
  103. 17/01/2020 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.CREATION_TIME - 1
  104. 17/01/2020 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.DELETION_TIME - 1
  105. 17/01/2020 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.MODIFICATION_TIME -
  106. 1
  107. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_L.DEQUEUE_TIME - 2
  108. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_S.CREATION_TIME - 4
  109. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_S.DELETION_TIME - 4
  110. 24/08/2013 - IX.AQ$_ORDERS_QUEUETABLE_S.MODIFICATION_TIME - 4
  111. 24/08/2013 - IX.AQ$_STREAMS_QUEUE_TABLE_S.CREATION_TIME - 1
  112. 24/08/2013 - IX.AQ$_STREAMS_QUEUE_TABLE_S.DELETION_TIME - 1
  113. 24/08/2013 - IX.AQ$_STREAMS_QUEUE_TABLE_S.MODIFICATION_TIME - 1
  114. 17/01/2020 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.CREATION_TIME - 1
  115. 17/01/2020 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.DELETION_TIME - 1
  116. 17/01/2020 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.MODIFICATION_TIME - 1
  117. 17/01/2020 - WMSYS.WM$WORKSPACES_TABLE$.CREATETIME - 1
  118. 17/01/2020 - WMSYS.WM$WORKSPACES_TABLE$.LAST_CHANGE - 1
  119. Total numrow of non-SYS TSTZ columns is : 25
  120. There are in total 32 non-SYS TSTZ columns.
  121. Total Minutes elapsed : 0
  122. SQL> @/home/oracle/DBMS_DST_scriptsV1.9/upg_tzv_check.sql
  123. INFO: Starting with RDBMS DST update preparation.
  124. INFO: NO actual RDBMS DST update will be done by this script.
  125. INFO: If an ERROR occurs the script will EXIT sqlplus.
  126. INFO: Doing checks for known issues ...
  127. INFO: Database version is 12.2.0.1 .
  128. INFO: Database RDBMS DST version is DSTv14 .
  129. INFO: No known issues detected.
  130. INFO: Now detecting new RDBMS DST version.
  131. A prepare window has been successfully started.
  132. INFO: Newest RDBMS DST version detected is DSTv26 .
  133. INFO: Next step is checking all TSTZ data.
  134. INFO: It might take a while before any further output is seen ...
  135. A prepare window has been successfully ended.
  136. INFO: A newer RDBMS DST version than the one currently used is found.
  137. INFO: Note that NO DST update was yet done.
  138. INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update.
  139. INFO: Note that the upg_tzv_apply.sql script will
  140. INFO: restart the database 2 times WITHOUT any confirmation or prompt.
  141. SQL> @/home/oracle/DBMS_DST_scriptsV1.9/upg_tzv_apply.sql
  142. INFO: If an ERROR occurs the script will EXIT sqlplus.
  143. INFO: The database RDBMS DST version will be updated to DSTv26 .
  144. WARNING: This script will restart the database 2 times
  145. WARNING: WITHOUT asking ANY confirmation.
  146. WARNING: Hit control-c NOW if this is not intended.
  147. INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
  148. Database closed.
  149. Database dismounted.
  150. ORACLE instance shut down.
  151. ORACLE instance started.
  152. Total System Global Area 830472192 bytes
  153. Fixed Size 8626144 bytes
  154. Variable Size 511705120 bytes
  155. Database Buffers 306184192 bytes
  156. Redo Buffers 3956736 bytes
  157. Database mounted.
  158. Database opened.
  159. INFO: Starting the RDBMS DST upgrade.
  160. INFO: Upgrading all SYS owned TSTZ data.
  161. INFO: It might take time before any further output is seen ...
  162. An upgrade window has been successfully started.
  163. INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
  164. Database closed.
  165. Database dismounted.
  166. ORACLE instance shut down.
  167. ORACLE instance started.
  168. Total System Global Area 830472192 bytes
  169. Fixed Size 8626144 bytes
  170. Variable Size 511705120 bytes
  171. Database Buffers 306184192 bytes
  172. Redo Buffers 3956736 bytes
  173. Database mounted.
  174. Database opened.
  175. INFO: Upgrading all non-SYS TSTZ data.
  176. INFO: It might take time before any further output is seen ...
  177. INFO: Do NOT start any application yet that uses TSTZ data!
  178. INFO: Next is a list of all upgraded tables:
  179. Table list: "IX"."AQ$_ORDERS_QUEUETABLE_L"
  180. Number of failures: 0
  181. Table list: "IX"."AQ$_ORDERS_QUEUETABLE_S"
  182. Number of failures: 0
  183. Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_L"
  184. Number of failures: 0
  185. Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_S"
  186. Number of failures: 0
  187. Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
  188. Number of failures: 0
  189. Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
  190. Number of failures: 0
  191. Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES"
  192. Number of failures: 0
  193. Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES2"
  194. Number of failures: 0
  195. Table list: "APEX_050000"."WWV_FLOW_FEEDBACK"
  196. Number of failures: 0
  197. Table list: "APEX_050000"."WWV_FLOW_FEEDBACK_FOLLOWUP"
  198. Number of failures: 0
  199. Table list: "APEX_050000"."WWV_FLOW_WORKSHEET_NOTIFY"
  200. Number of failures: 0
  201. INFO: Total failures during update of TSTZ data: 0 .
  202. An upgrade window has been successfully ended.
  203. INFO: Your new Server RDBMS DST version is DSTv26 .
  204. INFO: The RDBMS DST update is successfully finished.
  205. INFO: Make sure to exit this sqlplus session.
  206. INFO: Do not use it for timezone related selects.
  207. SQL>

-- 查看time-zone ,正常了 。

  1. SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
  2. FROM DATABASE_PROPERTIES
  3. WHERE PROPERTY_NAME LIKE 'DST_%'
  4. ORDER BY PROPERTY_NAME; 2 3 4
  5. PROPERTY_NAME
  6. --------------------------------------------------------------------------------
  7. VALUE
  8. --------------------------------------------------------------------------------
  9. DST_PRIMARY_TT_VERSION
  10. 26
  11. DST_SECONDARY_TT_VERSION
  12. 0
  13. DST_UPGRADE_STATE
  14. NONE
  15. 3 rows selected.
  16. SQL>

END

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/570051
推荐阅读
相关标签
  

闽ICP备14008679号