在之前的博客中我们演示了TTS的相关操作,如下:
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/4390
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.Oracle TTS ORA-39322: Cannot use transportable tablespace with different timezone version 说明
https://www.cndba.cn/Dave/article/476
可以使用如下SQL 查询数据库的time zone file version:
[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)列的对象:
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:
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)
版权声明:本文为博主原创文章,未经博主允许不得转载。