转载

Oracle 12cr2 数据库之间传输表,分区或子分区

在Oracle 12cr2中,可以使用传输表功能来从一个数据库中复制一组表,分区或子分区到另一个数据库中。传输表操作将会指定表,分区或子分区的元数据移到另一个数据库中。传输表操作会自动识别所指定表所在的表空间。为了移动数据,需要将这些表所在表空间的所有数据文件复制到目标数据库。Data Pump导入会自动释放由表,分区或子分区所占有的数据块,这些数据块不是传输表操作的一部分。

可以使用以下方法来传输表,分区或子分区:
.使用导出dump文件
在执行导出时,指定tables参数并且设置transportable参数为always。在执行导入时,不需要指定transportable参数。Data Pump导入会自动识别传输表操作。

.跨网络
在执行导入时,指定tables参数并且设置transportable参数为always,并且指定network_link参数来指定数据链路

传输表操作的限制
.不能将相同方案中相同表名的表传输到目标数据库中。然而可以使用remap_table导入参数来将表中的数据导入到不同的表中。另外,在传输操作执行之前,可以重命名被传输表或目标表。

.对于加密有以下限制:
--不能传输加密表空间中的表
--不能包含加密列的表

.不能在使用不同的time zone文件版本的不同平台之间传输使用timestamp with timezone的表

使用导出dump文件方式来传输表,分区,或子分区
在数据库之间使用志出dump文件来传输表需要执行以下步骤。
1.选择一组表,分区或子分区。
如果是要传输分区,那么在传输表操作中可以指定一个表的分区,并且在同一操作中没有其它的表将被传输。如果在传输表操作中中只有表分区的子集被导出,那么在导入后每个分区将变成非分区表。

2.在源数据库中,将要被传输的表,分区或子分区所在表空间设置为只读模式。为了查询表所在的表空间可以查询dba_tables视图,为了查询表空间的所有文件可以查询dba_data_files视图。

3.执行Data Pump导出

4.传输导出的dump文件,将导出的dump文件复制到目标数据库并且让其可以访问。

5.传输表,分区或子分区所在表空间的所有数据文件到目标数据库。如果源平台与目标平台的字节编码不一样,那么可以使用以下任何一种方法来转换数据文件。
--使用dbms_file_transfer包中的get_file或put_file过程来传输数据文件,它们会自动将数据文件转换为目标平台的字节编码。

--使用rman的convert命令来将数据文件转换为目标平台的字节编码。

6.可选操作,将源数据库中的表空间设置为读写模式

7.在目标数据库上执行导入操作

下面的例子将分区表sh.sales_test表中的部分分区(sales_test_q1_2000,sales_test_q2_2000)传输到目标数据库中。源平台与目标平台字节编码一样,都是linux 64位操作系统

1.先创建分区表sales_test

