11.2.0.4升级到12.2.0.1详细步骤

来源:互联网 发布:nginx与phpfpm 编辑:程序博客网 时间:2024/06/15 10:55


Complete checklist for Manual Upgrade for Multitenant Architecture Oracle Databases from 12.1.x.x to 12.2..x.x (文档 ID 2173144.1)
Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 12c Release 2 (12.2) (文档 ID 2173141.1)
Updating the RDBMS DST version in 12c Release 1 (12.1.0.1 and up) using DBMS_DST (文档 ID 1509653.1)


Upgrading Timezone file on Oracle Releases post 12.2.0.1
From 12.2.0.2 onwards, timezone upgrade scripts are included in the target ORACLE_HOME under rdbms/admin directory. Customer can use those files to perform time zone upgrade instead of the ones included in this document. Please refer to Oracle Documentation on how to upgrade a time zone file manually:
Database Globalization Support Guide
Section 4.7.3 Steps to Upgrade Time Zone File and Timestamp with Time Zone Data


http://docs.oracle.com/database/122/NLSPG/datetime-data-types-and-time-zone-support.htm#NLSPG261


1. 查看补丁情况

[oracle@oracle OPatch]$ ./opatch lsinventoryOracle Interim Patch Installer version 11.2.0.3.4Copyright (c) 2012, Oracle Corporation.  All rights reserved.Oracle Home       : /u01/app/oracle/product/11.2.0/db_1Central Inventory : /u01/app/oraInventory   from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version    : 11.2.0.3.4OUI version       : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-16_20-42-36PM_1.logLsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-06-16_20-42-36PM.txt-------------------------------------------------------------------------------Installed Top-level Products (1): Oracle Database 11g                                                  11.2.0.4.0There are 1 products installed in this Oracle Home.There are no Interim patches installed in this Oracle Home.-------------------------------------------------------------------------------OPatch succeeded.

2. 执行预检查脚本

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_SID=orcl11g[oracle@oracle ~]$ cd /u01/app/oracle/product/12.2.0/db_1/rdbms/admin/[oracle@oracle admin]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 16 21:30:55 2017Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> @dbupgdiag.sqlEnter location for Spooled output:Enter value for 1: /tmpJAVAVM TESTING---------------foo===================================Oracle Multimedia/InterMedia status===================================.Oracle Multimedia/interMedia is installed and listed with the following version: 11.2.0.4.0 and status: VALID.Checking for installed Database Schemas...ORDSYS user exists.ORDPLUGINS user exists.MDSYS user exists.SI_INFORMTN_SCHEMA user exists.ORDDATA user exists..Checking for Prerequisite Components...JAVAVM installed and listed as validXDK installed and listed as validXDB installed and listed as validValidating Oracle Multimedia/interMedia...(no output if component status is valid)PL/SQL procedure successfully completed.                            *** End of LogFile ***

3. 检查物化视图刷新是否完成

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

4. 检查数据文件的状态

SQL> col name format a50SQL> select name,status from v$datafile;NAME                                               STATUS-------------------------------------------------- -------/u01/app/oracle/oradata/orcl11g/system01.dbf       SYSTEM/u01/app/oracle/oradata/orcl11g/sysaux01.dbf       ONLINE/u01/app/oracle/oradata/orcl11g/undotbs01.dbf      ONLINE/u01/app/oracle/oradata/orcl11g/users01.dbf        ONLINE4 rows selected.

5. 检查是否存在备份

SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';no rows selected

6. 检查分布式事务

SQL> SELECT * FROM dba_2pc_pending;no rows selected如需处理:SQL> SELECT local_tran_id FROM dba_2pc_pending;SQL> EXECUTE dbms_transaction.purge_lost_db_entry('');SQL> COMMIT;

7. 清空回收站

SQL> show recyclebinSQL> PURGE DBA_RECYCLEBIN;DBA Recyclebin purged.

8. 收集数据字典的统计信息

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

9. 拷贝pfile到12c目录

SQL> create pfile from spfile;File created.[oracle@oracle admin]$ cd /u01/app/oracle/product/11.2.0/db_1/dbs/[oracle@oracle dbs]$ lltotal 24-rw-rw----. 1 oracle oinstall 1544 Jun 16 20:31 hc_orcl11g.dat-rw-r--r--. 1 oracle oinstall 2851 May 15  2009 init.ora-rw-r--r--. 1 oracle oinstall  937 Jun 16 21:49 initorcl11g.ora-rw-r-----. 1 oracle oinstall   24 Jun 16 20:29 lkORCL11G-rw-r-----. 1 oracle oinstall 1536 Jun 16 20:30 orapworcl11g-rw-r-----. 1 oracle oinstall 2560 Jun 16 21:32 spfileorcl11g.ora[oracle@oracle dbs]$ cp initorcl11g.ora /u01/app/oracle/product/12.2.0/db_1/dbs

10. 停止原11g数据库

[oracle@oracle dbs]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 16 21:52:29 2017Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.

11. 启动12c数据库

