Re: Import into a different tablespace
Date: 24 Nov 1994 01:35:25 GMT
Message-ID: <3b0qkt$pn3_at_shocker.mid.net>
In article <3arff7$61o_at_larch.cc.swarthmore.edu>
stauffer_at_cc.swarthmore.edu "R Glenn Stauffer" writes:
> I ahve an import file that was created from a series of tables stored in
> an archive tablespace. I can't use the archive tablespace anymore (data
> files trashed; tablespace won't drop) and am trying to get the data from
> teh import file into another tablespace.
Just did this (and do it often), so I'll post my favorite method.
Just 4 commands: (UNIX specific)
mknod temp.dmp p perl -nle '$_ =~ s/TABLESPACE "<OLD>"/TABLESPACE "<NEW>"/g; print $_;' \ < file.dmp > temp.dmp & imp file=temp.dmp userid=blah commit=blah full=blah <etc>=blah rm temp.dmp
(replace <OLD> and <NEW> with various tablespace names)
I love perl... (CPU time with perl5.0 on HP G50 to process a 77Meg import file was 60 seconds... not significant)
Rory Reynoldson
Gallup Organization
rory_at_cronus.gallup.com
PS: Stephen Lappin's idea to precreate tables is a great one, but I find my
method faster for me to type:-) And, his idea won't take care of indexes since importing with pre-created indexes is REALLY slow... Received on Thu Nov 24 1994 - 02:35:25 CET