当前位置:网站首页>impdp的transform参数的测试

impdp的transform参数的测试

2022-07-07 02:19:00 文档搬运工

场景:
源端有100多个表空间,目标端,导入数据的时候,要建立这么多表空间,或者要remap_tablespace,要写100多个。很麻烦,使用transform参数,可以解决这个问题。
RDBMS 19.15 

help中关于transform的说明:
TRANSFORM
Metadata transform to apply to applicable objects.
Valid keywords are: DISABLE_ARCHIVE_LOGGING, INMEMORY, INMEMORY_CLAUSE,
LOB_STORAGE, OID, PCTSPACE, SEGMENT_ATTRIBUTES, SEGMENT_CREATION,
STORAGE, and TABLE_COMPRESSION_CLAUSE.

官方文档中的说明: 
https://docs.oracle.com/en/database/oracle/oracle-database/19/sutil/datapump-import-utility.html#GUID-64FB67BD-EB67-4F50-A4D2-5D34518E6BDB

--测试
创建测试表 

create table bb.test as select * from dba_tables;

导出该表

expdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=exp_test.log tables =test 

[[email protected] ~]$ expdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=exp_test.log tables =test 

Export: Release 19.0.0.0.0 - Production on Wed Jul 6 11:20:58 2022
Version 19.15.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
FLASHBACK automatically enabled to preserve database integrity.
Starting "BB"."SYS_EXPORT_TABLE_01":  bb/******** directory=dump dumpfile=test.dmp logfile=exp_test.log tables=test 
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 "BB"."TEST"                                 785.8 KB    2208 rows
Master table "BB"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for BB.SYS_EXPORT_TABLE_01 is:
  /u01/dump/test.dmp
Job "BB"."SYS_EXPORT_TABLE_01" successfully completed at Wed Jul 6 11:22:02 2022 elapsed 0 00:00:39

[[email protected] ~]$ 

-- 不加参数transform.查看导入生成的sql语句 ,查看生成的sql语句 ,可以看到sql语句中由storage和tablespace参数  

impdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=imp_no_transform.log sqlfile=no_transform.sql 

[[email protected] ~]$ impdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=imp_no_transform.log sqlfile=no_transform.sql 

Import: Release 19.0.0.0.0 - Production on Wed Jul 6 11:24:50 2022
Version 19.15.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "BB"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
Starting "BB"."SYS_SQL_FILE_FULL_01":  bb/******** directory=dump dumpfile=test.dmp logfile=imp_no_transform.log sqlfile=no_transform.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 "BB"."SYS_SQL_FILE_FULL_01" successfully completed at Wed Jul 6 11:25:07 2022 elapsed 0 00:00:08

[[email protected] ~]$ 
[[email protected] dump]$ more no_transform.sql 
-- CONNECT BB
ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10851 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 "BB"."TEST" 
   (	"OWNER" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
	"TABLE_NAME" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
	"TABLESPACE_NAME" VARCHAR2(30 BYTE), 
	"CLUSTER_NAME" VARCHAR2(128 BYTE), 
	"IOT_NAME" VARCHAR2(128 BYTE), 
	"STATUS" VARCHAR2(8 BYTE), 
	"PCT_FREE" NUMBER, 
	"PCT_USED" NUMBER, 
	"INI_TRANS" NUMBER, 
	"MAX_TRANS" NUMBER, 
	"INITIAL_EXTENT" NUMBER, 
	"NEXT_EXTENT" NUMBER, 
	"MIN_EXTENTS" NUMBER, 
	"MAX_EXTENTS" NUMBER, 
	"PCT_INCREASE" NUMBER, 
	"FREELISTS" NUMBER, 
	"FREELIST_GROUPS" NUMBER, 
	"LOGGING" VARCHAR2(3 BYTE), 
	"BACKED_UP" VARCHAR2(1 BYTE), 
	"NUM_ROWS" NUMBER, 
	"BLOCKS" NUMBER, 
	"EMPTY_BLOCKS" NUMBER, 
	"AVG_SPACE" NUMBER, 
	"CHAIN_CNT" NUMBER, 
	"AVG_ROW_LEN" NUMBER, 
	"AVG_SPACE_FREELIST_BLOCKS" NUMBER, 
	"NUM_FREELIST_BLOCKS" NUMBER, 
	"DEGREE" VARCHAR2(40 BYTE), 
	"INSTANCES" VARCHAR2(40 BYTE), 
	"CACHE" VARCHAR2(20 BYTE), 
	"TABLE_LOCK" VARCHAR2(8 BYTE), 
	"SAMPLE_SIZE" NUMBER, 
	"LAST_ANALYZED" DATE, 
	"PARTITIONED" VARCHAR2(3 BYTE), 
	"IOT_TYPE" VARCHAR2(12 BYTE), 
	"TEMPORARY" VARCHAR2(1 BYTE), 
	"SECONDARY" VARCHAR2(1 BYTE), 
	"NESTED" VARCHAR2(3 BYTE), 
	"BUFFER_POOL" VARCHAR2(7 BYTE), 
	"FLASH_CACHE" VARCHAR2(7 BYTE), 
	"CELL_FLASH_CACHE" VARCHAR2(7 BYTE), 
	"ROW_MOVEMENT" VARCHAR2(8 BYTE), 
	"GLOBAL_STATS" VARCHAR2(3 BYTE), 
	"USER_STATS" VARCHAR2(3 BYTE), 
	"DURATION" VARCHAR2(15 BYTE), 
	"SKIP_CORRUPT" VARCHAR2(8 BYTE), 
	"MONITORING" VARCHAR2(3 BYTE), 
	"CLUSTER_OWNER" VARCHAR2(128 BYTE), 
	"DEPENDENCIES" VARCHAR2(8 BYTE), 
	"COMPRESSION" VARCHAR2(8 BYTE), 
	"COMPRESS_FOR" VARCHAR2(30 BYTE), 
	"DROPPED" VARCHAR2(3 BYTE), 
	"READ_ONLY" VARCHAR2(3 BYTE), 
	"SEGMENT_CREATED" VARCHAR2(3 BYTE), 
	"RESULT_CACHE" VARCHAR2(7 BYTE), 
	"CLUSTERING" VARCHAR2(3 BYTE), 
	"ACTIVITY_TRACKING" VARCHAR2(23 BYTE), 
	"DML_TIMESTAMP" VARCHAR2(25 BYTE), 
	"HAS_IDENTITY" VARCHAR2(3 BYTE), 
	"CONTAINER_DATA" VARCHAR2(3 BYTE), 
	"INMEMORY" VARCHAR2(8 BYTE), 
	"INMEMORY_PRIORITY" VARCHAR2(8 BYTE), 
	"INMEMORY_DISTRIBUTE" VARCHAR2(15 BYTE), 
	"INMEMORY_COMPRESSION" VARCHAR2(17 BYTE), 
	"INMEMORY_DUPLICATE" VARCHAR2(13 BYTE), 
	"DEFAULT_COLLATION" VARCHAR2(100 BYTE), 
	"DUPLICATED" VARCHAR2(1 BYTE), 
	"SHARDED" VARCHAR2(1 BYTE), 
	"EXTERNAL" VARCHAR2(3 BYTE), 
	"HYBRID" VARCHAR2(3 BYTE), 
	"CELLMEMORY" VARCHAR2(24 BYTE), 
	"CONTAINERS_DEFAULT" VARCHAR2(3 BYTE), 
	"CONTAINER_MAP" VARCHAR2(3 BYTE), 
	"EXTENDED_DATA_LINK" VARCHAR2(3 BYTE), 
	"EXTENDED_DATA_LINK_MAP" VARCHAR2(3 BYTE), 
	"INMEMORY_SERVICE" VARCHAR2(12 BYTE), 
	"INMEMORY_SERVICE_NAME" VARCHAR2(1000 BYTE), 
	"CONTAINER_MAP_OBJECT" VARCHAR2(3 BYTE), 
	"MEMOPTIMIZE_READ" VARCHAR2(8 BYTE), 
	"MEMOPTIMIZE_WRITE" VARCHAR2(8 BYTE), 
	"HAS_SENSITIVE_COLUMN" VARCHAR2(3 BYTE), 
	"ADMIT_NULL" VARCHAR2(3 BYTE), 
	"DATA_LINK_DML_ENABLED" VARCHAR2(3 BYTE), 
	"LOGICAL_REPLICATION" VARCHAR2(8 BYTE)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 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" ;
-- new object type path: TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
-- new object type path: TABLE_EXPORT/TABLE/STATISTICS/MARKER
[[email protected] dump]$

-- 加参数transform.   transform=storage:n  查看导入生成的sql语句 ,查看生成的sql语句 ,可以看到sql语句中没有storage参数了 。 

impdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=imp_transform_storage_n.log sqlfile=transform_storage_n.sql transform=storage:n 

[[email protected] dump]$ impdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=imp_transform_storage_n.log sqlfile=transform_storage_n.sql transform=storage:n 

Import: Release 19.0.0.0.0 - Production on Wed Jul 6 11:31:46 2022
Version 19.15.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "BB"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
Starting "BB"."SYS_SQL_FILE_FULL_01":  bb/******** directory=dump dumpfile=test.dmp logfile=imp_transform_storage_n.log sqlfile=transform_storage_n.sql transform=storage:n 
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 "BB"."SYS_SQL_FILE_FULL_01" successfully completed at Wed Jul 6 11:32:01 2022 elapsed 0 00:00:06

[[email protected] dump]$ 
[[email protected] dump]$ more transform_storage_n.sql
-- CONNECT BB
ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10851 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 "BB"."TEST" 
   (	"OWNER" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
	"TABLE_NAME" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
	"TABLESPACE_NAME" VARCHAR2(30 BYTE), 
	"CLUSTER_NAME" VARCHAR2(128 BYTE), 
	"IOT_NAME" VARCHAR2(128 BYTE), 
	"STATUS" VARCHAR2(8 BYTE), 
	"PCT_FREE" NUMBER, 
	"PCT_USED" NUMBER, 
	"INI_TRANS" NUMBER, 
	"MAX_TRANS" NUMBER, 
	"INITIAL_EXTENT" NUMBER, 
	"NEXT_EXTENT" NUMBER, 
	"MIN_EXTENTS" NUMBER, 
	"MAX_EXTENTS" NUMBER, 
	"PCT_INCREASE" NUMBER, 
	"FREELISTS" NUMBER, 
	"FREELIST_GROUPS" NUMBER, 
	"LOGGING" VARCHAR2(3 BYTE), 
	"BACKED_UP" VARCHAR2(1 BYTE), 
	"NUM_ROWS" NUMBER, 
	"BLOCKS" NUMBER, 
	"EMPTY_BLOCKS" NUMBER, 
	"AVG_SPACE" NUMBER, 
	"CHAIN_CNT" NUMBER, 
	"AVG_ROW_LEN" NUMBER, 
	"AVG_SPACE_FREELIST_BLOCKS" NUMBER, 
	"NUM_FREELIST_BLOCKS" NUMBER, 
	"DEGREE" VARCHAR2(40 BYTE), 
	"INSTANCES" VARCHAR2(40 BYTE), 
	"CACHE" VARCHAR2(20 BYTE), 
	"TABLE_LOCK" VARCHAR2(8 BYTE), 
	"SAMPLE_SIZE" NUMBER, 
	"LAST_ANALYZED" DATE, 
	"PARTITIONED" VARCHAR2(3 BYTE), 
	"IOT_TYPE" VARCHAR2(12 BYTE), 
	"TEMPORARY" VARCHAR2(1 BYTE), 
	"SECONDARY" VARCHAR2(1 BYTE), 
	"NESTED" VARCHAR2(3 BYTE), 
	"BUFFER_POOL" VARCHAR2(7 BYTE), 
	"FLASH_CACHE" VARCHAR2(7 BYTE), 
	"CELL_FLASH_CACHE" VARCHAR2(7 BYTE), 
	"ROW_MOVEMENT" VARCHAR2(8 BYTE), 
	"GLOBAL_STATS" VARCHAR2(3 BYTE), 
	"USER_STATS" VARCHAR2(3 BYTE), 
	"DURATION" VARCHAR2(15 BYTE), 
	"SKIP_CORRUPT" VARCHAR2(8 BYTE), 
	"MONITORING" VARCHAR2(3 BYTE), 
	"CLUSTER_OWNER" VARCHAR2(128 BYTE), 
	"DEPENDENCIES" VARCHAR2(8 BYTE), 
	"COMPRESSION" VARCHAR2(8 BYTE), 
	"COMPRESS_FOR" VARCHAR2(30 BYTE), 
	"DROPPED" VARCHAR2(3 BYTE), 
	"READ_ONLY" VARCHAR2(3 BYTE), 
	"SEGMENT_CREATED" VARCHAR2(3 BYTE), 
	"RESULT_CACHE" VARCHAR2(7 BYTE), 
	"CLUSTERING" VARCHAR2(3 BYTE), 
	"ACTIVITY_TRACKING" VARCHAR2(23 BYTE), 
	"DML_TIMESTAMP" VARCHAR2(25 BYTE), 
	"HAS_IDENTITY" VARCHAR2(3 BYTE), 
	"CONTAINER_DATA" VARCHAR2(3 BYTE), 
	"INMEMORY" VARCHAR2(8 BYTE), 
	"INMEMORY_PRIORITY" VARCHAR2(8 BYTE), 
	"INMEMORY_DISTRIBUTE" VARCHAR2(15 BYTE), 
	"INMEMORY_COMPRESSION" VARCHAR2(17 BYTE), 
	"INMEMORY_DUPLICATE" VARCHAR2(13 BYTE), 
	"DEFAULT_COLLATION" VARCHAR2(100 BYTE), 
	"DUPLICATED" VARCHAR2(1 BYTE), 
	"SHARDED" VARCHAR2(1 BYTE), 
	"EXTERNAL" VARCHAR2(3 BYTE), 
	"HYBRID" VARCHAR2(3 BYTE), 
	"CELLMEMORY" VARCHAR2(24 BYTE), 
	"CONTAINERS_DEFAULT" VARCHAR2(3 BYTE), 
	"CONTAINER_MAP" VARCHAR2(3 BYTE), 
	"EXTENDED_DATA_LINK" VARCHAR2(3 BYTE), 
	"EXTENDED_DATA_LINK_MAP" VARCHAR2(3 BYTE), 
	"INMEMORY_SERVICE" VARCHAR2(12 BYTE), 
	"INMEMORY_SERVICE_NAME" VARCHAR2(1000 BYTE), 
	"CONTAINER_MAP_OBJECT" VARCHAR2(3 BYTE), 
	"MEMOPTIMIZE_READ" VARCHAR2(8 BYTE), 
	"MEMOPTIMIZE_WRITE" VARCHAR2(8 BYTE), 
	"HAS_SENSITIVE_COLUMN" VARCHAR2(3 BYTE), 
	"ADMIT_NULL" VARCHAR2(3 BYTE), 
	"DATA_LINK_DML_ENABLED" VARCHAR2(3 BYTE), 
	"LOGICAL_REPLICATION" VARCHAR2(8 BYTE)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
-- new object type path: TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
-- new object type path: TABLE_EXPORT/TABLE/STATISTICS/MARKER
[[email protected] dump]$ 

-- 加参数transform.   segment_attributes:n 查看导入生成的sql语句 ,查看生成的sql语句 , 可以看到,里面没有任何的storeage和tablespce参数了。

impdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=imp_transform_segment_attributes_n.log sqlfile=transform_segment_attributes_n.sql transform=segment_attributes:n 

[[email protected] dump]$ impdp  bb/oracle  directory=dump dumpfile=test.dmp logfile=imp_transform_segment_attributes_n.log sqlfile=transform_segment_attributes_n.sql transform=segment_attributes:n 

Import: Release 19.0.0.0.0 - Production on Wed Jul 6 11:34:47 2022
Version 19.15.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "BB"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
Starting "BB"."SYS_SQL_FILE_FULL_01":  bb/******** directory=dump dumpfile=test.dmp logfile=imp_transform_segment_attributes_n.log sqlfile=transform_segment_attributes_n.sql transform=segment_attributes:n 
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 "BB"."SYS_SQL_FILE_FULL_01" successfully completed at Wed Jul 6 11:35:04 2022 elapsed 0 00:00:08

[[email protected] dump]$ 
[[email protected] dump]$ more transform_segment_attributes_n.sql
-- CONNECT BB
ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10851 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 "BB"."TEST" 
   (	"OWNER" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
	"TABLE_NAME" VARCHAR2(128 BYTE) NOT NULL ENABLE, 
	"TABLESPACE_NAME" VARCHAR2(30 BYTE), 
	"CLUSTER_NAME" VARCHAR2(128 BYTE), 
	"IOT_NAME" VARCHAR2(128 BYTE), 
	"STATUS" VARCHAR2(8 BYTE), 
	"PCT_FREE" NUMBER, 
	"PCT_USED" NUMBER, 
	"INI_TRANS" NUMBER, 
	"MAX_TRANS" NUMBER, 
	"INITIAL_EXTENT" NUMBER, 
	"NEXT_EXTENT" NUMBER, 
	"MIN_EXTENTS" NUMBER, 
	"MAX_EXTENTS" NUMBER, 
	"PCT_INCREASE" NUMBER, 
	"FREELISTS" NUMBER, 
	"FREELIST_GROUPS" NUMBER, 
	"LOGGING" VARCHAR2(3 BYTE), 
	"BACKED_UP" VARCHAR2(1 BYTE), 
	"NUM_ROWS" NUMBER, 
	"BLOCKS" NUMBER, 
	"EMPTY_BLOCKS" NUMBER, 
	"AVG_SPACE" NUMBER, 
	"CHAIN_CNT" NUMBER, 
	"AVG_ROW_LEN" NUMBER, 
	"AVG_SPACE_FREELIST_BLOCKS" NUMBER, 
	"NUM_FREELIST_BLOCKS" NUMBER, 
	"DEGREE" VARCHAR2(40 BYTE), 
	"INSTANCES" VARCHAR2(40 BYTE), 
	"CACHE" VARCHAR2(20 BYTE), 
	"TABLE_LOCK" VARCHAR2(8 BYTE), 
	"SAMPLE_SIZE" NUMBER, 
	"LAST_ANALYZED" DATE, 
	"PARTITIONED" VARCHAR2(3 BYTE), 
	"IOT_TYPE" VARCHAR2(12 BYTE), 
	"TEMPORARY" VARCHAR2(1 BYTE), 
	"SECONDARY" VARCHAR2(1 BYTE), 
	"NESTED" VARCHAR2(3 BYTE), 
	"BUFFER_POOL" VARCHAR2(7 BYTE), 
	"FLASH_CACHE" VARCHAR2(7 BYTE), 
	"CELL_FLASH_CACHE" VARCHAR2(7 BYTE), 
	"ROW_MOVEMENT" VARCHAR2(8 BYTE), 
	"GLOBAL_STATS" VARCHAR2(3 BYTE), 
	"USER_STATS" VARCHAR2(3 BYTE), 
	"DURATION" VARCHAR2(15 BYTE), 
	"SKIP_CORRUPT" VARCHAR2(8 BYTE), 
	"MONITORING" VARCHAR2(3 BYTE), 
	"CLUSTER_OWNER" VARCHAR2(128 BYTE), 
	"DEPENDENCIES" VARCHAR2(8 BYTE), 
	"COMPRESSION" VARCHAR2(8 BYTE), 
	"COMPRESS_FOR" VARCHAR2(30 BYTE), 
	"DROPPED" VARCHAR2(3 BYTE), 
	"READ_ONLY" VARCHAR2(3 BYTE), 
	"SEGMENT_CREATED" VARCHAR2(3 BYTE), 
	"RESULT_CACHE" VARCHAR2(7 BYTE), 
	"CLUSTERING" VARCHAR2(3 BYTE), 
	"ACTIVITY_TRACKING" VARCHAR2(23 BYTE), 
	"DML_TIMESTAMP" VARCHAR2(25 BYTE), 
	"HAS_IDENTITY" VARCHAR2(3 BYTE), 
	"CONTAINER_DATA" VARCHAR2(3 BYTE), 
	"INMEMORY" VARCHAR2(8 BYTE), 
	"INMEMORY_PRIORITY" VARCHAR2(8 BYTE), 
	"INMEMORY_DISTRIBUTE" VARCHAR2(15 BYTE), 
	"INMEMORY_COMPRESSION" VARCHAR2(17 BYTE), 
	"INMEMORY_DUPLICATE" VARCHAR2(13 BYTE), 
	"DEFAULT_COLLATION" VARCHAR2(100 BYTE), 
	"DUPLICATED" VARCHAR2(1 BYTE), 
	"SHARDED" VARCHAR2(1 BYTE), 
	"EXTERNAL" VARCHAR2(3 BYTE), 
	"HYBRID" VARCHAR2(3 BYTE), 
	"CELLMEMORY" VARCHAR2(24 BYTE), 
	"CONTAINERS_DEFAULT" VARCHAR2(3 BYTE), 
	"CONTAINER_MAP" VARCHAR2(3 BYTE), 
	"EXTENDED_DATA_LINK" VARCHAR2(3 BYTE), 
	"EXTENDED_DATA_LINK_MAP" VARCHAR2(3 BYTE), 
	"INMEMORY_SERVICE" VARCHAR2(12 BYTE), 
	"INMEMORY_SERVICE_NAME" VARCHAR2(1000 BYTE), 
	"CONTAINER_MAP_OBJECT" VARCHAR2(3 BYTE), 
	"MEMOPTIMIZE_READ" VARCHAR2(8 BYTE), 
	"MEMOPTIMIZE_WRITE" VARCHAR2(8 BYTE), 
	"HAS_SENSITIVE_COLUMN" VARCHAR2(3 BYTE), 
	"ADMIT_NULL" VARCHAR2(3 BYTE), 
	"DATA_LINK_DML_ENABLED" VARCHAR2(3 BYTE), 
	"LOGICAL_REPLICATION" VARCHAR2(8 BYTE)
   ) ;
-- new object type path: TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
-- new object type path: TABLE_EXPORT/TABLE/STATISTICS/MARKER
[[email protected] dump]$  

总结:
transform=segment_attributes:n , 导入时,不考虑原来表信息中的storage、tablespace参数,对象数据直接导入到用户默认表空间中
transform=storage:n ,导入时,不考虑原来表信息中的storage参数,但是表空间信息依旧存在(导入到原来系统的中存在的表空间中,原来存放在什么表空间中,impdp后还要存在在原来的表空间中)

所以,在针对源端由很多个表空间的时候,导入到目标端,可以使用参数transform=segment_attributes:n。这样就导入到目标端默认的表空间中了。不需要再在目标端建立多个表空间。

昨天,使用remap_tablespace=%:tbs 也成功了。但是建议,还是使用transform参数。
 

END。

原网站

版权声明
本文为[文档搬运工]所创,转载请带上原文链接,感谢
https://oracledocs.blog.csdn.net/article/details/125638495