【DB】Direct Path EXP Corrupts The Dump If An Empty Table Partition Exists
簡介:透過exp DIRECT=y方式匯出有分割槽表的中含有空分割槽表的,匯出檔案是不能用的,無法正確匯入。
適用版本:
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
測試:
點選( 此處)摺疊或開啟
-
SQL
> conn firsouler/firsouler
-
Connected
.
-
SQL
> select
* from tab
;
-
-
no rows selected
-
-
SQL
> create table part001
-
2
(
-
3 col001 number
,
-
4 col002 varchar2
(100
)
-
5
)
-
6 partition by range
(col001
)
-
7
(
-
8 partition p001 values less than
(10
)
,
-
9 partition p002 values less than
(100
)
,
-
10 partition p003 values less than
(1000
)
-
11
)
;
-
-
Table created
.
-
SQL
> insert
into part001 values
(5
,
'Text 5'
)
;
-
insert
into part001 values
(500
,
'Text 500'
)
;
-
commit
;
-
-
1 row created
.
-
-
SQL
>
-
1 row created
.
-
-
SQL
>
-
Commit complete
.
-
- SQL >
匯出:
點選( 此處)摺疊或開啟
-
[oracle@oemtest ~
]
$ exp firsouler/firsouler file
=part001
.dmp tables
=part001 direct
=y
-
-
Export
: Release 11
.2
.0
.4
.0
- Production on Wed Nov 9 14
:16
:16 2016
-
-
Copyright
(c
) 1982
, 2011
, Oracle
and
/
or its affiliates
. All rights reserved
.
-
-
-
Connected to
: Oracle Database 11g Enterprise Edition Release 11
.2
.0
.4
.0
- 64bit Production
-
With the Partitioning
, OLAP
, Data Mining
and Real Application Testing options
-
Export done
in ZHS16GBK character set
and AL16UTF16 NCHAR character set
-
-
About to export specified tables via Direct Path
.
.
.
-
.
. exporting table PART001
-
.
. exporting partition P001 1 rows exported
-
.
. exporting partition P002 0 rows exported
-
.
. exporting partition P003 1 rows exported
- Export terminated successfully without warnings .
匯入報錯:
點選( 此處)摺疊或開啟
-
[oracle@oemtest ~
]
$ imp firsouler/firsouler file
=part001
.dmp full
=y
-
-
Import
: Release 11
.2
.0
.4
.0
- Production on Wed Nov 9 14
:18
:42 2016
-
-
Copyright
(c
) 1982
, 2011
, Oracle
and
/
or its affiliates
. All rights reserved
.
-
-
-
Connected to
: Oracle Database 11g Enterprise Edition Release 11
.2
.0
.4
.0
- 64bit Production
-
With the Partitioning
, OLAP
, Data Mining
and Real Application Testing options
-
-
Export file created by EXPORT
:V11
.02
.00 via direct path
-
import done
in ZHS16GBK character set
and AL16UTF16 NCHAR character set
-
. importing FIRSOULER
's objects into FIRSOULER
-
. importing FIRSOULER's objects
into FIRSOULER
-
.
. importing partition
"PART001"
:
"P001" 1 rows imported
-
.
. importing partition
"PART001"
:
"P002"
-
IMP
-00009
: abnormal end
of export file
-
Import terminated successfully with warnings
.
- [oracle@oemtest ~ ] $
解決方案:
1、檢視匯出檔案
點選( 此處)摺疊或開啟
-
[oracle@oemtest ~
]
$ imp firsouler/firsouler file
=part001
.dmp full
=y show
=y
-
-
Import
: Release 11
.2
.0
.4
.0
- Production on Wed Nov 9 14
:20
:29 2016
-
-
Copyright
(c
) 1982
, 2011
, Oracle
and
/
or its affiliates
. All rights reserved
.
-
-
-
Connected to
: Oracle Database 11g Enterprise Edition Release 11
.2
.0
.4
.0
- 64bit Production
-
With the Partitioning
, OLAP
, Data Mining
and Real Application Testing options
-
-
Export file created by EXPORT
:V11
.02
.00 via direct path
-
import done
in ZHS16GBK character set
and AL16UTF16 NCHAR character set
-
. importing FIRSOULER
's objects into FIRSOULER
-
. importing FIRSOULER's objects
into FIRSOULER
-
"CREATE TABLE "PART001
" ("COL001
" NUMBER, "COL002
" VARCHAR2(100)) PCTFREE 1"
-
"0 PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE "USERS
" PARTITION BY RANGE"
-
" ("COL001
" ) (PARTITION "P001
" VALUES LESS THAN (10) PCTFREE 10 PCTUSED 4"
-
"0 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 8388608 NEXT 1048576 MINEXTENTS 1"
-
" FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS
" LOGG"
-
"ING NOCOMPRESS, PARTITION "P002
" VALUES LESS THAN (100) PCTFREE 10 PCTUSED"
-
" 40 INITRANS 1 MAXTRANS 255 TABLESPACE "USERS
" LOGGING NOCOMPRESS, PARTITIO"
-
"N "P003
" VALUES LESS THAN (1000) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS"
-
" 255 STORAGE(INITIAL 8388608 NEXT 1048576 MINEXTENTS 1 FREELISTS 1 FREELIST"
-
" GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS
" LOGGING NOCOMPRESS )"
-
.
. skipping partition
"PART001"
:
"P001"
-
-
.
. skipping partition
"PART001"
:
"P002"
-
IMP
-00009
: abnormal end
of export file
-
Import terminated successfully with warnings
.
- [oracle@oemtest ~ ] $
2、在使用直接匯出之前,充實空分割槽表
點選( 此處)摺疊或開啟
- exec dbms_space_admin .materialize_deferred_segments (schema_name = > 'FIRSOULER' , table_name = > 'PART001' , partition_name = > 'P002' )
3、使用資料泵方式匯出(expdp)
參考檔案:
- IMPORT FAIL WITH IMP-00051 AND IMP-00008
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29487349/viewspace-2128140/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- db2 partition table testDB2
- 解決direct path read 與 direct path write問題
- partition table and partition indexIndex
- Conventional Path Export和Direct Path ExportExport
- Conventional Path Export Versus Direct Path ExportExport
- expdp = exp + direct mode + parallel ?Parallel
- 拆分Table 為Partition Table
- partition table test
- partition table(1)
- partition table(2)
- When to Partition a Table
- SNMP TABLE ERROR : Requested table is empty or does not existError
- [Oracle] Partition table exchange Heap tableOracle
- ORACLE等待事件:direct path writeOracle事件
- direct-path [insert] parallelParallel
- Oracle Direct-Path InsertOracle
- Oracle 普通table 轉換為partition tableOracle
- create a partition table using a exsit table
- 分割槽表PARTITION table
- direct path read/write等待的分析
- partition table update partition-key result in changing tablespace
- create table if not exists Waiting for table metadata lockAI
- Interval Partition table 11G
- Oracle分割槽表(Partition Table)Oracle
- How to partition a non-partitioned table
- 分割槽表PARTITION table(轉)
- partition table中truncate應用
- direct path read/read temp等待事件事件
- Oracle中的direct path read事件(轉)Oracle事件
- Append與Direct-Path Insert(一)APP
- Append與Direct-Path Insert(二)APP
- 一次direct path read 故障處理
- Kettle Table Exists控制元件優化控制元件優化
- 理解exp, imp 使用direct=y 及imp commit=yMIT
- Oracle direct path read相關隱含引數Oracle
- 【TUNE_ORACLE】等待事件之IO等待“direct path write”Oracle事件
- Oracle常見等待事件之direct path read/writeOracle事件
- 使用Direct-Path INSERT插入資料到表中