home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 28.ddi / admin / bstat.sql < prev    next >
Encoding:
Text File  |  1991-03-04  |  1.5 KB  |  53 lines

  1. rem
  2. rem $Header: bstat.sql,v 6002700.1 89/05/23 00:39:13 rcs Exp $ bstat.sql Copyr (c) 1989 Oracle
  3. rem
  4. Rem Copyright (c) 1988 by Oracle Corporation
  5. Rem NAME
  6. Rem    <name>
  7. Rem  FUNCTION
  8. Rem  NOTES
  9. Rem  MODIFIED
  10. Rem   Loaiza     04/04/89 - fix run dates to minutes instead of months
  11. Rem   Martin     02/22/89 - Creation
  12. Rem   Jloaiza    02/23/89 - changed table names, added dates, added param dump
  13. Rem
  14. set echo on;
  15. connect internal;
  16. drop table stats$begin_stats;
  17. drop table stats$begin_latch;
  18. drop table stats$begin_roll;
  19. drop table stats$begin_file;
  20. drop table stats$begin_kqrst;
  21. drop table stats$dual;
  22. drop table stats$dates;
  23. drop view stats$file_view;
  24. create view stats$file_view as
  25.   select ts.name    ts,
  26.          i.kcffinam name,
  27.          x.kcfiopyr pyr,
  28.          x.kcfiopyw pyw,
  29.          x.kcfioprt prt,
  30.          x.kcfiopwt pwt,
  31.          x.kcfiopbr pbr,
  32.          x.kcfiopbw pbw
  33.   from x$kcfio x, ts$ ts, x$kcffi i,file$ f
  34.  where i.kcffiidn=f.file#
  35.    and ts.ts#=f.ts#
  36.    and x.kcfiofno=f.file#;
  37. create table stats$begin_latch as select * from v$latch;
  38. create table stats$begin_roll as 
  39.     select rownum undo#,rssize,gets,waits,writes from v$rollstat;
  40. create table stats$begin_file as select * from stats$file_view;
  41. create table stats$begin_kqrst as select * from x$kqrst;
  42. create table stats$dual (c number);
  43. insert into stats$dual values(1);
  44. create table stats$dates (stats_gather_times char(100));
  45. insert into stats$dates 
  46.    select to_char(sysdate, 'dd-mon-yy hh:mi:ss') from stats$dual;
  47.  
  48. create table stats$begin_stats as select * from v$sysstat;
  49.  
  50.  
  51.  
  52.  
  53.