| title | sys.dm_exec_cached_plan_dependent_objects (Transact-SQL) | Microsoft Docs | ||||
|---|---|---|---|---|---|
| ms.custom | |||||
| ms.date | 03/16/2017 | ||||
| ms.prod | sql | ||||
| ms.prod_service | database-engine, sql-database | ||||
| ms.reviewer | |||||
| ms.technology | system-objects | ||||
| ms.topic | language-reference | ||||
| f1_keywords |
|
||||
| dev_langs |
|
||||
| helpviewer_keywords |
|
||||
| ms.assetid | 9b6cf5f7-b267-44fb-aac8-f49c9aa10cc1 | ||||
| author | stevestein | ||||
| ms.author | sstein | ||||
| monikerRange | =azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current |
[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx-md]
Returns a row for each [!INCLUDEtsql] execution plan, common language runtime (CLR) execution plan, and cursor associated with a plan.
sys.dm_exec_cached_plan_dependent_objects(plan_handle)
plan_handle
Is a token that uniquely identifies a query execution plan for a batch that has executed and its plan resides in the plan cache. plan_handle is varbinary(64).
The plan_handle can be obtained from the following dynamic management objects:
| Column name | Data type | Description |
|---|---|---|
| usecounts | int | Number of times the execution context or cursor has been used. Column is not nullable. |
| memory_object_address | varbinary(8) | Memory address of the execution context or cursor. Column is not nullable. |
| cacheobjtype | nvarchar(50) | The Plan cache object type. Column is not nullable. Possible values are Executable plan CLR compiled function CLR compiled procedure Cursor |
Requires VIEW SERVER STATE permission on the server.
| From | To | On | Relationship |
|---|---|---|---|
| dm_exec_cached_plan_dependent_objects | dm_os_memory_objects | memory_object_address | One-to-one |
Execution Related Dynamic Management Views and Functions (Transact-SQL)
Dynamic Management Views and Functions (Transact-SQL)
sys.syscacheobjects (Transact-SQL)
