Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Create a SQL script used to create a new copy of a user's schema.

Re: Create a SQL script used to create a new copy of a user's schema.

From: Chris Hamilton <chrish_at_wnmail.att.com>
Date: 1997/06/11
Message-ID: <01bc7665$cc94a780$4881b687@chrish-pc.cis.att.com>#1/1

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



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 Received on Wed Jun 11 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US