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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Obtaining DDL creation scripts from oracle

Re: Obtaining DDL creation scripts from oracle

From: James Lorenzen <james_lorenzen_at_allianzlife.com>
Date: Wed, 23 Jun 1999 21:58:28 GMT
Message-ID: <7krl9t$jng$1@nnrp1.deja.com>


The answer, as always, is it depends. I looked at some of the responses and "it depends" on what you what and do you want to be able to read it? If you only want the ddl for tables and indexes, then using export to export the database without any rows and "process" the export file with the index_file=xxx, will result in a file the index ddl ready to run and all of the table ddl "rem'd" out in the file. Not fancy, but it will work.

If you want "everything", users, stored procedures, etc., then the export file with no rows in it will contain all of this. This file _IS_NOT_ in human readable form. But you create a clone of the database from this.

This all depends on how "fancy" you need to be and what your budget is. This export file is available now and it is part of the installation. But it is plain, and some work is needed to use the output.

Someone has created a script to process this file. I have forgotten who right now.

HTH
  James
In article <7kr53d$crs$1_at_nnrp1.deja.com>,   jbastias_at_stirlingdouglas.com wrote:
> Hi all,
>
> This is a bit of a newbie question. I have an existing oracle (v7.3.x)
> database but I don't have DDL source used to create it I would like to
> 'clone' a clean version of the database. I'd like to know if there is
> some way to get the oracle server to generate the DDL for an existing
> database and dump it to a file for future use.
>
> I know all the information I need is in the system tables, but I don't
> want to have to write a program to generate the DDL for me unless I
> absolutely have to.
>
> I know that SQL Server has a system stored proc which does it (not to
> mention that it is a menu item in the enterprise manager,
sp_helptext).
>
> Thanks
> Jorge
>
> Please response to jbastias_at_stirlingdouglas.com
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Jun 23 1999 - 16:58:28 CDT

Original text of this message

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