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: Exporting just schema/metadata (w/o data) in Oracle

Re: Exporting just schema/metadata (w/o data) in Oracle

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 30 Sep 2005 16:27:13 -0700
Message-ID: <1128122833.236774.289030@z14g2000cwz.googlegroups.com>


Yes a tables= export with rows=n will create an export file with just the DDL for the table and optionally its constraints and indexes plus the table trigger source if any.

Note the indexfile option on imp. It can be used to generate DDL for everything in the exp file. Except for the create index statement everythign is commented out but the create table statements are in the file.

With version 10g the expdp utility has a metadata only option.

Oracle versions 8.1, 9, 9.2, and 10g also include the dbms_metadata package which exists to generate Oracle object source code.

Finally you can write SQL or pl/sql scripts yourself to generate tables, indexes, constraints, sequences, etc... using the rdbms dictionary views. See the Supplied PL/SQL Packages and Types manual for details.

HTH -- Mark D Powell -- Received on Fri Sep 30 2005 - 18:27:13 CDT

Original text of this message

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