[oracle@oracle ~]$ export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1[oracle@oracle dbs]$ cat initorcl11g.ora *.audit_file_dest='/u01/app/oracle/admin/orcl11g/adump'*.audit_trail='db'*.compatible='11.2.0.4.0'*.control_files='/u01/app/oracle/oradata/orcl11g/control01.ctl','/u01/app/oracle/oradata/orcl11g/control02.ctl'*.db_block_size=8192*.db_domain=''*.db_name='orcl11g'*.diagnostic_dest='/u01/app/oracle'*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcl11gXDB)'*.log_archive_dest_1='LOCATION=/arch'*.log_archive_format='%t_%s_%r.dbf'*.open_cursors=300*.pga_aggregate_target=209715200*.processes=150*.remote_login_passwordfile='EXCLUSIVE'*.sga_target=629145600*.undo_tablespace='UNDOTBS1'[oracle@oracle dbs]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Fri Jun 16 21:58:13 2017Copyright (c) 1982, 2016, Oracle.  All rights reserved.Connected to an idle instance.SQL> create spfile from pfile;File created.SQL> startup upgradeORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.Database opened.

12. 运行升级脚本

[oracle@oracle dbs]$ cd ../rdbms/admin/[oracle@oracle admin]$ ll catctl.pl -rw-r--r--. 1 oracle oinstall 333980 Dec 19 19:12 catctl.pl[oracle@oracle admin]$ ll catupgrd.sql -rw-r--r--. 1 oracle oinstall 7357 Dec 21  2015 catupgrd.sql默认并行度为4$ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql或者使用以前的方式,不开并行SQL> @catupgrd.sql PARALLEL=NO

