Bo's Oracle Station

查看: 1048|回复: 1

11G升级12C最后一个脚本报错

[复制链接]

1

主题

4

帖子

67

积分

注册会员

Rank: 2

积分
67
发表于 2020-8-17 23:28:32 | 显示全部楼层 |阅读模式
本帖最后由 吴旭彪 于 2020-8-17 23:41 编辑
  1. [root@classroom ~]# su - oracle
  2. [oracle@classroom ~]$ . oraenv
  3. ORACLE_SID = [oracle] ? +ASM
  4. The Oracle base remains unchanged with value /u01/app/oracle
  5. [oracle@classroom ~]$ crsctl status res -t
  6. --------------------------------------------------------------------------------
  7. Name           Target  State        Server                   State details      
  8. --------------------------------------------------------------------------------
  9. Local Resources
  10. --------------------------------------------------------------------------------
  11. ora.DATA.dg         ONLINE  ONLINE       classroom                STABLE
  12. ora.FRA.dg          ONLINE  ONLINE       classroom                STABLE
  13. ora.LISTENER.lsnr   ONLINE  ONLINE       classroom                STABLE
  14. ora.asm             ONLINE  ONLINE       classroom                Started,STABLE
  15. ora.ons             OFFLINE OFFLINE      classroom                STABLE
  16. --------------------------------------------------------------------------------
  17. Cluster Resources
  18. --------------------------------------------------------------------------------
  19. ora.cdb1.db              1        OFFLINE OFFLINE                               Instance Shutdown,STABLE
  20. ora.cssd                      1        ONLINE  ONLINE       classroom                STABLE
  21. ora.diskmon              1        OFFLINE OFFLINE                               STABLE
  22. ora.em12rep.db      1        ONLINE  ONLINE       classroom                Open,STABLE
  23. ora.evmd                      1        ONLINE  ONLINE       classroom                STABLE
  24. ora.orcl.db              1        ONLINE  ONLINE       classroom                Open,STABLE
  25. --------------------------------------------------------------------------------
  26. [oracle@classroom ~]$
  27. ########################################################################################################
  28. [oracle@classroom ~]$ . oraenv
  29. ORACLE_SID = [+ASM] ? rcat
  30. The Oracle base remains unchanged with value /u01/app/oracle
  31. [oracle@classroom ~]$ sqlplus / as sysdba
  32. SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 17 22:24:29 2020
  33. Copyright (c) 1982, 2014, Oracle.  All rights reserved.
  34. Connected to an idle instance.
  35. SQL> startup
  36. ORACLE instance started.
  37. Total System Global Area 1610612736 bytes
  38. Fixed Size                    2924928 bytes
  39. Variable Size                 1157631616 bytes
  40. Database Buffers          436207616 bytes
  41. Redo Buffers                   13848576 bytes
  42. Database mounted.
  43. Database opened.
  44. SQL> exit
  45. Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  46. With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
  47. #########################################################################################################
  48. [oracle@classroom ~]$ cd /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin
  49. [oracle@classroom admin]$ pwd
  50. /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin
  51. [oracle@classroom admin]$ ls utlu121s.sql
  52. utlu121s.sql
  53. [oracle@classroom admin]$ sqlplus / as sysdba
  54. SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 17 22:28:52 2020
  55. Copyright (c) 1982, 2014, Oracle.  All rights reserved.
  56. Connected to:
  57. Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  58. With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
  59. SQL> @utlu121s.sql
  60. PL/SQL procedure successfully completed.
  61. PL/SQL procedure successfully completed.
  62. CATCTL REPORT = /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/rcat/upgrade/upg_summary.log
  63. PL/SQL procedure successfully completed.
  64. Oracle Database 12.1 Post-Upgrade Status Tool                08-17-2020 22:29:02
  65. Component                                Current         Version  Elapsed Time
  66. Name                                        Status                Number         HH:MM:SS
  67. Oracle Server                                       UPGRADED              12.1.0.2.0  00:08:38
  68. JServer JAVA Virtual Machine        VALID                      12.1.0.2.0  00:01:44
  69. Oracle Workspace Manager                VALID                      12.1.0.2.0  00:00:45
  70. OLAP Analytic Workspace                 VALID                      12.1.0.2.0  00:00:13
  71. OLAP Catalog                                     OPTION OFF      11.2.0.3.0  00:00:00
  72. Oracle OLAP API                                   VALID                      12.1.0.2.0  00:00:16
  73. Oracle XDK                                                  VALID                      12.1.0.2.0  00:00:32
  74. Oracle Text                                                  VALID                      12.1.0.2.0  00:00:41
  75. Oracle XML Database                                  VALID                      12.1.0.2.0  00:01:26
  76. Oracle Database Java Packages        VALID                      12.1.0.2.0  00:00:09
  77. Oracle Multimedia                                  VALID                      12.1.0.2.0  00:01:51
  78. Spatial                                                UPGRADED              12.1.0.2.0  00:03:44
  79. Oracle Application Express                VALID                     4.2.5.00.08  00:18:22
  80. Final Actions                                                                                                 00:01:23
  81. Post Upgrade                                                                                                 00:02:39
  82. Total Upgrade Time: 00:42:49
  83. PL/SQL procedure successfully completed.
  84. SQL>
  85. SQL> --
  86. SQL> -- Update Summary Table with con_name and endtime.
  87. SQL> --
  88. SQL> UPDATE sys.registry$upg_summary SET reportname = :ReportName,
  89.   2                                       con_name = SYS_CONTEXT('USERENV','CON_NAME'),
  90.   3                                       endtime  = SYSDATE
  91.   4              WHERE con_id = -1;

  92. 1 row updated.
  93. SQL> commit;
  94. Commit complete.
  95. ######################################################################################
  96. [oracle@classroom admin]$ ls catuppst.sql
  97. catuppst.sql
  98. [oracle@classroom admin]$ sqlplus / as sysdba
  99. SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 17 23:10:58 2020
  100. Copyright (c) 1982, 2014, Oracle.  All rights reserved.
  101. Connected to:
  102. Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
  103. With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
  104. SQL> @catuppst.sql
  105. Session altered.
  106. Session altered.
  107. Session altered.
  108. Session altered.
  109. TIMESTAMP
  110. --------------------------------------------------------------------------------
  111. COMP_TIMESTAMP POSTUP_BGN 2020-08-17 23:11:31
  112. TIMESTAMP
  113. --------------------------------------------------------------------------------
  114. COMP_TIMESTAMP CATREQ_BGN 2020-08-17 23:11:31
  115. PL/SQL procedure successfully completed.
  116. catrequtlmg: b_StatEvt           = TRUE
  117. catrequtlmg: b_SelProps    = FALSE
  118. catrequtlmg: b_UpgradeMode = FALSE
  119. catrequtlmg: b_InUtlMig    = FALSE
  120. PL/SQL procedure successfully completed.
  121. PL/SQL procedure successfully completed.
  122. TIMESTAMP
  123. --------------------------------------------------------------------------------
  124. COMP_TIMESTAMP CATREQ_END 2020-08-17 23:11:31
  125. catuppst: Dropping library DBMS_DDL_INTERNAL_LIB
  126. PL/SQL procedure successfully completed.
  127. catuppst: Dropping view _CURRENT_EDITION_OBJ_MIG
  128. PL/SQL procedure successfully completed.
  129. catuppst: Dropping view _ACTUAL_EDITION_OBJ_MIG
  130. PL/SQL procedure successfully completed.
  131. PL/SQL procedure successfully completed.
  132. This script will migrate the Baseline data on a pre-11g database
  133. to the 11g database.
  134. ...                                          ...
  135. ... Completed Moving the Baseline Data          ...
  136. ...                                          ...
  137. ... If there are no Move BL Data messages ...
  138. ... above, then there are no renamed          ...
  139. ... baseline tables in the system.          ...
  140. ...                                          ...
  141. ...                                          ...
  142. ... Completed the Dropping of the          ...
  143. ... Renamed Baseline Tables                  ...
  144. ...                                          ...
  145. ... If there are no Drop Table messages   ...
  146. ... above, then there are no renamed          ...
  147. ... baseline tables in the system.          ...
  148. ...                                          ...
  149. PL/SQL procedure successfully completed.
  150. PL/SQL procedure successfully completed.
  151. 0 rows created.
  152. Commit complete.
  153. Table created.
  154. 2 rows created.
  155. 1 row updated.
  156. 2 rows updated.
  157. 0 rows updated.
  158. Table dropped.
  159. Commit complete.
  160. 0 rows updated.
  161. Commit complete.
  162. 0 rows updated.
  163. Commit complete.
  164. 0 rows updated.
  165. Commit complete.
  166. 0 rows created.
  167. Commit complete.
  168. 0 rows created.
  169. Commit complete.
  170. PL/SQL procedure successfully completed.
  171. PL/SQL procedure successfully completed.
  172. PL/SQL procedure successfully completed.
  173. PL/SQL procedure successfully completed.
  174. PL/SQL procedure successfully completed.
  175. TIMESTAMP
  176. --------------------------------------------------------------------------------
  177. COMP_TIMESTAMP POSTUP_END 2020-08-17 23:11:32
  178. Session altered.
  179. SQL>
  180. #########################################################################################
  181. SQL> @ /u01/app/oracle/cfgtoollogs/rcat/preupgrade/postupgrade_fixups.sql
  182. Post Upgrade Fixup Script Generated on 2020-08-16 02:03:40  Version: 12.1.0.2 Build: 006
  183. Beginning Post-Upgrade Fixups...
  184. **********************************************************************
  185. Check Tag:     OLD_TIME_ZONES_EXIST
  186. Check Summary: Check for use of older timezone data file
  187. Fix Summary:   Update the timezone using the DBMS_DST package after upgrade is complete.
  188. **********************************************************************
  189. Fixup Returned Information:
  190. INFORMATION: --> Older Timezone in use
  191.      Database is using a time zone file older than version 18.
  192.      After the upgrade, it is recommended that DBMS_DST package
  193.      be used to upgrade the 12.1.0.2.0 database time zone version
  194.      to the latest version which comes with the new release.
  195.      Please refer to My Oracle Support note number 977512.1 for details.
  196. **********************************************************************
  197. **********************************************************************
  198. Check Tag:     NOT_UPG_BY_STD_UPGRD
  199. Check Summary: Identify existing components that will NOT be upgraded
  200. Fix Summary:   This fixup does not perform any action.
  201. **********************************************************************
  202. Fixup Returned Information:
  203. This fixup does not perform any action.  
  204. If you want to upgrade those other components, you must do so manually.
  205. **********************************************************************
  206. **********************************************************************
  207.                      [Post-Upgrade Recommendations]
  208. **********************************************************************
  209.                         *****************************************
  210.                         ******** Fixed Object Statistics ********
  211.                         *****************************************
  212. Please create stats on fixed objects two weeks
  213. after the upgrade using the command:
  214.    EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
  215. ^^^ MANUAL ACTION SUGGESTED ^^^
  216.            **************************************************
  217.                 ************* Fixup Summary ************
  218. 2 fixup routines generated INFORMATIONAL messages that should be reviewed.
  219. *************** Post Upgrade Fixup Script Complete ********************
  220. PL/SQL procedure successfully completed.
复制代码



回复

使用道具 举报

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-8-18 10:22:11 | 显示全部楼层
这不算错误,叫你手工执行:EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
课堂中,我也做了这步。

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-23 21:28 , Processed in 0.046101 second(s), 24 queries .

快速回复 返回顶部 返回列表