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.
Miles Thomas <thomasm@"at".logica."dot".com> wrote in article
<01bc7648$29db6be0$4621ea9e_at_UKP01436.logica.co.uk>...
>
> Gerard H. Pille <gerard_h_pille_at_hotmail.com> wrote in article
> <01bc75de$a9c23d80$3e0d4ac1_at_pcghp>...
> > An export without data should do the trick, no?
> >
> No it will not.
>
> Bill needs to edit the storage parameters on the create table etc
> statements, and you cant do that with an dataless export. There are
> parameters to imp which will produce craete index statements etc, but not
> table definitions, ISTR.
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
![]() |
![]() |