[oracle@oracle admin]$ $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sqlArgument list for [catctl.pl]Run in                c = 0Do not run in         C = 0Input Directory       d = 0Echo OFF              e = 1Simulate              E = 0Forced cleanup        F = 0Log Id                i = 0Child Process         I = 0Log Dir               l = 0Priority List Name    L = 0Upgrade Mode active   M = 0SQL Process Count     n = 0SQL PDB Process Count N = 0Open Mode Normal      o = 0Start Phase           p = 0End Phase             P = 0Reverse Order         r = 0AutoUpgrade Resume    R = 0Script                s = 0Serial Run            S = 0RO User Tablespaces   T = 0Display Phases        y = 0Debug catcon.pm       z = 0Debug catctl.pl       Z = 0catctl.pl VERSION: [12.2.0.1.0]           STATUS: [production]            BUILD: [RDBMS_12.2.0.1.0_LINUX.X64_170125]/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/orahome = [/u01/app/oracle/product/12.2.0/db_1]/u01/app/oracle/product/12.2.0/db_1/bin/orabasehome = [/u01/app/oracle/product/12.2.0/db_1]catctlGetOrabase = [/u01/app/oracle/product/12.2.0/db_1]Analyzing file /u01/app/oracle/product/12.2.0/db_1/rdbms/admin/catupgrd.sqlLog file directory = [/tmp/cfgtoollogs/upgrade20170616220804]catcon: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20170616220804/catupgrd_catcon_11069.lst]catcon: See [/tmp/cfgtoollogs/upgrade20170616220804/catupgrd*.log] files for output generated by scriptscatcon: See [/tmp/cfgtoollogs/upgrade20170616220804/catupgrd_*.lst] files for spool files, if anyNumber of Cpus        = 1Database Name         = orcl11gDataBase Version      = 11.2.0.4.0catcon: ALL catcon-related output will be written to [/u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805/catupgrd_catcon_11069.lst]catcon: See [/u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805/catupgrd*.log] files for output generated by scriptscatcon: See [/u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805/catupgrd_*.lst] files for spool files, if anyLog file directory = [/u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805]Parallel SQL Process Count            = 4Components in [orcl11g]    Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT EM JAVAVM ORDIM OWM SDO XDB XML XOQ]Not Installed [DV MGW ODM OLS RAC WK]------------------------------------------------------Phases [0-115]         Start Time:[2017_06_16 22:08:05]------------------------------------------------------***********   Executing Change Scripts   ***********Serial   Phase #:0    [orcl11g] Files:1    Time: 86s***************   Catalog Core SQL   ***************Serial   Phase #:1    [orcl11g] Files:5    Time: 44sRestart  Phase #:2    [orcl11g] Files:1    Time: 1s***********   Catalog Tables and Views   ***********Parallel Phase #:3    [orcl11g] Files:19   Time: 17sRestart  Phase #:4    [orcl11g] Files:1    Time: 0s*************   Catalog Final Scripts   ************Serial   Phase #:5    [orcl11g] Files:6    Time: 15s*****************   Catproc Start   ****************Serial   Phase #:6    [orcl11g] Files:1    Time: 11s*****************   Catproc Types   ****************Serial   Phase #:7    [orcl11g] Files:2    Time: 11sRestart  Phase #:8    [orcl11g] Files:1    Time: 0s****************   Catproc Tables   ****************Parallel Phase #:9    [orcl11g] Files:69   Time: 43sRestart  Phase #:10   [orcl11g] Files:1    Time: 1s*************   Catproc Package Specs   ************Serial   Phase #:11   [orcl11g] Files:1    Time: 34sRestart  Phase #:12   [orcl11g] Files:1    Time: 1s**************   Catproc Procedures   **************Parallel Phase #:13   [orcl11g] Files:97   Time: 16sRestart  Phase #:14   [orcl11g] Files:1    Time: 0sParallel Phase #:15   [orcl11g] Files:118  Time: 18sRestart  Phase #:16   [orcl11g] Files:1    Time: 0sSerial   Phase #:17   [orcl11g] Files:13   Time: 2sRestart  Phase #:18   [orcl11g] Files:1    Time: 0s*****************   Catproc Views   ****************Parallel Phase #:19   [orcl11g] Files:33   Time: 33sRestart  Phase #:20   [orcl11g] Files:1    Time: 1sSerial   Phase #:21   [orcl11g] Files:3    Time: 5sRestart  Phase #:22   [orcl11g] Files:1    Time: 0sParallel Phase #:23   [orcl11g] Files:24   Time: 116sRestart  Phase #:24   [orcl11g] Files:1    Time: 0sParallel Phase #:25   [orcl11g] Files:11   Time: 38sRestart  Phase #:26   [orcl11g] Files:1    Time: 0sSerial   Phase #:27   [orcl11g] Files:1    Time: 0sSerial   Phase #:28   [orcl11g] Files:3    Time: 2sSerial   Phase #:29   [orcl11g] Files:1    Time: 0sRestart  Phase #:30   [orcl11g] Files:1    Time: 1s***************   Catproc CDB Views   **************Serial   Phase #:31   [orcl11g] Files:1    Time: 0sRestart  Phase #:32   [orcl11g] Files:1    Time: 0sSerial   Phase #:34   [orcl11g] Files:1    Time: 0s*****************   Catproc PLBs   *****************Serial   Phase #:35   [orcl11g] Files:283  Time: 15sSerial   Phase #:36   [orcl11g] Files:1    Time: 0sRestart  Phase #:37   [orcl11g] Files:1    Time: 0sSerial   Phase #:38   [orcl11g] Files:1    Time: 3sRestart  Phase #:39   [orcl11g] Files:1    Time: 0s***************   Catproc DataPump   ***************Serial   Phase #:40   [orcl11g] Files:3    Time: 39sRestart  Phase #:41   [orcl11g] Files:1    Time: 0s******************   Catproc SQL   *****************Parallel Phase #:42   [orcl11g] Files:13   Time: 52sRestart  Phase #:43   [orcl11g] Files:1    Time: 0sParallel Phase #:44   [orcl11g] Files:12   Time: 16sRestart  Phase #:45   [orcl11g] Files:1    Time: 0sParallel Phase #:46   [orcl11g] Files:2    Time: 1sRestart  Phase #:47   [orcl11g] Files:1    Time: 0s*************   Final Catproc scripts   ************Serial   Phase #:48   [orcl11g] Files:1    Time: 5sRestart  Phase #:49   [orcl11g] Files:1    Time: 0s**************   Final RDBMS scripts   *************Serial   Phase #:50   [orcl11g] Files:1    Time: 19s************   Upgrade Component Start   ***********Serial   Phase #:51   [orcl11g] Files:1    Time: 1sRestart  Phase #:52   [orcl11g] Files:1    Time: 0s****************   Upgrading Java   ****************Serial   Phase #:53   [orcl11g] Files:1    Time: 235sRestart  Phase #:54   [orcl11g] Files:1    Time: 0s*****************   Upgrading XDK   ****************Serial   Phase #:55   [orcl11g] Files:1    Time: 28sRestart  Phase #:56   [orcl11g] Files:1    Time: 0s*********   Upgrading APS,OLS,DV,CONTEXT   *********Serial   Phase #:57   [orcl11g] Files:1    Time: 52s*****************   Upgrading XDB   ****************Restart  Phase #:58   [orcl11g] Files:1    Time: 0sSerial   Phase #:60   [orcl11g] Files:3    Time: 18sSerial   Phase #:61   [orcl11g] Files:3    Time: 4sParallel Phase #:62   [orcl11g] Files:9    Time: 2sParallel Phase #:63   [orcl11g] Files:24   Time: 4sSerial   Phase #:64   [orcl11g] Files:4    Time: 5sSerial   Phase #:65   [orcl11g] Files:1    Time: 0sSerial   Phase #:66   [orcl11g] Files:30   Time: 3sSerial   Phase #:67   [orcl11g] Files:1    Time: 0sParallel Phase #:68   [orcl11g] Files:6    Time: 2sSerial   Phase #:69   [orcl11g] Files:2    Time: 12sSerial   Phase #:70   [orcl11g] Files:3    Time: 51sRestart  Phase #:71   [orcl11g] Files:1    Time: 0s*********   Upgrading CATJAVA,OWM,MGW,RAC   ********Serial   Phase #:72   [orcl11g] Files:1    Time: 78s****************   Upgrading ORDIM   ***************Restart  Phase #:73   [orcl11g] Files:1    Time: 0sSerial   Phase #:75   [orcl11g] Files:1    Time: 0sParallel Phase #:76   [orcl11g] Files:2    Time: 58sSerial   Phase #:77   [orcl11g] Files:1    Time: 49sRestart  Phase #:78   [orcl11g] Files:1    Time: 0sParallel Phase #:79   [orcl11g] Files:2    Time: 10sSerial   Phase #:80   [orcl11g] Files:2    Time: 0s*****************   Upgrading SDO   ****************Restart  Phase #:81   [orcl11g] Files:1    Time: 0sSerial   Phase #:83   [orcl11g] Files:1    Time: 37sSerial   Phase #:84   [orcl11g] Files:1    Time: 1sRestart  Phase #:85   [orcl11g] Files:1    Time: 0sSerial   Phase #:86   [orcl11g] Files:1    Time: 17sRestart  Phase #:87   [orcl11g] Files:1    Time: 0sParallel Phase #:88   [orcl11g] Files:3    Time: 98sRestart  Phase #:89   [orcl11g] Files:1    Time: 0sSerial   Phase #:90   [orcl11g] Files:1    Time: 3sRestart  Phase #:91   [orcl11g] Files:1    Time: 0sSerial   Phase #:92   [orcl11g] Files:1    Time: 2sRestart  Phase #:93   [orcl11g] Files:1    Time: 0sParallel Phase #:94   [orcl11g] Files:4    Time: 65sRestart  Phase #:95   [orcl11g] Files:1    Time: 0sSerial   Phase #:96   [orcl11g] Files:1    Time: 1sRestart  Phase #:97   [orcl11g] Files:1    Time: 0sSerial   Phase #:98   [orcl11g] Files:2    Time: 28sRestart  Phase #:99   [orcl11g] Files:1    Time: 1sSerial   Phase #:100  [orcl11g] Files:1    Time: 0sRestart  Phase #:101  [orcl11g] Files:1    Time: 0s***********   Upgrading Misc. ODM, OLAP   **********Serial   Phase #:102  [orcl11g] Files:1    Time: 21s****************   Upgrading APEX   ****************Restart  Phase #:103  [orcl11g] Files:1    Time: 0sSerial   Phase #:104  [orcl11g] Files:1    Time: 450sRestart  Phase #:105  [orcl11g] Files:1    Time: 1s***********   Final Component scripts    ***********Serial   Phase #:106  [orcl11g] Files:1    Time: 0s*************   Final Upgrade scripts   ************Serial   Phase #:107  [orcl11g] Files:1    Time: 130s**********   End PDB Application Upgrade   *********Serial   Phase #:108  [orcl11g] Files:1    Time: 0s*******************   Migration   ******************Serial   Phase #:109  [orcl11g] Files:1    Time: 36sSerial   Phase #:110  [orcl11g] Files:1    Time: 0sSerial   Phase #:111  [orcl11g] Files:1    Time: 43s*****************   Post Upgrade   *****************Serial   Phase #:112  [orcl11g] Files:1    Time: 439s****************   Summary report   ****************Serial   Phase #:113  [orcl11g] Files:1    Time: 1sSerial   Phase #:114  [orcl11g] Files:1    Time: 0sSerial   Phase #:115  [orcl11g] Files:1     Time: 29s------------------------------------------------------Phases [0-115]         End Time:[2017_06_16 22:52:26]------------------------------------------------------Grand Total Time: 2665s  LOG FILES: (/u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805/catupgrd*.log)Upgrade Summary Report Located in:/u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805/upg_summary.logGrand Total Upgrade Time:    [0d:0h:44m:25s]

