RE: Relocate indexes during datapump import
Date: Mon, 2 Mar 2015 17:17:26 +0300
Message-ID: <DUB131-W37051DFFB5598EAE8B47F2DB100_at_phx.gbl>
Hi John,
Yes, it is possible to relocate indexes separately to a different tablespace using Data Pump. For example, you can use a PL/SQL code which uses Data Pump API. This sample code moves only indexes from OLDTABLESPACE' to NEWTABLESPACE:
DECLARE
hd NUMBER;
BEGIN
hd := DBMS_DATAPUMP.OPEN(operation => 'IMPORT',job_mode => 'FULL',remote_link => NULL,job_name => 'DDD',version => 'COMPATIBLE' );
DBMS_DATAPUMP.ADD_FILE( handle => hd, filename => 'dumpfile.dmp', directory => 'EXPDIR', filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE ); DBMS_DATAPUMP.ADD_FILE( handle => hd, filename => 'logfile.log', directory => 'EXPDIR', filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE ); DBMS_DATAPUMP.SET_PARAMETER( handle => hd, name => 'REUSE_DATAFILES', value => 0 ); DBMS_DATAPUMP.SET_PARAMETER( handle => hd, name => 'SKIP_UNUSABLE_INDEXES', value => 0 ); DBMS_DATAPUMP.METADATA_REMAP ( handle => hd, name => 'REMAP_TABLESPACE', old_value => 'OLDTABLESPACE', value => 'NEWTABLESPACE', object_type => 'INDEX' ); DBMS_DATAPUMP.SET_PARAMETER( handle => hd, name => 'TABLE_EXISTS_ACTION', value => 'SKIP' ); DBMS_DATAPUMP.START_JOB(handle => hd);END;
/
cheers,
Alexey Danchenkov
From: JDunn_at_sefas.com
To: oracle-l_at_freelists.org
Subject: Relocate indexes during datapump import
Date: Mon, 2 Mar 2015 14:04:38 +0000
During a datapump import is it possible to relocate indexes to a separate tablespace? Or I do I need to do that before doing the original export? John
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Mar 02 2015 - 15:17:26 CET