Question

Before i start if someone know a better way to do this please Share as i having massive problems with data pump as it hangs on tablespace and when i check the tablespaces repot i see nothing being filled.

I am trying to CTAS few tables ( create table as select from a@database link) from production to PRE_PRED at the same time.

table sizes are 29 GB, 29GB, 35GB indexes size are 10GB ,11GB ,13GB Temp tablespace is 256 GB

tablespace the data is beging copied to has 340 GB.

pseudo code

create table A 
compress basic
nologging
nomonitoring
tablespace PRE_PRED.A 
parallel (degree defasult instances default)
as select * from B@database link;

i keep getting unable to extend temp segment in PRE_PRED.A tablespace where as i can see there is more than enough space in TEMP and specified tablespace.

the questions please let me know...thanks

Was it helpful?

Solution

The best way to do this is with datapump, which should not be difficult.

First export the tables that you need to a file on the target database server

expdp system dumpfile=MY_TABLES.dmp logfile=MY_TABLES.log exclude=statistics tables=owner.a, owner.b, owner.c

Now copy this file to the source database server and then import the tables, changing the owner and tablespace if needed (if you don't need that remove the remap options).

impdp system dumpfile=MY_TABLES.dmp logfile=MY_TABLES_IMPORT.log tables=owner.a, owner.b, owner.c remap_schema=owner:newowner remap_tablespace=tablespace:newtbspce

This will be faster and have much less load on your network and databases.

You can also just grab the tables with impdb directly from the source database using a database link if you want (but I wouldn't use this myself unless the table was very small and then CTAS would work anyway).

impdp system logfile=MY_TABLES_IMPORT.log tables=owner.a, owner.b, owner.c remap_schema=owner:newowner remap_tablespace=tablespace:newtbspce network_link=dblink
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top