VING COUNT(TARGET)>10
GROUP BY OPNAME,TARGET,
B.NUM_ROWS,B.TABLESPACE_NAME;
spool off
exit;
!01
cechon "5.15 full table scan is: " red
echo
cat 515.txt
echo
rm -rf 515.txt
#5.16 Which operating segments using a large number of temporary
sqlplus -S "${ora_user}/${ora_pass} as sysdba" </dev/null #禁止sqlplus执行结果回显
set heading off;
set feedback off;
set termout off;
set pagesize 0;
set verify off;
set echo off;
spool 516.txt
SELECT to_number(decode(SID, 65535, NULL, SID)) sid,
operation_type OPERATION,trunc(EXPECTED_SIZE/1024) ESIZE,
trunc(ACTUAL_MEM_USED/1024) MEM, trunc(MAX_MEM_USED/1024) "MAX MEM",
NUMBER_PASSES PASS, trunc(TEMPSEG_SIZE/1024) TSIZE
FROM V\$SQL_WORKAREA_ACTIVE
ORDER BY 1,2;
spool off
exit;
!01
cechon "5.16 Which operating segments using a large number of temporary is: " red
echo
cat 516.txt
echo
rm -rf 516.txt
#5.17 High degree of fragmentation of the table
sqlplus -S "${ora_user}/${ora_pass} as sysdba" </dev/null #禁止sqlplus执行结果回显
set heading off;
set feedback off;
set termout off;
set pagesize 0;
set verify off;
set echo off;
spool 517.txt
SELECT segment_name table_name,COUNT(*) extents
FROM dba_segments WHERE owner NOT IN ('SYS', 'SYSTEM')
GROUP BY segment_name HAVING COUNT(*)=(SELECT MAX(COUNT(*))
FROM dba_segments GROUP BY segment_name);
spool off
exit;
!01
cechon "5.17 High degree of fragmentation of the table is: " red
echo
cat 517.txt
echo
rm -rf 517.txt
#5.21 Table space I / O ratio of
sqlplus -S "${ora_user}/${ora_pass} as sysdba" </dev/null #禁止sqlplus执行结果回显
set heading off;
set feedback off;
set termout off;
set pagesize 0;
set verify off;
set echo off;
spool 521.txt
SELECT DF.TABLESPACE_NAME NAME,DF.FILE_NAME "FILE",F.PHYRDS PYR,
F.PHYBLKRD PBR,F.PHYWRTS PYW, F.PHYBLKWRT PBW
FROM V\$FILESTAT F, DBA_DATA_FILES DF
WHERE F.FILE# = DF.FILE_ID
ORDER BY DF.TABLESPACE_NAME;
spool off
exit;
!01
cechon "5.21 Table space I / O ratio of is: " red
echo
cat 521.txt
echo
rm -rf 521.txt
#5.22 file system I/O ratio
sqlplus -S "${ora_user}/${ora_pass} as sysdba" </dev/null #禁止sqlplus执行结果回显
set heading off;
set feedback off;
set termout off;
set pagesize 0;
set verify off;
set echo off;
spool 522.txt
SELECT SUBSTR(A.FILE#,1,2) "#", SUBSTR(A.NAME,1,30) "NAME",
A.STATUS, A.BYTES, B.PHYRDS, B.PHYBLKRD PBR, B.PHYWRTS, B.PHYBLKWRT PBW
FROM V\$DATAFILE A,
V\$FILESTAT B
WHERE A.FILE# = B.FILE#;
spool off
exit;
!01
cechon "5.22 file system I/O ratio is: " red
echo
cat 522.txt
echo
rm -rf 522.txt
#5.23 file system I/O ratio
sqlplus -S "${ora_user}/${ora_pass} as sysdba" </dev/null #禁止sqlplus执行结果回显
set heading off;
set feedback off;
set termout off;
set pagesize 0;
set verify off;
set echo off;
spool 523.txt
SELECT SUBSTR(A.FILE#,1,2) "#", SUBSTR(A.NAME,1,30) "NAME",
A.STATUS, A.BYTES, B.PHYRDS, B.PHYBLKRD PBR, B.PHYWRTS, B.PHYBLKWRT PBW
FROM V\$DATAFILE A,
V\$FILESTAT B
WHERE A.FILE# = B.FILE#;
spool off
exit;
!01
cechon "5.23 file system I/O ratio is: " red
echo
cat 523.txt
echo
rm -rf 523.txt
##########5.31-5.40 about REDO##########
#5.31 The current redo log file usage
sqlplus -S "${ora_user}/${ora_pass} as sysdba" </dev/null #禁止sqlplus执行结果回显
set heading off;
set feedback off;
set termout off;
set pagesize 0;
set verify off;
set echo off;
spool 531.txt
select le.leseq "Current log sequence No",
100 * cp.cpodr_bno / le.lesiz "Percent Full",
(cpodr_bno - 1) * 512 "bytes used exclude header",
le.lesiz * 512 - cpodr_bno * 512 "Left space",
le.lesiz *512 "logfile size"
from x\$kcccp cp, x\$kccle le
where LE.