SQL Server 2000 성능 데이터 보기
이 문서가 적용되는 제품 보기.
기술 자료 ID : 283886
마지막 검토 : 2006년 1월 20일 금요일
수정 : 4.1

이 문서는 이전에 다음 ID로 출판되었음: KR283886
이 페이지에서
 요약
   v_sysperfinfo 보기 
   v_BufferCacheHitRatio 보기
   v_difference 보기
   v_Access_methods 보기
   v_object_names 보기
 본 문서의 정보는 다음의 제품에 적용됩니다.

요약
이 문서에서는 Microsoft 기술 자료의 다음 문서에서 설명하는 작업에서 만든 추적 파일의 성능 데이터를 분석하는 데 사용할 수 있는 보기를 설명합니다.
283696 (http://support.microsoft.com/kb/283696/) INF: SQL Server 2000 성능 및 활동 모니터링 작업
이러한 보기를 만들기 전에 추적 파일을 ActivityTrace라는 SQL Server 2000 테이블로 가져와야 합니다. 저장 프로시저 trace_gettable의 스크립트를 사용하면 추적 파일의 데이터를 SQL Server 2000 테이블로 가져올 수 있습니다. 자세한 내용은 Microsoft 기술 자료의 다음 문서를 참조하십시오.
283784 (http://support.microsoft.com/kb/283784/) INF: SQL Server 2000 작업 데이터를 보는 방법
다음 보기를 사용하여 성능 데이터를 분석합니다. • v_sysperfinfo 보기는 sysperfinfo 테이블에서 추적에 의해 기록된 성능 카운터를 나열합니다.
• v_BufferCacheHitRatio 보기는 버퍼 캐시 적중률을 계산합니다.
• v_difference 보기는 최대 카운터 값과 최소 카운터 값의 차이를 나열합니다.
• v_Access_methods 보기는 액세스 메서드 개체에 대한 모든 카운터를 나열합니다. 다른 카운터를 나열하려면 v_Access_methods 보기의 %:Access Methods%를 다른 개체로 변경합니다.
• v_object_names 보기는 모든 성능 개체 이름을 나열합니다.

v_sysperfinfo 보기
CREATE      view v_sysperfinfo as
select top 100 percent
 RowNumber,[servername],[starttime]
,substring(TextData,  1,40) as [object_name]
,substring(TextData, 41,40) as [counter_name]
,substring(TextData,81,35) as [instance_name]
,cast(substring(TextData,116,11) as int) as [cntr_value]
  from ActivityTrace
 where EventClass = 83
 order by
  substring(TextData, 1,40)
 ,substring(TextData,41,40)
 ,substring(TextData,81,35)
 ,starttime

v_BufferCacheHitRatio 보기
CREATE  view v_BufferCacheHitRatio as
select top 100 percent a.starttime
   , cast(substring(a.TextData,116,11) as int) as [hits]
   , cast(substring(b.TextData,116,11) as int) as [base]
   , cast(((cast(substring(a.TextData,116,11) as int) * 100)
   / cast(substring(b.TextData,116,11) as int)) as numeric(6,3))
  as [Buffer cache hit ratio]
 from ActivityTrace a join ActivityTrace b
    on datepart(yy,a.starttime) = datepart(yy,b.starttime)
  and datepart(mm,a.starttime) = datepart(mm,b.starttime)
   and datepart(dd,a.starttime) = datepart(dd,b.starttime)
   and datepart(hh,a.starttime) = datepart(hh,b.starttime)
   and datepart(mi,a.starttime) = datepart(mi,b.starttime)
   and datepart(ss,a.starttime) = datepart(ss,b.starttime)
   and substring(a.TextData,41,27) = N'Buffer cache hit ratio     '
   and substring(b.TextData,41,27) = N'Buffer cache hit ratio base'
 order by a.starttime
    
 위로 가기

v_difference 보기
CREATE    view v_difference as
select top 100 percent
       substring(TextData,  1,40) as [object_name]
      ,substring(TextData, 41,40) as [counter_name]
      ,substring(TextData,81,35)  as [instance_name]
   ,max(cast(substring(TextData,116,11) as int)) as [maximum]
   ,min(cast(substring(TextData,116,11) as int)) as [minimum]
   ,max(cast(substring(TextData,116,11) as int))
   -min(cast(substring(TextData,116,11) as int)) as [difference]
      ,count(*) as [count]
      ,datediff(mi,min(StartTime),max(StartTime)) as [minutes]
  from ActivityTrace
 where EventClass = 83
 group by
       substring(TextData,  1,40)
      ,substring(TextData, 41,40)
      ,substring(TextData,81,35)
having max(cast(substring(TextData,116,11) as int))
   -min(cast(substring(TextData,116,11) as int)) > 0
order by [difference] desc
  

v_Access_methods 보기
CREATE view v_Access_methods as
select top 100 percent
 substring(TextData,41,40) as [counter name]
,left(starttime,20) as [time]
,cast(substring(TextData,116,11) as int) as [counter value]
 from ActivityTrace
 where substring(TextData,1,40) like '%:Access Methods%'
 order by substring(TextData,41,40), starttime
  

v_object_names 보기
create view v_object_names as
select top 100 percent
substring(TextData,charindex(':',TextData),25) as [object_name]
  from ActivityTrace
 where EventClass = 83
 group by
  substring(TextData,charindex(':',TextData),25)
 order by [object_name]
   

반응형

+ Recent posts