13. 重启数据库

[oracle@oracle admin]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Fri Jun 16 22:54:49 2017Copyright (c) 1982, 2016, Oracle.  All rights reserved.Connected to an idle instance.SQL> startupORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.Database opened.

14. 补充脚本

[oracle@oracle admin]$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b catuppst -d '''.''' catuppst.sqlcatcon: ALL catcon-related output will be written to [/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/catuppst_catcon_16736.lst]catcon: See [/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/catuppst*.log] files for output generated by scriptscatcon: See [/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/catuppst_*.lst] files for spool files, if anycatcon.pl: completed successfully

15.编译对象脚本

[oracle@oracle admin]$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sqlcatcon: ALL catcon-related output will be written to [/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/utlrp_catcon_16773.lst]catcon: See [/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/utlrp*.log] files for output generated by scriptscatcon: See [/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/utlrp_*.lst] files for spool files, if anycatcon.pl: completed successfully

16. 预检查修复脚本

How to Download and Run Oracle's Database Pre-Upgrade Utility (文档 ID 884522.1)[root@oracle opt]# unzip preupgrade_12201_cbuild_005.zip Archive:  preupgrade_12201_cbuild_005.zip  inflating: dbms_registry_basic.sql    inflating: dbms_registry_extended.sql    inflating: preupgrade_driver.sql     inflating: preupgrade.jar            inflating: preupgrade_messages.properties    inflating: preupgrade_package.sql  [root@oracle opt]# chown oracle:oinstall dbms_registry_* preupgrade*[root@oracle opt]# cp -rp dbms_registry_* preupgrade* /u01/app/oracle/product/12.2.0/db_1/rdbms/admin/cp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/dbms_registry_basic.sql'? ycp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/dbms_registry_extended.sql'? ycp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/preupgrade_12201_cbuild_005.zip'? ycp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/preupgrade_driver.sql'? ycp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/preupgrade.jar'? ycp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/preupgrade_messages.properties'? ycp: overwrite `/u01/app/oracle/product/12.2.0/db_1/rdbms/admin/preupgrade_package.sql'? y[oracle@oracle db_1]$ $ORACLE_HOME/jdk/bin/java -jar $ORACLE_HOME/rdbms/admin/preupgrade.jarPreupgrade generated files:    /u01/app/oracle/cfgtoollogs/orcl11g/preupgrade/preupgrade.log    /u01/app/oracle/cfgtoollogs/orcl11g/preupgrade/preupgrade_fixups.sql    /u01/app/oracle/cfgtoollogs/orcl11g/preupgrade/postupgrade_fixups.sql[oracle@oracle db_1]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Jun 17 07:53:25 2017Copyright (c) 1982, 2016, Oracle.  All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> @/u01/app/oracle/cfgtoollogs/orcl11g/preupgrade/postupgrade_fixups.sqlSession altered.PL/SQL procedure successfully completed.PL/SQL procedure successfully completed.Package created.No errors.Package body created.No errors.Package created.No errors.Package body created.No errors.Executing Oracle POST-Upgrade Fixup ScriptAuto-Generated by:       Oracle Preupgrade Script                         Version: 12.2.0.1.0 Build: 5Generated on:            2017-06-17 07:51:12For Source Database:     ORCL11GSource Database Version: 12.2.0.1.0For Upgrade to Version:  12.2.0.1.0                          FixupCheck Name                Status  Further DBA Action----------                ------  ------------------old_time_zones_exist      Failed  Manual fixup recommended.post_dictionary           Passed  Noneupg_by_std_upgrd          Failed  Manual fixup recommended.PL/SQL procedure successfully completed.Session altered.

