11g後設資料匯入19c分割槽表建立不成功
11g 後設資料匯入 19c 分割槽表建立不成功
解決方案 1: 用使用者導
解決方案2:去掉 TRANSITION ("PART_01") ,重新匯入
解決方案 3: 匯入全資料
In this Document
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 12.2.0.1 [Release 11.2 to 12.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample or built-in schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.
The following example describes the issue:
- Export the partitioned table with:
> expdp testcase/<PASSWORD> directory=test_dp dumpfile=test2.dmp tables=interval_tab
Export: Release 12.2.0.1.0 - Production on Thu Mar 15 06:24:34 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Starting "TESTCASE"."SYS_EXPORT_TABLE_01": testcase/******** directory=test_dp dumpfile=test2.dmp tables=interval_tab
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "TESTCASE"."INTERVAL_TAB":"SYS_P364" 6.375 KB 2 rows
. . exported "TESTCASE"."INTERVAL_TAB":"PART_01" 6.367 KB 2 rows
Master table "TESTCASE"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
- Import the dumpfile with parameter SQLFILE as below:
> impdp testcase/<PASSWORD> directory=test_dp dumpfile=test2.dmp sqlfile=test.sql
Import: Release 12.2.0.1.0 - Production on Thu Mar 15 06:26:11 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Master table "TESTCASE"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
Starting "TESTCASE"."SYS_SQL_FILE_FULL_01": testcase/******** directory=test_dp dumpfile=test2.dmp sqlfile=test.sql
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Job "TESTCASE"."SYS_SQL_FILE_FULL_01" successfully completed at Thu Mar 15 06:26:15 2018 elapsed 0 00:00:03
- Execute the SQLFILE from the import above:
SQL> @test.sql
Session altered
.....
Session altered.
PARTITION BY RANGE ("CREATED_DATE") INTERVAL (NUMTOYMINTERVAL(1,'MONTH')) TRANSITION ("PART_01")
*
ERROR at line 10:
ORA-00922: missing or invalid option
- Reviewing the generated sqlfile, a transition clause TRANSITION ("PART_01") is used in the DDL statement:
SQL> ! cat test.sql
-- CONNECT TESTCASE
ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
....
ALTER SESSION SET EVENTS '22830 TRACE NAME CONTEXT FOREVER, LEVEL 192 ';
-- new object type path: TABLE_EXPORT/TABLE/TABLE
CREATE TABLE "TESTCASE"."INTERVAL_TAB"
( "ID" NUMBER,
"CODE" VARCHAR2(10 BYTE),
"DESCRIPTION" VARCHAR2(50 BYTE),
"CREATED_DATE" DATE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS"
PARTITION BY RANGE ("CREATED_DATE") INTERVAL (NUMTOYMINTERVAL(1,'MONTH')) TRANSITION ("PART_01")
(PARTITION "PART_01" VALUES LESS THAN (TO_DATE(' 2007-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 8388608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" READ WRITE ,
PARTITION "SYS_P364" VALUES LESS THAN (TO_DATE(' 2007-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) SEGMENT CREATION IMMEDIATE
...
TABLESPACE "USERS" READ WRITE ) ;
- As it can be seen from dbms_metadata.get_ddl output, the transaction clause doesn't exist in the source database:
SQL> Set long 10000000
SQL> Select dbms_metadata.get_ddl('TABLE','INTERVAL_TAB','TESTCASE') FROM DUAL ;
DBMS_METADATA.GET_DDL('TABLE','INTERVAL_TAB','TESTCASE')
--------------------------------------------------------------------------------
CREATE TABLE "TESTCASE"."INTERVAL_TAB"
( "ID" NUMBER,
"CODE" VARCHAR2(10),
"DESCRIPTION" VARCHAR2(50),
"CREATED_DATE" DATE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS"
PARTITION BY RANGE ("CREATED_DATE") INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
(PARTITION "PART_01" VALUES LESS THAN (TO_DATE(' 2007-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) SEGMENT CREATION IMMEDIATE
....
TABLESPACE "USERS" )
- Tracing the error with:
SQL> alter system set events '922 trace name ERRORSTACK level 3';
the generated trace file shows:
--- Error Stack Dump -----
ORA-00922: missing or invalid option
----- SQL Statement (None) -----
Current SQL information unavailable - no cursor.
prspo_partition prspo_one_opt prspo_proc_opts prsctc prscmd prsdrv kksQuickParse kksLoadParentOnLock kglLoadOnLock kgllkal kglLock kglget kkspsc0 kksParseCursor opiosq0 kpooprx
CAUSE
When you add data into the table beyond the range of partition, a new partition is created. The transition keyword specifies the range above which partition intervals will be created so as to enable DataPump to be able to regenerate the DDL.
The issue is under investigation in unpublished Bug 27470663 - ORA-00922 WHILE CREATING INTERVAL PARTITION WITH TRANSITION KEYWORD.
SOLUTION
To avoid the error until the unpublished BUG 27470663 is fixed, use one of below options:
1/ Edit the sqlfile, remove TRANSITION ("PART_01") and run the sqlfile without the transition clause.
- OR -
2/ Use DataPump import utility to load the dumpfile instead of running the create table statement with transition clause manually.
Example: impdp testcase/<PASSWORD> directory=test_dp dumpfile=test2.dmp
Import: Release 12.2.0.1.0 - Production on Thu Mar 15 07:00:01 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Master table "TESTCASE"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "TESTCASE"."SYS_IMPORT_FULL_01": testcase/******** directory=test_dp dumpfile=test2.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "TESTCASE"."INTERVAL_TAB":"SYS_P364" 6.375 KB 2 rows
. . imported "TESTCASE"."INTERVAL_TAB":"PART_01" 6.367 KB 2 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Job "TESTCASE"."SYS_IMPORT_FULL_01" successfully completed at Thu Mar 15 07:00:17 2018 elapsed 0 00:00:16
REFERENCES
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23825935/viewspace-2917313/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 分割槽表之自動增加分割槽(11G)
- [oracle] expdp 匯出分割槽表的分割槽Oracle
- oracle 11g 分割槽表建立(年月日周時分秒)Oracle
- OceaBase 分割槽表建立技巧
- oracle 19C新特性——混合分割槽表Oracle
- 測試分割槽表部分匯出
- Oracle 11g impdp 先資料後索引匯入方法Oracle索引
- 調整分割槽後分割槽不見的資料找到方法
- ORACLE 19c 新特性之混合分割槽表Oracle
- MySQL資料表分割槽手記MySql
- 教程:如何使用DataLakeAnalytics建立分割槽表
- oracle分割槽表和分割槽表exchangeOracle
- ORACLE刪除-表分割槽和資料Oracle
- hive 動態分割槽插入資料表Hive
- 如何使用Data Lake Analytics建立分割槽表
- Oracle 12.2之後ALTER TABLE .. MODIFY轉換非分割槽表為分割槽表Oracle
- oracle分割槽表和非分割槽表exchangeOracle
- 建立sawp分割槽
- MySql建立分割槽MySql
- 將資料匯入kudu表(建立臨時hive表,從hive匯入kudu)步驟Hive
- oracle 更改分割槽表資料 ora-14402Oracle
- Oracle 12.1.0.2 expdp匯出分割槽表資料遇到BUG慢的原因和解決方法Oracle
- 資料庫系統設計:分割槽資料庫
- MySql資料分割槽操作之新增分割槽操作MySql
- PostgreSQL/LightDB 分割槽表之分割槽裁剪SQL
- MySQL分表後原分割槽表處理方案MySql
- PG的非分割槽表線上轉分割槽表
- zabbix上對mysql資料庫做分割槽表MySql資料庫
- Oracle查詢Interval partition分割槽表內資料Oracle
- MySQL的nnodb引擎表資料分割槽儲存MySql
- AppBoxFuture: 大資料表分割槽的3種策略APP大資料
- Excel 表匯入資料Excel
- 【MYSQL】 分割槽表MySql
- 非分割槽錶轉換成分割槽表
- Oracle分割槽表基礎運維-07增加分割槽(3列表分割槽)Oracle運維
- oracle 分割槽表move和包含分割槽表的lob moveOracle
- 移動分割槽表和分割槽索引的表空間索引
- PostgreSQL 原始碼解讀(98)- 分割槽表#4(資料查詢路由#1-“擴充套件”分割槽表)SQL原始碼路由套件