SQL agent job details info

SELECT

job.job_id,

notify_level_email,

name,

enabled,

description,

step_name,

command,

server,

database_name,

schedule_id

FROM

msdb.dbo.sysjobs job

INNER JOIN

msdb.dbo.sysjobsteps steps

ON job.job_id = steps.job_id

INNER JOIN msdb.dbo.sysjobschedules sch

on sch.job_id = job.job_id

WHERE

job.enabled = 1

How to determine the cache plan size in SQL server?

How to determine the cache plan size in SQL server?

–SQL 2012+ Plan Cache Size

— How big is the plan cache SQL 2012

select name, sum(pages_kb) /1024.0 MBUsed

from sys.dm_os_memory_clerks

where name = ‘SQL PLans’

group by name;

–Pre-SQL 2012 Plan Cache Size

— How big is the plan cache pre SQL 2012

select name, SUM(single_pages_kb + multi_pages_kb)/1024.0 MBUsed

from sys.dm_os_memory_clerks

where name = ‘SQL PLans’

group by name;