17. 检查脚本

SQL> @?/rdbms/admin/utlu122s.sqlOracle Database 12.2 Post-Upgrade Status Tool           06-17-2017 07:57:00Component                               Current         Version  Elapsed TimeName                                    Status          Number   HH:MM:SSOracle Server                             VALID      12.2.0.1.0  00:10:42JServer JAVA Virtual Machine              VALID      12.2.0.1.0  00:03:53Oracle Workspace Manager                  VALID      12.2.0.1.0  00:01:07OLAP Analytic Workspace                   VALID      12.2.0.1.0  00:00:19OLAP Catalog                         OPTION OFF      11.2.0.4.0  00:00:00Oracle OLAP API                           VALID      12.2.0.1.0  00:00:13Oracle XDK                                VALID      12.2.0.1.0  00:00:27Oracle Text                               VALID      12.2.0.1.0  00:00:31Oracle XML Database                       VALID      12.2.0.1.0  00:01:40Oracle Database Java Packages             VALID      12.2.0.1.0  00:00:09Oracle Multimedia                         VALID      12.2.0.1.0  00:01:57Spatial                                   VALID      12.2.0.1.0  00:04:11Oracle Application Express                VALID     5.0.4.00.12  00:07:29Final Actions                                                    00:02:46Post Upgrade                                                     00:00:01Post Compile                                                     00:06:36Total Upgrade Time: 00:42:23Database time zone version is 14. It is older than current release timezone version 26. Time zone upgrade is needed using the DBMS_DST package.Summary Report File = /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/orcl11g/upgrade20170616220805/upg_summary.log

18. 检查组件的状态

SQL> set line 200SQL> col COMP_ID format a10SQL> col COMP_NAME format a35SQL> select substr(comp_id,1,15) comp_id,substr(comp_name,1,30)  2  comp_name,substr(version,1,10) version,status  3  from dba_registry order by modified;COMP_ID    COMP_NAME                           VERSION              STATUS---------- ----------------------------------- -------------------- -----------AMD        OLAP Catalog                        11.2.0.4.0           OPTION OFFCATALOG    Oracle Database Catalog Views       12.2.0.1.0           VALIDCATPROC    Oracle Database Packages and T      12.2.0.1.0           VALIDOWM        Oracle Workspace Manager            12.2.0.1.0           VALIDCATJAVA    Oracle Database Java Packages       12.2.0.1.0           VALIDJAVAVM     JServer JAVA Virtual Machine        12.2.0.1.0           VALIDXML        Oracle XDK                          12.2.0.1.0           VALIDCONTEXT    Oracle Text                         12.2.0.1.0           VALIDXDB        Oracle XML Database                 12.2.0.1.0           VALIDORDIM      Oracle Multimedia                   12.2.0.1.0           VALIDAPS        OLAP Analytic Workspace             12.2.0.1.0           VALIDXOQ        Oracle OLAP API                     12.2.0.1.0           VALIDSDO        Spatial                             12.2.0.1.0           VALIDAPEX       Oracle Application Express          5.0.4.00.1           VALID14 rows selected.

19. 检查OPatch的情况

[oracle@oracle db_1]$ cd OPatch/[oracle@oracle OPatch]$ ./opatch lsinventoryOracle Interim Patch Installer version 12.2.0.1.6Copyright (c) 2017, Oracle Corporation.  All rights reserved.Oracle Home       : /u01/app/oracle/product/12.2.0/db_1Central Inventory : /u01/app/oraInventory   from           : /u01/app/oracle/product/12.2.0/db_1/oraInst.locOPatch version    : 12.2.0.1.6OUI version       : 12.2.0.1.4Log file location : /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-17_08-08-09AM_1.logLsinventory Output file location : /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-06-17_08-08-09AM.txt-------------------------------------------------------------------------------Local Machine Information::Hostname: oracleARU platform id: 226ARU platform description:: Linux x86-64Installed Top-level Products (1): Oracle Database 12c                                                  12.2.0.1.0There are 1 products installed in this Oracle Home.There are no Interim patches installed in this Oracle Home.-------------------------------------------------------------------------------OPatch succeeded.

20. 修改ORACLE_HOME,PATH

[oracle@oracle ~]$ cat .bash_profile # .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport ORACLE_BASE=/u01/app/oracle#export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1export PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/bin:$LD_LIBRARY_PATHexport ORACLE_SID=orcl11g#export ORACLE_SID=orcl12cumask 022

21. 检查/etc/oratab

[root@oracle opt]# vi /etc/oratab#orcl11g:/u01/app/oracle/product/11.2.0/db_1:Norcl12c:/u01/app/oracle/product/12.2.0/db_1:N

22. 修改支持扩展数据类型

