Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to create a DDL for a schema
<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