Database Utilities (MOSC)

MOSC Banner

how to use dbms_datapump for remaping tablespaces with cursor variables

edited Oct 8, 2009 12:54AM in Database Utilities (MOSC) 4 commentsAnswered
 Hi to all!
I'm trying to create a procedure which will import tables from a production database to a test database using datapump API. Some tables are partitioned with separate tablespaces per partition in production system, while in test all partitions are stored in a single tablespace. So I'm trying to remap the tablespaces to only one when importing into test. I'm trying

DBMS_DATAPUMP.METADATA_REMAP(
handle => h1,
name => 'REMAP_TABLESPACE',
old_value => 'FADJUDATA200708',
value => 'FADJUDATA',
object_type => 'TABLE');

which it works, but cannot use it for more than one partitions, as tablespace are hard-coded this way. So I tried the cursor

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center