Re: Creating DDL from EXPORT

From: David T. Bath <dtb_at_bf.rmit.edu.au>
Date: 1995/08/21
Message-ID: <41928n$5fu_at_aggedor.rmit.EDU.AU>#1/1


cz0763%zip02_at_mt.gov (Tony Noble) writes:

>In article <40vfu4$bin_at_newsbf02.news.aol.com>, shamooli_at_aol.com says...
>>
>>How can I create a script of defininition of all the tables (including
>>storage parameters, constraints) in a schema using EXP.
>>
>>We are using Oracle 7 under OS/2 2.1.
>>
>>Thanks for any help.
 

>Do a full export then using IMP set the 'ROWS' parameter to 'N', or
>answer 'N' when IMP asks 'Import table data (Y/N): Y>'. Note, that the
>utilities manual says that Grants and Indexes will be created. Also, if
>you want the original storage parameters, then don't compress extents
>when you do the export. This should give you most of what you want,
>although the result may need some cleaning up with an editor if you plan
>on using to recreate the same schema somewhere else.

or do import with INDEXFILE=fred.sql
The result needs to be browsed, some remarks removed, etc,etc. You can hack tablespaces, etc real easy.

To get all the gory details, UNIX types can use strings(1) on the import file and grovel around using vi(1). This lets you browse more good stuff. The strings utility has probably been ported to OS/2. If not, should take a C programmer no time to write. ;-)

David

--
---
David T. Bath       | dtb_at_ftp.bf.rmit.edu.au (mail=dtb_at_bf.rmit.edu.au)
3/175 Wattletree Rd | Snr Tech Consultant, Global Consulting Services
MALVERN 3144 VIC    | 179 Grattan St, Carlton, Vic 3053, Australia
+61 3 9500 9337     | Ph:+61 3 93477511  Fx:+61 3 93470182 Mb: +61 15 824171
WWW pages incl. ORA FAQ: lynx http://www.bf.rmit.edu.au/~orafaq
--- NOT TO BE ARCHIVED IN ANY MANNER ON MICROSOFT NETWORK ---
Received on Mon Aug 21 1995 - 00:00:00 CEST

Original text of this message