Hi Ben - I think you're after the following;
SELECT [cx].[refcounts]
, [cx].[usecounts]
, [cx].[objtype]
, [st].[dbid]
, [st].[objectid]
, [st].[text]
, [qp].[query_plan]
FROM sys.dm_exec_cached_plans cx
CROSS APPLY sys.dm_exec_sql_text( cp.plan_handle ) st
CROSS APPLY sys.dm_exec_query_plan( cp.plan_handle ) qp
The statement returns the xml for all execution plans executed on the database using a bunch of DMV's
--------------------------------------------
Laughing in the face of contention...