1.查看分区表分区字段 select * from dba_part_key_columns where name='LOAN_UN_APP_INFO_CLOB' and owner ='OLS'; OWNER NAME OBJECT_TYPE COLUMN_NAME -------------------- ------------------------------ ---------- ---------- OLS LOAN_UN_APP_INFO_CLOB TABLE OLS_DATA_DATE 2.查看分区信息 select PARTITION_NAME,HIGH_VALUE from dba_tab_partitions where TABLE_OWNER = 'OLS' and TABLE_NAME = 'LOAN_UN_APP_INFO_CLOB' ; PARTITION_NAME HIGH_VALUE ---------------------------------------------------------------- ---------------------------------------------------------------- -------------------------------------------------------------------------------- P1_LUAICLOB_01 TO_DATE(' 2020-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') SYS_P14044 TO_DATE(' 2021-01-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') SYS_P14082 TO_DATE(' 2021-01-09 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') SYS_P14119 TO_DATE(' 2021-01-10 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
省略 3.导出分区 可以采用query方式,也可以导出具体分区,本次采用导出具体分区 select TABLE_OWNER||'.'||TABLE_NAME||':'||PARTITION_NAME from dba_tab_partitions where TABLE_OWNER = 'OLS' and TABLE_NAME = 'LOAN_UN_APP_INFO_CLOB';
OLS.LOAN_UN_APP_INFO_CLOB:P1_LUAICLOB_01 OLS.LOAN_UN_APP_INFO_CLOB:SYS_P14044 OLS.LOAN_UN_APP_INFO_CLOB:SYS_P14082 OLS.LOAN_UN_APP_INFO_CLOB:SYS_P14119 省略 nohup expdp \" / as sysdba \" dumpfile=ols_LOAN_UN_APP_INFO_CLOB_BAK20210108.dmp directory=yearend logfile=ols_LOAN_UN_APP_INFO_CLOB_BAK20210108.log logtime=all cluster=no COMPRESSION=all tables=OLS.LOAN_UN_APP_INFO_CLOB:SYS_P14044 exclude=statistics,index & nohup expdp \" / as sysdba \" dumpfile=ols_LOAN_UN_APP_INFO_CLOB_BAK20210109.dmp directory=yearend logfile=ols_LOAN_UN_APP_INFO_CLOB_BAK20210109.log logtime=all cluster=no COMPRESSION=all tables=OLS.LOAN_UN_APP_INFO_CLOB:SYS_P14082 exclude=statistics,index &
省略
当插入的时候,第一个正常插入,后面的增加参数 table_exists_action=append 来导入