签到成功

知道了

CNDBA社区CNDBA社区

Oracle 传输表空间(TTS) 对timezone version 的要求说明

2021-02-06 18:51 2320 0 原创 Oracle 19c
作者: dave

在之前的博客中我们演示了TTS的相关操作,如下:http://www.cndba.cn/cndba/dave/article/4398

Oracle 11g 单实例 TTS(异构平台传输表空间) 操作示例
https://www.cndba.cn/dave/article/4392
Oracle TTS异构平台传输表空间 [单实例(11.2.0.4) —> RAC(18.4) PDB迁移] 操作示例
https://www.cndba.cn/dave/article/4394
Oracle TTS异构平台传输表空间[RAC(18.4) PDB —> 单实例(11.2.0.4) 迁移] 操作示例
https://www.cndba.cn/dave/article/4396
Oracle 传输表空间(TTS) 的限制与局限性
https://www.cndba.cn/dave/article/4390http://www.cndba.cn/cndba/dave/article/4398

TTS 除了对IOT、系统表空间、SYS用户的对象不支持外,对timezone version也有要求。 根据目前的官方文档的说明,使用TTS时,必须要求源端和目标端的time zone file versions 要保持一致。

1)如果源库版本是12.1.0.1+,当源库和目标库的timezone files 不一致时,impdp 不会失败,但是包含TSLTZ数据的表不会被传输。
2)如果源库版本在11.2.0.2和12.1.0.1, 只要求传输集种包含TIMESTAMP WITH TIMEZONE (TSTZ)的表与目标端的time zone file version一致即可。
3)如果目标库版本小于11.2.0.2,那么源库和目标库的time zone file version必须完全一致,否则impdp 直接失败(ORA-39322),不会导入任何数据。

ORA-39002: invalid operation
ORA-39322: Cannot use transportabletablespace with timestamp with timezone columns and different timezone version.http://www.cndba.cn/cndba/dave/article/4398

Oracle TTS ORA-39322: Cannot use transportable tablespace with different timezone version 说明
https://www.cndba.cn/Dave/article/476http://www.cndba.cn/cndba/dave/article/4398

可以使用如下SQL 查询数据库的time zone file version:http://www.cndba.cn/cndba/dave/article/4398http://www.cndba.cn/cndba/dave/article/4398

[dave@www.cndba.cn ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Feb 6 18:41:36 2021

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> SELECT VERSION FROM V$TIMEZONE_FILE;

   VERSION
----------
        14

查看包含Time Zone (TSTZ)列的对象:http://www.cndba.cn/cndba/dave/article/4398

SQL> select c.owner || '.' || c.table_name || '(' || c.column_name || ') -' || c.data_type || ' ' col 
from dba_tab_cols c, dba_objects o 
where c.data_type like '%WITH TIME ZONE' 
and c.owner=o.owner 
and c.table_name = o.object_name 
and o.object_type = 'TABLE' 
order by col
/

COL
--------------------------------------------------------------------------------
DBSNMP.MGMT_DB_FEATURE_LOG(LAST_UPDATE_DATE) -TIMESTAMP(6) WITH TIME ZONE
SQLTXPLAIN.SQLT$_DBA_COL_STATS_VERSIONS(SAVE_TIME) -TIMESTAMP(6) WITH TIME ZONE
SQLTXPLAIN.SQLT$_DBA_COL_STATS_VERSIONS(SPARE6) -TIMESTAMP(6) WITH TIME ZONE
SQLTXPLAIN.SQLT$_DBA_HISTGRM_STATS_VERSN(SAVE_TIME) -TIMESTAMP(6) WITH TIME ZONE
……

这里的相关缩写说明如下:

TZ: TimeZone
TSTZ: TimeStamp with Time Zone
TSLTZ: TimeStamp with Local Time Zone
OJVM: Oracle Java Virtual Machine

如果在使用TTS的过程中遇到了time zone file versions不一致的问题,解决方法有2个:

1)创建新的目标库时使用和源库一样的timezone
2)升级源库的timezone和目标库一致。

具体操作参考MOS:

http://www.cndba.cn/cndba/dave/article/4398

Data Pump TTS Import Fails With ORA-39002 And ORA-39322 Due To TIMEZONE Conflict (Doc ID 1275433.1)
Updated DST Transitions and New Time Zones in Oracle RDBMS and OJVM Time Zone File Patches (Doc ID 412160.1)http://www.cndba.cn/cndba/dave/article/4398

http://www.cndba.cn/cndba/dave/article/4398

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2283
    原创
  • 3
    翻译
  • 579
    转载
  • 196
    评论
  • 访问:8173697次
  • 积分:4428
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