SQL> create tablespace sales_test datafile '+DATADG/jyrac/datafile/sales_test_01.dbf' size 100M  autoextend off  extent management local segment space management auto; Tablespace created  -- Create table create table SH.SALES_TEST (   prod_id       /* NUMBER not null*/,   cust_id       /*NUMBER not null*/,   time_id       /*DATE not null*/,   channel_id    /*NUMBER not null*/,   promo_id      /*NUMBER not null*/,   quantity_sold /*NUMBER(10,2) not null*/,   amount_sold   /*NUMBER(10,2) not null*/ ) partition by range (TIME_ID) (   partition SALES_TEST_1995 values less than (TO_DATE(' 1996-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_1996 values less than (TO_DATE(' 1997-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_H1_1997 values less than (TO_DATE(' 1997-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_H2_1997 values less than (TO_DATE(' 1998-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q1_1998 values less than (TO_DATE(' 1998-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q2_1998 values less than (TO_DATE(' 1998-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q3_1998 values less than (TO_DATE(' 1998-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q4_1998 values less than (TO_DATE(' 1999-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q1_1999 values less than (TO_DATE(' 1999-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q2_1999 values less than (TO_DATE(' 1999-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q3_1999 values less than (TO_DATE(' 1999-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q4_1999 values less than (TO_DATE(' 2000-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q1_2000 values less than (TO_DATE(' 2000-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q2_2000 values less than (TO_DATE(' 2000-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q3_2000 values less than (TO_DATE(' 2000-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q4_2000 values less than (TO_DATE(' 2001-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q1_2001 values less than (TO_DATE(' 2001-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q2_2001 values less than (TO_DATE(' 2001-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q3_2001 values less than (TO_DATE(' 2001-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q4_2001 values less than (TO_DATE(' 2002-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255     storage     (       initial 8M       next 1M       minextents 1       maxextents unlimited     ),   partition SALES_TEST_Q1_2002 values less than (TO_DATE(' 2002-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q2_2002 values less than (TO_DATE(' 2002-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q3_2002 values less than (TO_DATE(' 2002-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q4_2002 values less than (TO_DATE(' 2003-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q1_2003 values less than (TO_DATE(' 2003-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q2_2003 values less than (TO_DATE(' 2003-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q3_2003 values less than (TO_DATE(' 2003-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 0     initrans 1     maxtrans 255,   partition SALES_TEST_Q4_2003 values less than (TO_DATE(' 2004-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))     tablespace SALES_TEST     pctfree 5     initrans 1     maxtrans 255 ) tablespace sales_test as select * from sh.sales; -- Add comments to the table comment on table SH.SALES_TEST   is 'facts table, without a primary key; all rows are uniquely identified by the combination of all foreign keys'; -- Add comments to the columns comment on column SH.SALES_TEST.prod_id   is 'FK to the products dimension table'; comment on column SH.SALES_TEST.cust_id   is 'FK to the customers dimension table'; comment on column SH.SALES_TEST.time_id   is 'FK to the times dimension table'; comment on column SH.SALES_TEST.channel_id   is 'FK to the channels dimension table'; comment on column SH.SALES_TEST.promo_id   is 'promotion identifier, without FK constraint (intentionally) to show outer join optimization'; comment on column SH.SALES_TEST.quantity_sold   is 'product quantity sold with the transaction'; comment on column SH.SALES_TEST.amount_sold   is 'invoiced amount to the customer'; -- Create/Recreate indexes create bitmap index SH.SALES_TEST_CHANNEL_BIX on SH.SALES_TEST (CHANNEL_ID)   nologging  local; create bitmap index SH.SALES_TEST_CUST_BIX on SH.SALES_TEST (CUST_ID)   nologging  local; create bitmap index SH.SALES_TEST_PROD_BIX on SH.SALES_TEST (PROD_ID)   nologging  local; create bitmap index SH.SALES_TEST_PROMO_BIX on SH.SALES_TEST (PROMO_ID)   nologging  local; create bitmap index SH.SALES_TEST_TIME_BIX on SH.SALES_TEST (TIME_ID)   nologging  local; -- Create/Recreate primary, unique and foreign key constraints alter table SH.SALES_TEST   add constraint SALES_TEST_CHANNEL_FK foreign key (CHANNEL_ID)   references SH.CHANNELS (CHANNEL_ID)   novalidate; alter table SH.SALES_TEST   add constraint SALES_TEST_CUSTOMER_FK foreign key (CUST_ID)   references SH.CUSTOMERS (CUST_ID)   novalidate; alter table SH.SALES_TEST   add constraint SALES_TEST_PRODUCT_FK foreign key (PROD_ID)   references SH.PRODUCTS (PROD_ID)   novalidate; alter table SH.SALES_TEST   add constraint SALES_TEST_PROMO_FK foreign key (PROMO_ID)   references SH.PROMOTIONS (PROMO_ID)   novalidate; alter table SH.SALES_TEST   add constraint SALES_TEST_TIME_FK foreign key (TIME_ID)   references SH.TIMES (TIME_ID)   novalidate; 

2.登录到源数据库,将表sh.sales_test所在的表空间设置为只读状态

SQL> alter tablespace sales_test read only; Tablespace altered  SQL> select tablespace_name,status from dba_tablespaces; TABLESPACE_NAME                STATUS ------------------------------ --------- SYSTEM                         ONLINE SYSAUX                         ONLINE UNDOTBS1                       ONLINE TEMP                           ONLINE USERS                          ONLINE UNDOTBS2                       ONLINE EXAMPLE                        ONLINE TEST                           ONLINE SALES_TEST                     READ ONLY 9 rows selected 

3.导出dump文件

SQL> create or replace directory tts_dump as '/tts'; Directory created SQL> grant execute,read,write on directory tts_dump to public; Grant succeeded   [root@jyrac1 ~]# su - oracle [oracle@jyrac1 ~]$ expdp system/xxzx7817600 dumpfile=sales_test.dmp directory=tts_dump tables=sh.sales_test:sales_test_q1_2000,sh.sales_test:sales_test_q2_2000 transportable=always logfile=sales_test.log  Export: Release 11.2.0.4.0 - Production on Tue Jun 6 11:21:02 2017  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, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_TABLE_01":  system/******** dumpfile=sales_test.dmp directory=tts_dump tables=sh.sales_test:sales_test_q1_2000,sh.sales_test:sales_test_q2_2000 transportable=always logfile=sales_test.log Processing object type TABLE_EXPORT/TABLE/PLUGTS_BLK Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/COMMENT Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type TABLE_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/END_PLUGTS_BLK Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:   /tts/sales_test.dmp ****************************************************************************** Datafiles required for transportable tablespace SALES_TEST:   +DATADG/jyrac/datafile/sales_test_01.dbf Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at Tue Jun 6 11:21:22 2017 elapsed 0 00:00:17  

4.将导出的dump文件传输到目标数据库

[oracle@jytest1 tts]$ scp oracle@10.138.130.151:/tts/sales_test.* /tts/ The authenticity of host '10.138.130.151 (10.138.130.151)' can't be established. RSA key fingerprint is 92:b7:e1:f5:a4:99:5a:de:d5:d3:f2:25:f7:98:0a:a1. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.138.130.151' (RSA) to the list of known hosts. oracle@10.138.130.151's password: sales_test.dmp                                                                                                                                                                                            100%  264KB 264.0KB/s   00:00 sales_test.log                                                                                                                                                                                            100% 1542     1.5KB/s   00:00 [oracle@jytest1 tts]$ ls -lrt total 268 -rw-r----- 1 oracle oinstall 270336 Jun  6 18:49 sales_test.dmp -rw-r--r-- 1 oracle oinstall   1542 Jun  6 18:49 sales_test.log 

5.将sales_test表空间的数据文件传输到目标数据库
在源数据库中创建目录tts_datafile(存储数据文件)

SQL> create or replace directory tts_datafile as '+datadg/jyrac/datafile/';  Directory created.  SQL> grant execute,read,write on directory tts_datafile to public;  Grant succeeded. 

在目标数据库中创建目录tts_datafile(存储数据文件)

SQL> create or replace directory tts_datafile as '+DATA/JY/4B2C6373AE2547CCE053AB828A0A7CA3/DATAFILE/';  Directory created.  SQL> grant execute,read,write on directory tts_datafile to public;  Grant succeeded.   SQL> conn sys/xxzx7817600@jypdb as sysdba Connected.   SQL> create public database link jyrac_link   2    connect to jy identified by "jy"   3    using '(DESCRIPTION =   4      (ADDRESS_LIST =   5        (ADDRESS = (PROTOCOL = TCP)(HOST =10.138.130.153)(PORT = 1521))   6      )   7      (CONNECT_DATA =   8        (SERVER = DEDICATED)   9        (SERVICE_NAME =jyrac)  10      )  11    )';  Database link created.   SQL> exec dbms_file_transfer.get_file(source_directory_object =>'TTS_DATAFILE',source_file_name => 'sales_test_01.dbf',source_database =>'jyrac_link',destination_directory_object => 'TTS_DATAFILE',destination_file_name => 'sales_test_01.dbf'); PL/SQL procedure successfully completed  ASMCMD [+data/jy/4B2C6373AE2547CCE053AB828A0A7CA3/datafile] > ls -lt Type      Redund  Striped  Time             Sys  Name DATAFILE  UNPROT  COARSE   JUN 06 18:00:00  N    sales_test_01.dbf => +DATA/jy/4B2C6373AE2547CCE053AB828A0A7CA3/DATAFILE/FILE_TRANSFER.301.945975283 DATAFILE  UNPROT  COARSE   JUN 06 18:00:00  Y    FILE_TRANSFER.301.945975283 DATAFILE  UNPROT  COARSE   JUN 05 23:00:00  Y    SYSAUX.275.939167015 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  N    users01.dbf => +DATA/jy/4B2C6373AE2547CCE053AB828A0A7CA3/DATAFILE/FILE_TRANSFER.298.945620417 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  N    test01.dbf => +DATA/jy/4B2C6373AE2547CCE053AB828A0A7CA3/DATAFILE/FILE_TRANSFER.300.945620337 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  N    example01.dbf => +DATA/jy/4B2C6373AE2547CCE053AB828A0A7CA3/DATAFILE/FILE_TRANSFER.299.945620391 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  Y    SYSTEM.274.939167015 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  Y    FILE_TRANSFER.300.945620337 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  Y    FILE_TRANSFER.299.945620391 DATAFILE  UNPROT  COARSE   JUN 02 16:00:00  Y    FILE_TRANSFER.298.945620417 DATAFILE  UNPROT  COARSE   JUN 02 00:00:00  N    testtb01.dbf => +DATA/jy/4B2C6373AE2547CCE053AB828A0A7CA3/DATAFILE/TESTTB.295.944828399 DATAFILE  UNPROT  COARSE   JUN 02 00:00:00  Y    UNDO_2.277.939167063 DATAFILE  UNPROT  COARSE   JUN 02 00:00:00  Y    UNDOTBS2.278.945029905 DATAFILE  UNPROT  COARSE   JUN 02 00:00:00  Y    UNDOTBS1.273.939167015 DATAFILE  UNPROT  COARSE   JUN 02 00:00:00  Y    TESTTB.295.944828399  

6.可选操作,将源数据库中的表空间sales_test设置为读写模式

SQL> alter tablespace sales_test read write; Tablespace altered  SQL> select tablespace_name,status from dba_tablespaces; TABLESPACE_NAME                STATUS ------------------------------ --------- SYSTEM                         ONLINE SYSAUX                         ONLINE UNDOTBS1                       ONLINE TEMP                           ONLINE USERS                          ONLINE UNDOTBS2                       ONLINE EXAMPLE                        ONLINE TEST                           ONLINE SALES_TEST                     ONLINE 9 rows selected 

7.在目标数据库上执行导入操作

[oracle@jytest1 tts]$ impdp system/xxzx7817600@JYPDB_175 dumpfile=sales_test.dmp directory=tts_dump transport_datafiles='+data/jy/4B2C6373AE2547CCE053AB828A0A7CA3/datafile/sales_test_01.dbf' tables=sh.sales_test:sales_test_q1_2000,sh.sales_test:sales_test_q2_2000 logfile=imp_sales_test.log  Import: Release 12.2.0.1.0 - Production on Tue Jun 6 19:23:09 2017  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 "SYSTEM"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/********@JYPDB_175 dumpfile=sales_test.dmp directory=tts_dump transport_datafiles=+data/jy/4B2C6373AE2547CCE053AB828A0A7CA3/datafile/sales_test_01.dbf tables=sh.sales_test:sales_test_q1_2000,sh.sales_test:sales_test_q2_2000 logfile=imp_sales_test.log Processing object type TABLE_EXPORT/TABLE/PLUGTS_BLK Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/COMMENT Processing object type TABLE_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/END_PLUGTS_BLK Job "SYSTEM"."SYS_IMPORT_TABLE_01" completed with 13 error(s) at Tue Jun 6 19:25:06 2017 elapsed 0 00:01:46 
SQL> select owner,table_name,tablespace_name from dba_tables where owner='SH'; OWNER                                                                            TABLE_NAME                                                                       TABLESPACE_NAME -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------ SH                                                                               SALES_TEST_SALES_TEST_Q1_2000                                                    SALES_TEST SH                                                                               SALES_TEST_SALES_TEST_Q2_2000                                                    SALES_TEST SH                                                                               SALES_TRANSACTIONS_EXT SH                                                                               COSTS SH                                                                               SALES SH                                                                               CAL_MONTH_SALES_MV                                                               EXAMPLE SH                                                                               FWEEK_PSCAT_SALES_MV                                                             EXAMPLE SH                                                                               DIMENSION_EXCEPTIONS                                                             EXAMPLE SH                                                                               SUPPLEMENTARY_DEMOGRAPHICS                                                       EXAMPLE SH                                                                               COUNTRIES                                                                        EXAMPLE SH                                                                               CUSTOMERS                                                                        EXAMPLE SH                                                                               PROMOTIONS                                                                       EXAMPLE SH                                                                               PRODUCTS                                                                         EXAMPLE SH                                                                               TIMES                                                                            EXAMPLE SH                                                                               CHANNELS                                                                         EXAMPLE  

可以看到分区sales_test_q1_2000与sale_test_q2_2000导入后分别成为了一张非分区表

正文到此结束
Loading...