SQL> show parameter COMPATIBLENAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------compatible                           string      11.2.0.4.0noncdb_compatible                    boolean     FALSESQL> show parameter max_string_sizeNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------max_string_size                      string      STANDARDSQL> alter system set compatible='12.2.0.1.0' scope=spfile;System altered.SQL> alter system set MAX_STRING_SIZE = EXTENDED scope=spfile;System altered.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.ORA-00603: ORACLE server session terminated by fatal errorORA-01092: ORACLE instance terminated. Disconnection forcedORA-14694: database must in UPGRADE mode to begin MAX_STRING_SIZE migrationProcess ID: 24368Session ID: 32 Serial number: 24866SQL> startup upgradeORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.Database opened.SQL> alter system set MAX_STRING_SIZE = EXTENDED;System altered.SQL> @?/rdbms/admin/utl32k.sqlSP2-0042: unknown command "aRem" - rest of line ignored.Session altered.DOC>#######################################################################DOC>#######################################################################DOC>   The following statement will cause an "ORA-01722: invalid number"DOC>   error if the database has not been opened for UPGRADE.DOC>DOC>   Perform a "SHUTDOWN ABORT"  andDOC>   restart using UPGRADE.DOC>#######################################################################DOC>#######################################################################DOC>#no rows selectedDOC>#######################################################################DOC>#######################################################################DOC>   The following statement will cause an "ORA-01722: invalid number"DOC>   error if the database does not have compatible >= 12.0.0DOC>DOC>   Set compatible >= 12.0.0 and retry.DOC>#######################################################################DOC>#######################################################################DOC>#PL/SQL procedure successfully completed.Session altered.1988 rows updated.Commit complete.System altered.PL/SQL procedure successfully completed.Commit complete.System altered.Session altered.Session altered.Table created.Table created.Table created.Table truncated.0 rows created.PL/SQL procedure successfully completed.STARTTIME-------------------------------------------------------------------------------06/17/2017 08:17:22.920635000PL/SQL procedure successfully completed.No errors.PL/SQL procedure successfully completed.Session altered.Session altered.0 rows created.no rows selectedno rows selectedDOC>#######################################################################DOC>#######################################################################DOC>   The following statement will cause an "ORA-01722: invalid number"DOC>   error if we encountered an error while modifying a column toDOC>   account for data type length change as a result of enabling orDOC>   disabling 32k types.DOC>DOC>   Contact Oracle support for assistance.DOC>#######################################################################DOC>#######################################################################DOC>#PL/SQL procedure successfully completed.PL/SQL procedure successfully completed.Commit complete.Package altered.Package altered.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.Database opened.SQL> show parameter COMPATIBLENAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------compatible                           string      12.2.0.1.0noncdb_compatible                    boolean     FALSESQL> show parameter max_string_sizeNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------max_string_size                      string      EXTENDEDSQL>

23. 升级catalog

RMAN客户端版本低的情况下,需要升级
Upgrade catalog

24. 升级timezone

11g本身的timezone是14

SQL> select * from v$timezone_file;FILENAME                VERSION     CON_ID-------------------- ---------- ----------timezlrg_14.dat              14          0SQL> set line 200SQL> col PROPERTY_NAME format a30SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value  2  FROM DATABASE_PROPERTIES  3  WHERE PROPERTY_NAME LIKE 'DST_%'  4  ORDER BY PROPERTY_NAME;PROPERTY_NAME                  VALUE------------------------------ ------------------------------------------------DST_PRIMARY_TT_VERSION         14DST_SECONDARY_TT_VERSION       0DST_UPGRADE_STATE              NONE

[root@oracle opt]# mkdir timezone[root@oracle opt]# mv DBMS_DST_scriptsV1.9.zip timezone/[root@oracle timezone]# unzip DBMS_DST_scriptsV1.9.zip Archive:  DBMS_DST_scriptsV1.9.zip   creating: DBMS_DST_scriptsV1.9/  inflating: DBMS_DST_scriptsV1.9/countstarTSTZ.sql    inflating: DBMS_DST_scriptsV1.9/countstatsTSTZ.sql    inflating: DBMS_DST_scriptsV1.9/upg_tzv_apply.sql    inflating: DBMS_DST_scriptsV1.9/upg_tzv_check.sql  [root@oracle opt]# chown oracle:oinstall -R timezone/[root@oracle DBMS_DST_scriptsV1.9]# lltotal 68-rw-r--r--. 1 oracle oinstall  6294 Jan  8  2015 countstarTSTZ.sql-rw-r--r--. 1 oracle oinstall  6909 Jan  8  2015 countstatsTSTZ.sql-rw-r--r--. 1 oracle oinstall 19502 Aug 22  2014 upg_tzv_apply.sql-rw-r--r--. 1 oracle oinstall 31010 Aug 22  2014 upg_tzv_check.sql

