由于导出和导入时需要关注索引是否被导入,进行实验。
本实验主要目的是理解content的两个参数项:date_only和metadata_only,其中涉及include。
1.分别使用以下三种方式导出分区表ACTIVE_PARTITION的数据、元数据
expdp scott/scott
directory=HOME_O
dumpfile=scott_expdp1.dmp
logfile=scott_expdp1.log tables=ACTIVE_PARTITION
expdp scott/scott
directory=HOME_O
dumpfile=scott_expdp2.dmp
logfile=scott_expdp2.log tables=ACTIVE_PARTITION content=data_only
expdp scott/scott
directory=HOME_O
dumpfile=scott_expdp3.dmp
logfile=scott_expdp3.log tables=ACTIVE_PARTITION content=metadata_only
[oracle@ogg2 ~]$
expdp scott/scott directory=HOME_O dumpfile=scott_expdp1.dmp logfile=scott_expdp1.log
tables=ACTIVE_PARTITION
Export: Release
11.2.0.1.0 - Production on Mon Mar 9 14:45:17 2015
Copyright (c) 1982,
2009, Oracle and/or its affiliates. All
rights reserved.
Connected to: Oracle
Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the
Partitioning, OLAP, Data Mining and Real Application Testing options
Starting
"SCOTT"."SYS_EXPORT_TABLE_02": scott/******** directory=HOME_O
dumpfile=scott_expdp1.dmp logfile=scott_expdp1.log tables=ACTIVE_PARTITION
Estimate in progress
using BLOCKS method...
Processing object
type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation
using BLOCKS method: 8.5 MB
Processing object
type TABLE_EXPORT/TABLE/TABLE
Processing object
type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object
type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object
type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported
"SCOTT"."ACTIVE_PARTITION":"P5" 5.896 MB 60275 rows
. . exported
"SCOTT"."ACTIVE_PARTITION":"P4" 459.5 KB 5033 rows
. . exported
"SCOTT"."ACTIVE_PARTITION":"P3" 385.1 KB 3834 rows
. . exported
"SCOTT"."ACTIVE_PARTITION":"P1" 280.8 KB 2847 rows
. . exported
"SCOTT"."ACTIVE_PARTITION":"P2" 31.52 KB 226 rows
Master table
"SCOTT"."SYS_EXPORT_TABLE_02" successfully loaded/unloaded
******************************************************************************
Dump file set for
SCOTT.SYS_EXPORT_TABLE_02 is:
/home/oracle/scott_expdp1.dmp
Job
"SCOTT"."SYS_EXPORT_TABLE_02" successfully completed at
14:45:28
[oracle@ogg2 ~]$
expdp scott/scott directory=HOME_O dumpfile=scott_expdp2.dmp logfile=scott_expdp2.log
tables=ACTIVE_PARTITION content=data_only
Export: Release
11.2.0.1.0 - Production on Mon Mar 9 14:45:41 2015
Copyright (c) 1982,
2009, Oracle and/or its affiliates. All
rights reserved.
Connected to: Oracle
Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the
Partitioning, OLAP, Data Mining and Real Application Testing options
Starting
"SCOTT"."SYS_EXPORT_TABLE_02": scott/******** directory=HOME_O
dumpfile=scott_expdp2.dmp logfile=scott_expdp2.log tables=ACTIVE_PARTITION
content=data_only
Estimate in progress
using BLOCKS method...
Processing object
type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation
using BLOCKS method: 8.5 MB
. . exported
"SCOTT"."ACTIVE_PARTITION":"P5" 5.896 MB 60275