• sys.dm_exec_query_plan ( plan_handle ) has a dbid field.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service