Re: View Creation script?
- From: "Niall Litchfield" <niall.litchfield@xxxxxxxxx>
- To: Jay.Miller@xxxxxxxxxxxxxxxx
- Date: Fri, 10 Aug 2007 15:49:35 +0100
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@xxxxxxxxxxxxxxxx <Jay.Miller@xxxxxxxxxxxxxxxx> 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
- Follow-Ups:
- RE: View Creation script?
- From: Jay.Miller
- References:
- Fencing Cache in Disk Array for Oracle
- From: Binh Pham
- Re: Fencing Cache in Disk Array for Oracle
- From: LS Cheng
- Re: Fencing Cache in Disk Array for Oracle
- From: Allan Nelson
- View Creation script?
- From: Jay.Miller
Other related posts:
- » View Creation script?
- » Re: View Creation script?
- » Re: View Creation script?
- » RE: View Creation script?
- » Re: View Creation script?
- » RE: View Creation script?
- » RE: View Creation script?
- RE: View Creation script?
- From: Jay.Miller
- Fencing Cache in Disk Array for Oracle
- From: Binh Pham
- Re: Fencing Cache in Disk Array for Oracle
- From: LS Cheng
- Re: Fencing Cache in Disk Array for Oracle
- From: Allan Nelson
- View Creation script?
- From: Jay.Miller