DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Extract DDL for snapshots

  1. #1
    Join Date
    Sep 2000
    Posts
    155

    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

  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    You can get all the details from ALL_SNAPSHOTS.
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  3. #3
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    set long 8000; (or less or more, as u need)

    select query from ALL_SNAPSHOTS where owner='OOOO' and ....;

  4. #4
    Join Date
    Feb 2001
    Posts
    290
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width