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: How to create schema file?

Re: How to create schema file?

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Thu, 31 Aug 2000 13:04:04 GMT
Message-ID: <39AE57C4.C763008F@edcmail.cr.usgs.gov>

Dmitri,

You can use the EXPORT and IMPORT utilities to do what you are looking for. First, you'll need to create an export file for that schema (EXP USERID=SYSTEM FILE=exp.dmp OWNER=schema_name ROWS=N). By using the ROWS=N parameter, no actual data will get exported, just the schema definition for the specified owner. Now that you have the export file, use Oracle's IMPORT utility to show you the DDL statements (IMP USERID=SYSTEM FILE=exp.dmp FROMUSER=schema_name SHOW=Y). The SHOW=Y parameter just shows you the DDL statements. You can also log the output to a file (LOG=filename) if you desire.

HTH,
Brian

dmichere_at_my-deja.com wrote:
>
> Hello everybody,
>
> An Oracle newbie question: How can I create a SQL file containing DDL
> operators for all objects in a given schema (CREATE TABLE, CREATE
> INDEX, CREATE TRIGGER etc). In Informix it can be done via dbschema
> utility. How can I do it in Oracle?
>
> Thanks for any help,
>
> Dmitri.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Thu Aug 31 2000 - 08:04:04 CDT

Original text of this message

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