TokenAndPermUserStore Cache Issues in SQL Server 2005

I have noticed a few blog entries lately about people having problems with the TokenAndPermUserStore cache growing in SQL Server 2005. This Microsoft KB article explains the issue in some detail.

This is a known issue, and a fix is supposed to be coming from Microsoft pretty soon. In the meantime, you can monitor the situation and clear your caches using the code below:


— Top 10 consumers of memory from Buffer Pool
    SELECT TOP 10 [type], sum(single_pages_kb) AS [SPA Mem, Kb]
    FROM sys.dm_os_memory_clerks
    GROUP BY type 
    ORDER BY SUM(single_pages_kb) DESC;

    — Find out what has the most entries in the buffer cache
    SELECT TOP (20)[Name], COUNT(*) AS ‘Count’
    FROM sys.dm_os_memory_cache_entries
    GROUP BY [Name]

    — Clears procedure cache on entire SQL instance

    — Clears TokenAndPermUserStore cache on entire SQL instance
    DBCC FREESYSTEMCACHE (‘TokenAndPermUserStore’)


Technorati Tags:
This entry was posted in SQL Server 2005. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s