Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: View Creation script?
I use DBMS_METADATA
from my extract_schema script
<spool to agenerated sql file,set echo off, accept input variables etc,etc> <set dbms_metadata_transforms>
select 'prompt ''Creating Views.... ''' from dual; select 'select dbms_metadata.get_ddl(''VIEW'',v.view_name,''&usr'') ddl_col FROM DBA_VIEWS v WHERE OWNER = ''&usr'';' from dual;
<run the generated script spooling to another file>
cheers
Niall
On 8/9/07, Jay.Miller_at_tdameritrade.com <Jay.Miller_at_tdameritrade.com> wrote:
>
> Before I write one, does anyone have a script handy (or know of one
> online) that will generate the DDL for a view that matches the underlying
> table? I need to create a bunch of views that will differ only slightly
> from their underlying table and am looking for ways to speed it up...
>
>
> Thanks,
> Jay Miller
> Sr. Oracle DBA
>
>
-- Niall Litchfield Oracle DBA http://www.orawin.info -- http://www.freelists.org/webpage/oracle-lReceived on Fri Aug 10 2007 - 09:49:35 CDT
![]() |
![]() |