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: view create table statements

Re: view create table statements

From: Mark Cudworth <cudworth_at_removed.to.avoid.spam.invalid>
Date: Fri, 15 Mar 2002 20:09:34 -0000
Message-ID: <u94l7ulv37l92c@corp.supernews.com>


Sean M <smckeownNO_at_backsiesearthlink.net> wrote:
> Mark Cudworth wrote:

>> 
>> All of the information you need is in the system views.  I wrote a Perl
>> program a while ago that does just this.  Invoking it (for a table named
>> "tracks") as:
>> 

>
> If you had 9i, you could save yourself a lot of trouble writing Perl by
> using DBMS_METADATA. For instance (connected as sysdba):

[snip]

I don't see how. Using an existing program (originally written to be used against Oracle 7.3.4) seems a lot easier than installing a new version of the DBMS. :-) Besides, the program I wrote will actually do more than just dump DDL for the create table. It will also dump statements to reproduce the grants, comments and optionally, even insert statements for the data rows. (Not suitable for large tables!) I got the idea for this years ago when using mySQL, which is what the original poster mentioned.

It is nice that some of this functionality is being added to the DBMS itself, though. Do you have to be sysdba to see the DBMS_METADATA? That would be a drawback to this method.

Mark Received on Fri Mar 15 2002 - 14:09:34 CST

Original text of this message

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