System Dynamic Management Views

https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/system-dynamic-management-views?view=sql-server-2017

APPLIES TO: SQL Server Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse

Dynamic management views and functions return server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance.

Important

Dynamic management views and functions return internal, implementation-specific state data. Their schemas and the data they return may change in future releases of SQL Server. Therefore, dynamic management views and functions in future releases may not be compatible with the dynamic management views and functions in this release. For example, in future releases of SQL Server, Microsoft may augment the definition of any dynamic management view by adding columns to the end of the column list. We recommend against using the syntax SELECT * FROM dynamic_management_view_name in production code because the number of columns returned might change and break your application.

There are two types of dynamic management views and functions:

  • Server-scoped dynamic management views and functions. These require VIEW SERVER STATE permission on the server.

  • Database-scoped dynamic management views and functions. These require VIEW DATABASE STATE permission on the database.

Querying Dynamic Management Views

Dynamic management views can be referenced in Transact-SQL statements by using two-part, three-part, or four-part names. Dynamic management functions on the other hand can be referenced in Transact-SQL statements by using either two-part or three-part names. Dynamic management views and functions cannot be referenced in Transact-SQL statements by using one-part names.

All dynamic management views and functions exist in the sys schema and follow this naming convention dm_*. When you use a dynamic management view or function, you must prefix the name of the view or function by using the sys schema. For example, to query the dm_os_wait_stats dynamic management view, run the following query:

SQLCopy
SELECT wait_type, wait_time_ms
FROM sys.dm_os_wait_stats;

Required Permissions

To query a dynamic management view or function requires SELECT permission on object and VIEW SERVER STATE or VIEW DATABASE STATE permission. This lets you selectively restrict access of a user or login to dynamic management views and functions. To do this, first create the user in master and then deny the user SELECT permission on the dynamic management views or functions that you do not want them to access. After this, the user cannot select from these dynamic management views or functions, regardless of database context of the user.

Note

Because DENY takes precedence, if a user has been granted VIEW SERVER STATE permissions but denied VIEW DATABASE STATE permission, the user can see server-level information, but not database-level information.

In This Section

Dynamic management views and functions have been organized into the following categories.

   
Always On Availability Groups Dynamic Management Views and Functions (Transact-SQL) Memory-Optimized Table Dynamic Management Views (Transact-SQL)
Change Data Capture Related Dynamic Management Views (Transact-SQL) Object Related Dynamic Management Views and Functions (Transact-SQL)
Change Tracking Related Dynamic Management Views Query Notifications Related Dynamic Management Views (Transact-SQL)
Common Language Runtime Related Dynamic Management Views (Transact-SQL) Replication Related Dynamic Management Views (Transact-SQL)
Database Mirroring Related Dynamic Management Views (Transact-SQL) Resource Governor Related Dynamic Management Views (Transact-SQL)
Database Related Dynamic Management Views (Transact-SQL) Security-Related Dynamic Management Views and Functions (Transact-SQL)
Execution Related Dynamic Management Views and Functions (Transact-SQL) Server-Related Dynamic Management Views and Functions (Transact-SQL)
Extended Events Dynamic Management Views Service Broker Related Dynamic Management Views (Transact-SQL)
Filestream and FileTable Dynamic Management Views (Transact-SQL) Spatial Data Related Dynamic Management Views and Functions (Transact-SQL)
Full-Text Search and Semantic Search Dynamic Management Views and Functions (Transact-SQL) SQL Data Warehouse and Parallel Data Warehouse Dynamic Management Views (Transact-SQL)
Geo-Replication Dynamic Management Views and Functions (Azure SQL Database) SQL Server Operating System Related Dynamic Management Views (Transact-SQL)
Index Related Dynamic Management Views and Functions (Transact-SQL) Stretch Database Dynamic Management Views (Transact-SQL)
I O Related Dynamic Management Views and Functions (Transact-SQL) Transaction Related Dynamic Management Views and Functions (Transact-SQL)

[转帖]System Dynamic Management Views的更多相关文章

  1. [Windows Azure] Monitoring SQL Database Using Dynamic Management Views

    Monitoring Windows Azure SQL Database Using Dynamic Management Views 5 out of 7 rated this helpful - ...

  2. Oracle Dynamic Performance Views Version 12.2.0.1

    Oracle Dynamic Performance ViewsVersion 12.2.0.1 https://www.morganslibrary.org/reference/dyn_perf_v ...

  3. System.Dynamic.ExpandoObject 类型的简单使用

    该类型可以实现的是动态添加属性和移除属性,有点类似 js 中对象的操作,非常灵活 static void Main(string[] args) { dynamic obj = new System. ...

  4. C#4.0 System.Dynamic

    System.Dynamic 命名空间提供支持动态语言运行时的类和接口. 代码下载地址:GitHub 本篇主要讲两个类:①ExpandoObject   ②DynamicObject  (重点) ①E ...

  5. C#-System.Dynamic.ExpandoObject

    dynamic dynamicObject = new System.Dynamic.ExpandoObject(); dynamicObject.Id = Guid.NewGuid(); (dyna ...

  6. MVC 无法将带 [] 的索引应用于“System.Dynamic.DynamicObject”类型的表达式

    无法将带 [] 的索引应用于“System.Dynamic.DynamicObject”类型的表达式 说明: 执行当前 Web 请求期间,出现未经处理的异常.请检查堆栈跟踪信息,以了解有关该错误以及代 ...

  7. Operating System Memory Management、Page Fault Exception、Cache Replacement Strategy Learning、LRU Algorithm

    目录 . 引言 . 页表 . 结构化内存管理 . 物理内存的管理 . SLAB分配器 . 处理器高速缓存和TLB控制 . 内存管理的概念 . 内存覆盖与内存交换 . 内存连续分配管理方式 . 内存非连 ...

  8. [Windows Azure] Walkthrough to Configure System Center Management Pack for Windows Azure Fabric Preview for SCOM 2012 SP1 (with a MetricsHub Bonus)

    The wait is finally over. This is a huge update to the Azure Management Pack over the one that was r ...

  9. [转帖]system()、exec()、fork()三个与进程有关的函数的比较

    system().exec().fork()三个与进程有关的函数的比较 https://www.cnblogs.com/qingergege/p/6601807.html 启动新进程(system函数 ...

随机推荐

  1. jquery的tap会执行2次的替换办法

    用touchend替换 $(".videoCall").on("touchend",function(){ })$(".videoCall" ...

  2. Vue 中的 ref $refs

    ref 被用来给DOM元素或子组件注册引用信息.引用信息会根据父组件的 $refs 对象进行注册.如果在普通的DOM元素上使用,引用信息就是元素; 如果用在子组件上,引用信息就是组件实例 注意:只要想 ...

  3. LOJ6436. 「PKUSC2018」神仙的游戏 [NTT]

    传送门 思路 首先通过各种手玩/找规律/严谨证明,发现当\(n-i\)为border当且仅当对于任意\(k\in[0,i)\),模\(i\)余\(k\)的位置没有同时出现0和1. 换句话说,拿出任意一 ...

  4. Truffle测试框架

    Truffle测试框架 2018年06月08日 19:01:19 tianlongtc 阅读数 1000   Truffle 有一个标准的自动化测试框架,让你可以非常方便地测试您的合约.这个框架允许您 ...

  5. x86 linux下如何交叉编译?

    答: 需要首先指定两个环境变量CROSS_COMPILE和ARCH 如交叉编译arm64的程序: export CROSS_COMPILE="aarch64-linux-gnu-" ...

  6. [dart学习]第七篇:类(构造函数)

    前言:楼主平时基本没有使用过异常处理,所以对异常的认知可能不够准确,这里就不翻译异常的相关内容了,大家可以去官网自行阅读介绍,地址 https://dart.dev/guides/language/l ...

  7. Swift中添加标记(MARK)和警告(TODO FIXME)

    //MARK: - 注释说明 //FIXME: - 表示此处有bug 或者要优化 //TODO:  - 一般用于写到哪了 做个标记,让后回来继续 开启警告: 参考博客: http://blog.csd ...

  8. CentOS查看每个进程的网络流量

    所需工具nethogs 安装:yum install -y nethogs 使用:nethogs eth0 sudo nethogs -s //按接收流量大小排序 如上图,PID一列就是进程的PID, ...

  9. Flutter打包release版本安卓apk包真机安装无法请求网络的解决方法

    今天flutter build apk打包了一个release.apk包,在真机上安装后网络数据都不显示,但是在模拟器上没问题,然后又连接真机开debug各种测试,一切都正常!那这会是什么问题呢? 查 ...

  10. 【从零开始搭建K8S】【第一篇】CentOS7.6离线安装Docker(手动安装以及基于yum本地源安装)

    下载CentOS7.6以及最小化安装CentOS7.6版本.由于CentOS属于开源软件,在国内也有很多的mirror站点可供下载,我选择的是华为站点进行下载:http://mirrors.huawe ...