[oracle@oracle DBMS_DST_scriptsV1.9]$ pwd/opt/timezone/DBMS_DST_scriptsV1.9[oracle@oracle DBMS_DST_scriptsV1.9]$ sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Sat Jun 17 09:38:03 2017Copyright (c) 1982, 2016, Oracle.  All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit ProductionSQL> @countstatsTSTZ.sql                                                                         .Amount of TSTZ data using num_rows stats info in DBA_TABLES..For SYS tables first...Note: empty tables are not listed.Stat date  - Owner.Tablename.Columnname - num_rows24/08/2013 - SYS.AQ$_ALERT_QT_S.CREATION_TIME - 324/08/2013 - SYS.AQ$_ALERT_QT_S.DELETION_TIME - 324/08/2013 - SYS.AQ$_ALERT_QT_S.MODIFICATION_TIME - 324/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.CREATION_TIME - 324/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.DELETION_TIME - 324/08/2013 - SYS.AQ$_AQ$_MEM_MC_S.MODIFICATION_TIME - 317/06/2017 - SYS.AQ$_AQ_PROP_TABLE_S.CREATION_TIME - 117/06/2017 - SYS.AQ$_AQ_PROP_TABLE_S.DELETION_TIME - 117/06/2017 - SYS.AQ$_AQ_PROP_TABLE_S.MODIFICATION_TIME - 117/06/2017 - SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.CREATION_TIME - 117/06/2017 - SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.DELETION_TIME - 117/06/2017 - SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.MODIFICATION_TIME - 117/06/2017 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.CREATION_TIME - 117/06/2017 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.DELETION_TIME - 117/06/2017 - SYS.AQ$_ORA$PREPLUGIN_BACKUP_QTB_S.MODIFICATION_TIME - 117/06/2017 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.CREATION_TIME - 317/06/2017 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.DELETION_TIME - 317/06/2017 - SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.MODIFICATION_TIME - 317/06/2017 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.CREATION_TIME - 117/06/2017 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.DELETION_TIME - 117/06/2017 - SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.MODIFICATION_TIME - 117/06/2017 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.CREATION_TIME - 117/06/2017 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.DELETION_TIME - 117/06/2017 - SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.MODIFICATION_TIME - 117/06/2017 - SYS.AQ$_SUBSCRIBER_TABLE.CREATION_TIME - 117/06/2017 - SYS.AQ$_SUBSCRIBER_TABLE.DELETION_TIME - 117/06/2017 - SYS.AQ$_SUBSCRIBER_TABLE.MODIFICATION_TIME - 117/06/2017 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.CREATION_TIME - 417/06/2017 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.DELETION_TIME - 417/06/2017 - SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.MODIFICATION_TIME - 417/06/2017 - SYS.KET$_AUTOTASK_STATUS.ABA_START_TIME - 117/06/2017 - SYS.KET$_AUTOTASK_STATUS.ABA_STATE_TIME - 117/06/2017 - SYS.KET$_AUTOTASK_STATUS.MW_RECORD_TIME - 117/06/2017 - SYS.KET$_AUTOTASK_STATUS.MW_START_TIME - 117/06/2017 - SYS.KET$_AUTOTASK_STATUS.RECONCILE_TIME - 117/06/2017 - SYS.KET$_CLIENT_CONFIG.FIELD_2 - 717/06/2017 - SYS.KET$_CLIENT_CONFIG.LAST_CHANGE - 717/06/2017 - SYS.KET$_CLIENT_TASKS.CURR_WIN_START - 317/06/2017 - SYS.KET$_CLIENT_TASKS.LG_DATE - 317/06/2017 - SYS.KET$_CLIENT_TASKS.LT_DATE - 317/06/2017 - SYS.OPTSTAT_HIST_CONTROL$.SPARE6 - 3917/06/2017 - SYS.OPTSTAT_HIST_CONTROL$.SVAL2 - 3917/06/2017 - SYS.OPTSTAT_SNAPSHOT$.TIMESTAMP - 556617/06/2017 - SYS.OPTSTAT_USER_PREFS$.CHGTIME - 3517/06/2017 - SYS.RADM_FPTM$.TSWTZ_COL - 117/06/2017 - SYS.REG$.NTFN_GROUPING_START_TIME - 217/06/2017 - SYS.REG$.REG_TIME - 217/06/2017 - SYS.SCHEDULER$_EVENT_LOG.LOG_DATE - 29617/06/2017 - SYS.SCHEDULER$_GLOBAL_ATTRIBUTE.ATTR_TSTAMP - 1117/06/2017 - SYS.SCHEDULER$_JOB.END_DATE - 2817/06/2017 - SYS.SCHEDULER$_JOB.LAST_ENABLED_TIME - 2817/06/2017 - SYS.SCHEDULER$_JOB.LAST_END_DATE - 2817/06/2017 - SYS.SCHEDULER$_JOB.LAST_START_DATE - 2817/06/2017 - SYS.SCHEDULER$_JOB.NEXT_RUN_DATE - 2817/06/2017 - SYS.SCHEDULER$_JOB.START_DATE - 2817/06/2017 - SYS.SCHEDULER$_JOB_RUN_DETAILS.LOG_DATE - 19017/06/2017 - SYS.SCHEDULER$_JOB_RUN_DETAILS.REQ_START_DATE - 19017/06/2017 - SYS.SCHEDULER$_JOB_RUN_DETAILS.START_DATE - 19017/06/2017 - SYS.SCHEDULER$_SCHEDULE.END_DATE - 417/06/2017 - SYS.SCHEDULER$_SCHEDULE.REFERENCE_DATE - 417/06/2017 - SYS.SCHEDULER$_WINDOW.ACTUAL_START_DATE - 917/06/2017 - SYS.SCHEDULER$_WINDOW.END_DATE - 917/06/2017 - SYS.SCHEDULER$_WINDOW.LAST_START_DATE - 917/06/2017 - SYS.SCHEDULER$_WINDOW.MANUAL_OPEN_TIME - 917/06/2017 - SYS.SCHEDULER$_WINDOW.NEXT_START_DATE - 917/06/2017 - SYS.SCHEDULER$_WINDOW.START_DATE - 917/06/2017 - SYS.STATS_TARGET$.END_TIME - 169817/06/2017 - SYS.STATS_TARGET$.START_TIME - 169817/06/2017 - SYS.TAB_STATS$.SPARE6 - 111717/06/2017 - SYS.WRI$_ALERT_HISTORY.CREATION_TIME - 2317/06/2017 - SYS.WRI$_ALERT_HISTORY.TIME_SUGGESTED - 2317/06/2017 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SAVTIME - 4276217/06/2017 - SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SPARE6 - 4276217/06/2017 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SAVTIME - 5614817/06/2017 - SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SPARE6 - 5614817/06/2017 - SYS.WRI$_OPTSTAT_IND_HISTORY.SAVTIME - 368617/06/2017 - SYS.WRI$_OPTSTAT_IND_HISTORY.SPARE6 - 368617/06/2017 - SYS.WRI$_OPTSTAT_OPR.END_TIME - 13417/06/2017 - SYS.WRI$_OPTSTAT_OPR.SPARE6 - 13417/06/2017 - SYS.WRI$_OPTSTAT_OPR.START_TIME - 13417/06/2017 - SYS.WRI$_OPTSTAT_OPR_TASKS.END_TIME - 742217/06/2017 - SYS.WRI$_OPTSTAT_OPR_TASKS.SPARE6 - 742217/06/2017 - SYS.WRI$_OPTSTAT_OPR_TASKS.START_TIME - 742217/06/2017 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SAVTIME - 370517/06/2017 - SYS.WRI$_OPTSTAT_TAB_HISTORY.SPARE6 - 370517/06/2017 - SYS.XS$PRIN.END_DATE - 1517/06/2017 - SYS.XS$PRIN.START_DATE - 15Total numrow of SYS TSTZ columns is : 246735There are in total 154 non-SYS TSTZ columns..For non-SYS tables ...Note: empty tables are not listed.Stat date  - Owner.Tablename.Columnname - num_rows17/06/2017 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.CREATION_TIME - 117/06/2017 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.DELETION_TIME - 117/06/2017 - GSMADMIN_INTERNAL.AQ$_CHANGE_LOG_QUEUE_TABLE_S.MODIFICATION_TIME -117/06/2017 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.CREATION_TIME - 117/06/2017 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.DELETION_TIME - 117/06/2017 - WMSYS.AQ$_WM$EVENT_QUEUE_TABLE_S.MODIFICATION_TIME - 117/06/2017 - WMSYS.WM$WORKSPACES_TABLE$.CREATETIME - 117/06/2017 - WMSYS.WM$WORKSPACES_TABLE$.LAST_CHANGE - 1Total numrow of non-SYS TSTZ columns is : 8There are in total 24 non-SYS TSTZ columns.Total Minutes elapsed : 0

