Advertisement
ExaGridDba

addmComparePeriodOrDb.sql

Aug 7th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- addmComparePeriodOrDb.sql
  2. -- Brian Fitzgerald
  3.  
  4. SET pagesize 0
  5. SET linesize 32767
  6. SET trimspool ON
  7. SET LONG 100000
  8.  
  9. variable rpt clob
  10. COLUMN rpt format a60000
  11.  
  12. COLUMN spoolfile new_value spoolfile format a80
  13. SELECT 'addmrpt.' || instance_name || '.' || TO_CHAR(SYSDATE, 'yyyymmdd.hhmiss') || '.html' spoolfile FROM v$instance;
  14.  
  15. spool &&spoolfile
  16.  
  17. SELECT dbms_addm.compare_databases (base_dbid            => NULL,
  18.                                     base_begin_snap_id   => 314,
  19.                                     base_end_snap_id     => 315,
  20.                                     comp_dbid            => NULL,
  21.                                     comp_begin_snap_id   => 315,
  22.                                     comp_end_snap_id     => 316,
  23.                                     report_type          => 'HTML') rpt
  24.   FROM dual;
  25. spool off
  26.  
  27. prompt created FILE:
  28. prompt &&spoolfile
  29. quit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement