Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 2.83 KB

sys-dm-os-stacks-transact-sql.md

File metadata and controls

51 lines (39 loc) · 2.83 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.dm_os_stacks (Transact-SQL)
sys.dm_os_stacks (Transact-SQL)
rwestMSFT
randolphwest
02/27/2023
sql
system-objects
reference
dm_os_stacks
dm_os_stacks_TSQL
sys.dm_os_stacks
sys.dm_os_stacks_TSQL
sys.dm_os_stacks dynamic management view
TSQL
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

sys.dm_os_stacks (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]

This dynamic management view is used internally by [!INCLUDEssNoVersion] to do the following:

  • Keep track of debug data such as outstanding allocations.

  • Assume or validate logic that is used by [!INCLUDEssNoVersion] components in places where the component assumes that a certain call has been made.

Column name Data type Description
stack_address varbinary(8) Unique address for this stack allocation. Is not nullable.
frame_index int Each line represents a function call that, when sorted in ascending order by frame index for a particular stack_address, returns the full call stack. Is not nullable.
frame_address varbinary(8) Address of the function call. Is not nullable.

Remarks

sys.dm_os_stacks requires that the symbols of the server and other components be present on the server to display the information correctly.

Permissions

On [!INCLUDEssNoVersion_md] and SQL Managed Instance, requires VIEW SERVER STATE permission.

On SQL Database Basic, S0, and S1 service objectives, and for databases in elastic pools, the server admin account, the Microsoft Entra admin account, or membership in the ##MS_ServerStateReader## server role is required. On all other SQL Database service objectives, either the VIEW DATABASE STATE permission on the database, or membership in the ##MS_ServerStateReader## server role is required.

Permissions for SQL Server 2022 and later

Requires VIEW SERVER PERFORMANCE STATE permission on the server.

See also

SQL Server Operating System Related Dynamic Management Views (Transact-SQL)