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: oracle objects export

Re: oracle objects export

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Mon, 17 Jul 2006 12:54:29 GMT
Message-ID: <J2Jt73.KHM@igsrsparc2.er.usgs.gov>


Prasath wrote:
> Is it possible to export the table structures(no data), packages,
> triggers from a schema to a flat file?
>

No version was indicated, so I'm going to assume that my solution works in your version (Oracle 9i or 10g):

Use the DBMS_METADATA package to get this sort of information. In SQL*Plus, do the following:

spool ddl.txt
SELECT dbms_metadata.get_ddl(object_type,object_name,user) FROM user_objects;
spool off

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Mon Jul 17 2006 - 07:54:29 CDT

Original text of this message

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