Question on DMV

Hi,

Just wanted to know if there is a DMV through I can able to tell that my workload type is 'ad hoc'?

Any help would be appreciated.

Thanks in advance.

May 19th, 2014 2:50am

select db_name(dbid),sql,usecounts
from master..syscacheobjects where objtype='Adhoc'
order by usecounts asc
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2014 2:54am

Thanks Uri. That was really quick.

Thanks for the help.

May 19th, 2014 2:58am

Thanks Uri. That was really quick.

Thanks for the help.

Hello,

Have a look at DMV sys.dm_exec_cached plans. You could find various information one is below

SELECT plan_handle, query_plan, objtype 
FROM sys.dm_exec_cached_plans 
CROSS APPLY sys.dm_exec_query_plan(plan_handle) 
WHERE objtype='Adhoc'
GO
in output click on query plan it will show you query as well as its plan
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2014 4:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics