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: Easy question

Re: Easy question

From: Nuno Souto <nsouto_at_acay.com.au>
Date: 1997/06/10
Message-ID: <339D4BF0.77B3@acay.com.au>#1/1

Hugo Juan Jordan wrote:
>
> In order to document the structure of a database, they have asked me to
> obtain a text file with all the SQL statements needed to build the same
> database that I am running in a Oracle server 7.3.. I'm sure it must be
> very easy to obtain, but I have no idea.
> Any suggestions?

Yeah. Type "exp help=yes" and then "imp help=yes" or something similar and you'll see the commands for export and import utilities delivered with your ORACLE server. Export the full database with parameter "rows=n" and the rest = yes and you should get a small export file thast contains only the structures of your database (no data). Then use this file to run the import and use the option that creates a SQL script. This will get a script on output that has all your CREATE statements, GRANTS and so on for your database. The only thing I think you don't get is the code for any stored procedures and triggers if you have any. For these, use one of the many DBA_* views that give you access to the text of these and pump it out with SQL*Plus or similar. Relatively easy once you understand the format of these views.

>
> I'm very sorry to ask silly questions, but I'm still very far from really
> good ones.

Not silly at all and don't be afraid to ask.

HTH
Nuno Souto
nsouto_at_acay.com.au Received on Tue Jun 10 1997 - 00:00:00 CDT

Original text of this message

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