SQL> @upg_tzv_check.sqlINFO: Starting with RDBMS DST update preparation.INFO: NO actual RDBMS DST update will be done by this script.INFO: If an ERROR occurs the script will EXIT sqlplus.INFO: Doing checks for known issues ...INFO: Database version is 12.2.0.1 .INFO: Database RDBMS DST version is DSTv14 .INFO: No known issues detected.INFO: Now detecting new RDBMS DST version.A prepare window has been successfully started.INFO: Newest RDBMS DST version detected is DSTv26 .INFO: Next step is checking all TSTZ data.INFO: It might take a while before any further output is seen ...A prepare window has been successfully ended.INFO: A newer RDBMS DST version than the one currently used is found.INFO: Note that NO DST update was yet done.INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update.INFO: Note that the upg_tzv_apply.sql script willINFO: restart the database 2 times WITHOUT any confirmation or prompt.

SQL> @upg_tzv_apply.sqlINFO: If an ERROR occurs the script will EXIT sqlplus.INFO: The database RDBMS DST version will be updated to DSTv26 .WARNING: This script will restart the database 2 timesWARNING: WITHOUT asking ANY confirmation.WARNING: Hit control-c NOW if this is not intended.INFO: Restarting the database in UPGRADE mode to start the DST upgrade.Database closed.Database dismounted.ORACLE instance shut down.ORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.Database opened.INFO: Starting the RDBMS DST upgrade.INFO: Upgrading all SYS owned TSTZ data.INFO: It might take time before any further output is seen ...An upgrade window has been successfully started.INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.Database closed.Database dismounted.ORACLE instance shut down.ORACLE instance started.Total System Global Area  629145600 bytesFixed Size                  8623832 bytesVariable Size             234883368 bytesDatabase Buffers          381681664 bytesRedo Buffers                3956736 bytesDatabase mounted.Database opened.INFO: Upgrading all non-SYS TSTZ data.INFO: It might take time before any further output is seen ...INFO: Do NOT start any application yet that uses TSTZ data!INFO: Next is a list of all upgraded tables:Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"Number of failures: 0Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"Number of failures: 0Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES"Number of failures: 0Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES2"Number of failures: 0Table list: "APEX_050000"."WWV_FLOW_FEEDBACK"Number of failures: 0Table list: "APEX_050000"."WWV_FLOW_FEEDBACK_FOLLOWUP"Number of failures: 0Table list: "APEX_050000"."WWV_FLOW_WORKSHEET_NOTIFY"Number of failures: 0INFO: Total failures during update of TSTZ data: 0 .An upgrade window has been successfully ended.INFO: Your new Server RDBMS DST version is DSTv26 .INFO: The RDBMS DST update is successfully finished.INFO: Make sure to exit this sqlplus session.INFO: Do not use it for timezone related selects.

SQL> select * from v$timezone_file;FILENAME                VERSION     CON_ID-------------------- ---------- ----------timezlrg_26.dat              26          0SQL> set line 200SQL> col PROPERTY_NAME format a30SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value  2  FROM DATABASE_PROPERTIES  3  WHERE PROPERTY_NAME LIKE 'DST_%'  4  ORDER BY PROPERTY_NAME;PROPERTY_NAME                  VALUE------------------------------ ------------------------------------------------DST_PRIMARY_TT_VERSION         26DST_SECONDARY_TT_VERSION       0DST_UPGRADE_STATE              NONE

阅读全文
0 0
原创粉丝点击