??? HOW TO: SQL Server 2000 ?????? ??????

?????? ????????? ?????? ?????????
???? ???????: 283886 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ??????? ??? ????? ???? ????? ????????? ?????? ?????? ?????? ?? ??? ?????? ???? ?? ?????? ?? ??????? ??????? ?? "????? ??????? ?? Microsoft:
283696INF: ???? ?????? ?????? SQL Server 2000 ?? ??????
??? ????? ??? ????? ??? ??? ?? ??????? ??? ?????? ??? ???? SQL Server 2000 ???? ActivityTrace. ???????? ????? ????? ???? trace_gettable ??????? ???????? ?? ??? ?????? ??? ???? SQL Server 2000. ?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
283784INF: ????? ??? SQL Server 2000 ?????? ????????
??????? ??? ????? ??????? ????? ?????? ??????:
  • ??? v_sysperfinfo ???? ?????? ?????? ??????? ?????? ?????? ?? ?????? sysperfinfo.
  • ??? v_BufferCacheHitRatio ????? ???? ?????? ??? ????? ??????? ?????? ?????? ??????.
  • ????? ????? v_difference ???? ????? ??? ????? ???? ???? ?????? ????? ??????.
  • ????? ????? v_Access_methods ???? ???? ?????? ?????? ?????? ??????. ????? % ?????? %:Access ?? ????? v_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]
				

???????

???? ???????: 283886 - ????? ??? ??????: 28/???? ??????/1435 - ??????: 4.5
????? ???
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 2000 64 bit (all editions)
????? ??????: 
kbnosurvey kbarchive kbmt kbhowtomaster kbinfo KB283886 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????283886

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com