P & O tools - missing script

Seems I lost the tail end of my posting - the blog timed out in the middle of writing the post, sorry.

This is the script to use against the procedure cache, it returns information for one database only and should be run in the master database

select bucketid,cacheobjtype,objtype,objid,name,refcounts,usecounts,syscacheobjects.uid,setopts,sqlbytes,sql
from master.dbo.syscacheobjects with (nolock) left outer join
mydatabase.dbo.sysobjects with (nolock)
on objid=id
where dbid=mydatabase_id 
order by objid

substitute your database name and id in the appropriate place in the code. There's a function on another web site which will turn the numeric setopts values back into the SET options, I was unable to fully validate this function.

Published 28 November 2006 21:07 by GrumpyOldDBA
Filed under:

Comments

No Comments