Tag Archives: cache

MSSQL – See buffer hit ratio

Whit this code, you can see how much of query in percent at this moment is reading from the cache/buffer.

DECLARE @value numeric(25, 2), @basevalue numeric(25, 2)

declare @Cachehitratio real

set @Cachehitratio = null

--Cache hit ratio
SELECT @value = cntr_value FROM master..sysperfinfo (nolock) 
WHERE counter_name = 'Buffer cache hit ratio'
SELECT @basevalue = cntr_value FROM master..sysperfinfo (nolock) 
WHERE counter_name = 'Buffer cache hit ratio base'
set @Cachehitratio= (@value / @basevalue) *100

select @Cachehitratio

Softgrid Appv: Clear AppV Cache

Sometimes problem with AppV Client can be resolving by clearing up the application cache.

To get a list of cache application:

sftmime query obj:app /short

To Remove just one programs from the cache:

sftmime.exe remove app:”ApplicationName” /complete

To empty the cache:

sftmime.exe remove obj:app /global /complete

If you want to wipe the complete cache, you can change State key to Zero, and then reboot the machine.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\AppFS\