Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create a SQL script used to create a new copy of a user's schema.
Chris Hamilton <chrish_at_wnmail.att.com> wrote in article
<01bc7665$cc94a780$4881b687_at_chrish-pc.cis.att.com>...
> Miles Thomas <thomasm@"at".logica."dot".com> wrote in article
> <01bc7648$29db6be0$4621ea9e_at_UKP01436.logica.co.uk>...
>[SNIPPED]
> Well, actually you can. On a Unix platform, do the following, assuming
> your export file is called expdat.dmp...
>
> % strings expdat.dmp > expdat.txt
> % vi expdat.txt
>
> Edit the resulting text file and change anything you want, comment out
> anything you want, etc. All the create table, index, constraint, etc.
> statements are in there. The strings command will grab only text and get
> rid of binary headers and such. You can then execute the text file from
> SQL*Plus.
>
> You'll have to add semi-colons at the end of lines and filter out a few
> other things, but it's a good way to accomplish what you want to do.
>
> Chris
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Chris Hamilton -- chrish_at_wnmail.att.com
> AT&T WorldNet Service -- Lincroft, NJ
> City of Washington Pipe Band -- USA
> http://www.serve.com/cowpb/chamilton.html
>
I said as much in my original message. However, it doesnt work on all platforms (I suspect its dependant on the character set of the export. USASCII7 is ok, but the default for NT-ISO8859P1 doesnt produce files which are as helpful.)
Other, better methods are required. If I had time, I would write a set of sqlplus scripts to do the job.
-- Miles Thomas Logica UK Ltd thomasm "at" logica "dot" com The above are personal opinions, and are not necessarily the opinions of my employer.Received on Thu Jun 12 1997 - 00:00:00 CDT
![]() |
![]() |