Database time zone version is 18. It is older than current release time zone version 26

Posted 会飞的板儿

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Database time zone version is 18. It is older than current release time zone version 26相关的知识,希望对你有一定的参考价值。

[[email protected] 12.2.0]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 18 16:15:07 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> set serveroutput on
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;

PROPERTY_NAME                VALUE
--------------------------------------------------------------------------------
DST_PRIMARY_TT_VERSION        18
DST_SECONDARY_TT_VERSION    0
DST_UPGRADE_STATE            NONE


SQL> purge dba_recyclebin;

DBA Recyclebin purged.

SQL> TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;

Table truncated.

SQL> TRUNCATE TABLE sys.dst$affected_tables;

Table truncated.

SQL> TRUNCATE TABLE sys.dst$error_table;

Table truncated.

SQL> EXEC DBMS_APPLICATION_INFO.SET_CLIENT_INFO(upg_tzv)

PL/SQL procedure successfully completed.

SQL> alter session set "_with_subquery"=materialize;

Session altered.

SQL> alter session set "_simple_view_merging"=TRUE;

Session altered.

SQL> EXEC DBMS_DST.BEGIN_UPGRADE(26); 
BEGIN DBMS_DST.BEGIN_UPGRADE(26); END;

*
ERROR at line 1:
ORA-56926: database must be in UPGRADE mode in order to start an upgrade window
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DST", line 1241
ORA-06512: at line 1


SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[[email protected] 12.2.0]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 18 16:24:19 2017

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 7.8920E+10 bytes
Fixed Size                 12169704 bytes
Variable Size            7516196376 bytes
Database Buffers         4.5366E+10 bytes
Redo Buffers              256262144 bytes
In-Memory Area           2.5770E+10 bytes
Database mounted.
SQL> alter database open upgrade;

Database altered.

SQL> EXEC DBMS_DST.BEGIN_UPGRADE(26); 

PL/SQL procedure successfully completed.

SQL> SELECT * FROM sys.dst$error_table;

no rows selected

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;

PROPERTY_NAME                VALUE
-------------------------------------
DST_PRIMARY_TT_VERSION        26
DST_SECONDARY_TT_VERSION    18
DST_UPGRADE_STATE            UPGRADE



SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 7.8920E+10 bytes
Fixed Size                 12169704 bytes
Variable Size            7516196376 bytes
Database Buffers         4.5366E+10 bytes
Redo Buffers              256262144 bytes
In-Memory Area           2.5770E+10 bytes
Database mounted.
Database opened.
SQL> SELECT OWNER, TABLE_NAME, UPGRADE_IN_PROGRESS FROM ALL_TSTZ_TABLES where UPGRADE_IN_PROGRESS=YES;
OWNER                     TABLE_NAME                          UPG
------------------------- ----------------------------------- ---
GSMADMIN_INTERNAL         AQ$_CHANGE_LOG_QUEUE_TABLE_S        YES
APEX_040200               WWV_FLOW_DEBUG_MESSAGES2            YES
APEX_040200               WWV_FLOW_WORKSHEET_NOTIFY           YES
APEX_040200               WWV_FLOW_FEEDBACK_FOLLOWUP          YES
APEX_050000               WWV_FLOW_WORKSHEET_NOTIFY           YES
IX                        AQ$_ORDERS_QUEUETABLE_S             YES
IX                        AQ$_ORDERS_QUEUETABLE_L             YES
GSMADMIN_INTERNAL         AQ$_CHANGE_LOG_QUEUE_TABLE_L        YES
APEX_050000               WWV_FLOW_FEEDBACK_FOLLOWUP          YES
APEX_050000               WWV_FLOW_DEBUG_MESSAGES             YES
IX                        AQ$_STREAMS_QUEUE_TABLE_L           YES
APEX_040200               WWV_FLOW_DEBUG_MESSAGES             YES
APEX_050000               WWV_FLOW_FEEDBACK                   YES
IX                        AQ$_STREAMS_QUEUE_TABLE_S           YES
APEX_040200               WWV_FLOW_FEEDBACK                   YES
APEX_050000               WWV_FLOW_DEBUG_MESSAGES2            YES


SQL> alter session set "_with_subquery"=materialize;

Session altered.

SQL> alter session set "_simple_view_merging"=TRUE;

Session altered.

SQL> set serveroutput on
SQL> VAR numfail number
SQL> BEGIN
  2  DBMS_DST.UPGRADE_DATABASE(:numfail,
  3  parallel => TRUE,
  4  log_errors => TRUE,
  5  log_errors_table => SYS.DST$ERROR_TABLE,
  6  log_triggers_table => SYS.DST$TRIGGER_TABLE,
  7  error_on_overlap_time => FALSE,
  8  error_on_nonexisting_time => FALSE);
  9  DBMS_OUTPUT.PUT_LINE(Failures:|| :numfail);
  10 END;
  11  /  
Table list: "APEX_040200"."WWV_FLOW_FEEDBACK"
Number of failures: 0
Table list: "APEX_040200"."WWV_FLOW_DEBUG_MESSAGES2"
Number of failures: 0
Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_S"
Number of failures: 0
Table list: "IX"."AQ$_ORDERS_QUEUETABLE_S"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "APEX_040200"."WWV_FLOW_WORKSHEET_NOTIFY"
Number of failures: 0
Table list: "APEX_050000"."WWV_FLOW_WORKSHEET_NOTIFY"
Number of failures: 0
Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES"
Number of failures: 0
Table list: "APEX_050000"."WWV_FLOW_DEBUG_MESSAGES2"
Number of failures: 0
Table list: "APEX_040200"."WWV_FLOW_DEBUG_MESSAGES"
Number of failures: 0
Table list: "APEX_040200"."WWV_FLOW_FEEDBACK_FOLLOWUP"
Number of failures: 0
Table list: "APEX_050000"."WWV_FLOW_FEEDBACK"
Number of failures: 0
Table list: "APEX_050000"."WWV_FLOW_FEEDBACK_FOLLOWUP"
Number of failures: 0
Table list: "IX"."AQ$_ORDERS_QUEUETABLE_L"
Number of failures: 0
Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_L"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
Failures:0

PL/SQL procedure successfully completed.

SQL> SELECT * FROM sys.dst$error_table;

no rows selected

SQL> VAR fail number
SQL> BEGIN
  2  DBMS_DST.END_UPGRADE(:fail);
  3  DBMS_OUTPUT.PUT_LINE(Failures:|| :fail);
  4  END;
  5  /
An upgrade window has been successfully ended.
Failures:0

PL/SQL procedure successfully completed.

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;

PROPERTY_NAME                VALUE
--------------------------------------------------------------------------------
DST_PRIMARY_TT_VERSION        26
DST_SECONDARY_TT_VERSION    0
DST_UPGRADE_STATE            NONE


SQL> SELECT * FROM v$timezone_file;

FILENAME                VERSION     CON_ID
-------------------- ---------- ----------
timezlrg_26.dat              26          0

 

以上是关于Database time zone version is 18. It is older than current release time zone version 26的主要内容,如果未能解决你的问题,请参考以下文章

解决Database returned an invalid datetime value. Are time zone definitions for your database installed

Database Navigator 使用默认MySQL连接提示:The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or repres

需要 active_support/time_with_zone 后的 Time:Class 的未定义方法`zone`

torndb

在 Rails 中,如何以可与 ActiveSupport::TimeZone[zone].parse() 一起使用的格式获取当前时区 (Time.zone)?

Mysql错误:The server time zone value is unrecognized or represents more than one time zone