Are there any pre-written scripts available to extract DDL for snapshots with someone or any links?
Basically, I want to reverse engineer all the snapshots in a user schema.
TIA
Printable View
Are there any pre-written scripts available to extract DDL for snapshots with someone or any links?
Basically, I want to reverse engineer all the snapshots in a user schema.
TIA
You can get all the details from ALL_SNAPSHOTS.
set long 8000; (or less or more, as u need)
select query from ALL_SNAPSHOTS where owner='OOOO' and ....;
try this .....
set heading off verify off feedback off ;
set arraysize 1 long 1000000 termout off ;
spool docsnap.sql
select 'create snapshot '||owner||'.'||name||' as ',query,';'
from dba_snapshots where owner = upper('&&1');
spool off;
Thanks,
Madhu