# 인덱스 진행율 조회 

select a.sid||','||a.serial# dbid, 
      b.process, 
      b.machine, 
      b.terminal, 
      b.program, 
      a.opname,
     (trunc(a.time_remaining/60)||':'||to_char(trunc(mod(a.time_remaining,60)),'00')) l_time,
     (trunc(a.elapsed_seconds/60)||':'||to_char(trunc(mod(a.elapsed_seconds,60)),'00')) e_time,
      a.sofar, 
      a.totalwork, 
      round((sofar/totalwork)*100)||'%' rate,
      a.message,
      to_char(b.logon_time,'yyyy/mm/dd hh:mi:ss') logon_time
from v$session_longops a, v$session b
where a.username = '<오라클 유저>'
  and a.sid = b.sid
  and a.serial# = b.serial#
  and a.time_remaining<>0
  and to_char(b.logon_time,'yyyymmdd') = to_char(sysdate,'yyyymmdd');



# V$SESSION_LONGOPS - 컬럼정의


COLUMN                   DESCRIPTION
-----------------       --------------------------------------------------

SID                            Session identifier
SERIAL#                     Session serial number
OPNAME                    The operation name
TARGET                     The object on which the operation is carried out
TARGET_DESC            Description of the target
SOFAR                        The units of work done so far
TOTALWORK              The total units of work
UNITS                        The units of measurement
START_TIME              The starting time of operation
LAST_UPDATE_TIME   Time when statistics last updated
ELAPSED_SECONDS    The number of elapsed seconds from the start of operations
CONTEXT                   Context
MESSAGE                   Statistics summary message





'::: DB ::: > Oracle' 카테고리의 다른 글

오라클 디폴트 유저  (0) 2009.10.06
[PL/SQL] 인덱스가 없는 테이블 조회  (0) 2009.10.01
Recycling the listener.log File  (0) 2009.09.15
Monitor Import Speed  (0) 2009.09.14
Opatch 기능 및 사용가이드(V9.2)  (0) 2009.09.14

+ Recent posts