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: How to create a DDL for a schema

Re: How to create a DDL for a schema

From: Odd Bjørn Andersen <odd.andersen_at_ergo.no>
Date: Fri, 21 Oct 2005 11:45:22 +0200
Message-ID: <1129887925.819170@makrell.interpost.no>

<gareth_at_jamms.org> wrote in message
news:1129886223.413864.40940_at_g43g2000cwa.googlegroups.com...
> Don't top-post please, people don't like it :)
>
> Anyway, a bit of lateral thinking produces:
>
> select dbms_metadata.get_ddl('TABLE',table_name,'<schema_name>')
> from all_tables
> where owner='<schema_name>';
>
> And:
>
> select dbms_metadata.get_ddl('INDEX',index_name,'<schema_name>')
> from all_indexes
> where owner='<schema_name>';
>
> Run as SYSTEM rather than SYS.
>
> HTH
>
> -- g
>

See: no top-posting :-) Well, you know how it is with Microsoft, top-posting is the default .......

And BTW, your suggestion worked fine. Thank you.

Regards
Odd B Received on Fri Oct 21 2005 - 04:45:22 CDT

Original text of this message

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