/**************************************************************************/ 
/*                                                                        */ 
/*                         c a p t _ v w . s q l                          */
/*                                                                        */ 
/* deamon process to capture the sql which is running against the DBMS    */
/*    and save those queries which are not duplicates (strip off the      */
/*    duplicates)                                                         */
/*                                                                        */ 
/**************************************************************************/ 
/*                     M o d i f i c a t i o n    L o g                   */ 
/*                                                                        */ 
/*   Date    Programmer       Description of changes                      */ 
/* --------  ---------------  ------------------------------------------- */ 
/* 08/23/94  R.Kupcunas       Original code                               */ 
/*                                                                        */ 
/**************************************************************************/

break on "VIEW" on "OWNER";

spool capt_vw.rslt;

/* *************************** */
/* Look at the View statements: */
/* *************************** */

       select 	view_name                  "VIEW", 
                substr(owner, 1, 9)        "OWNER",
                text_length,
                text
       from 	sys.dba_views
       where    owner != 'DBA_CMPT' and
                owner != 'DBA_EDS'  and
                owner != 'SYS'      and
               (substr(view_name, 7, 6) = to_char(sysdate, 'yymmdd') or
                substr(view_name, 8, 6) = to_char(sysdate, 'yymmdd') or
                substr(view_name, 9, 6) = to_char(sysdate, 'yymmdd') or
                substr(view_name, 10, 6) = to_char(sysdate, 'yymmdd') or
                substr(view_name, 11, 6) = to_char(sysdate, 'yymmdd'))
       order by 1 asc, 2 asc, 3 asc;

spool off;

commit;