Oracle Data Pump (expdp, impdp) – some REMAP options

Situatie

Oracle Data Pump technology enables very high-speed movement of data and metadata from one database to another.

Solutie

Pasi de urmat

REMAP_SCHEMA

Loads all objects from the source schema into a target schema.

Syntax and Description

REMAP_SCHEMA=source_schema:target_schema

Example:

CREATE OR REPLACE DIRECTORY DP_DIR AS '&v_dp_directory'; 
GRANT READ, WRITE ON DIRECTORY DP_DIR TO SAPSR3; 
impdp SAPSR3/<password> tables=SXMSCLUP REMAP_SCHEMA=SAPSR3:SAPSR3_NEW directory=DP_DIR dumpfile=SXMSCLUP.dmp logfile=impdpSXMSCLUP.log

REMAP_TABLE

Allows you to rename tables during an import operation.

Syntax and Description

You can use either of the following syntaxes (see the Usage Notes below):

REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablename

OR

REMAP_TABLE=[schema.]old_tablename[:partition]:new_tablename

Example:

CREATE OR REPLACE DIRECTORY DP_DIR AS '&v_dp_directory'; 
GRANT READ, WRITE ON DIRECTORY DP_DIR TO SAPSR3;
 impdp SAPSR3/<password> tables=SXMSCLUP REMAP_TABLE=SXMSCLUP:SXMSCLUP_NEW directory=DP_DIR dumpfile=SXMSCLUP.dmp logfile=impdpSXMSCLUP.log

REMAP_TABLESPACE

Remaps all objects selected for import with persistent data in the source tablespace to be created in the target tablespace.

Syntax and Description

REMAP_TABLESPACE=source_tablespace:target_tablespace

Example:

CREATE OR REPLACE DIRECTORY DP_DIR AS ‘&v_dp_directory’;
GRANT READ, WRITE ON DIRECTORY DP_DIR TO SAPSR3;

impdp SAPSR3/<password> tables=SXMSCLUP REMAP_TABLESPACE=PSAPSR3:PSAPSR3_NEW directory=DP_DIR dumpfile=SXMSCLUP.dmp logfile=impdpSXMSCLUP.log

Example (all in same run):

CREATE OR REPLACE DIRECTORY DP_DIR AS ‘&v_dp_directory’;

GRANT READ, WRITE ON DIRECTORY DP_DIR TO SAPSR3;

impdp SAPSR3/<password> tables=SXMSCLUP REMAP_SCHEMA=SAPSR3:SAPSR3_NEW REMAP_TABLE=SXMSCLUP:SXMSCLUP_NEW REMAP_TABLESPACE=PSAPSR3:PSAPSR3_NEW directory=DP_DIR dumpfile=SXMSCLUP.dmp logfile=impdpSXMSCLUP.log

Tip solutie

Permanent
Share ..

Voteaza

(15 din 31 persoane apreciaza acest articol)

Lasă un răspuns

Adresa ta de email nu va fi publicată. Câmpurile obligatorii sunt marcate cu *

We are all close together

A problem, a question, an emergency?
Do not hesitate to visit the help centre, we can help you.

Copyright © 2020 Askit. All rights reserved

Suport Tehnic