DMF and DMV in SQL Server 2008
What are Dynami开发者_StackOverflow社区c Management Functions (DMF) and Views (DMV) in SQL Server 2005/2008 ?
Dynamic Management Views and Functions (Transact-SQL) documentation:
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.
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.
The link includes more information, including a breakdown of the views & functions along with more specific information...
Introduced in SQL Server 2005 they provide a consistent way to look at the internals of SQL Server instances which previously required a fair bit of hacks. They provide the administrator about the various state of the SQL Server instances - for example sessions, memory etc.
This is the quote Ian W. Stirk
As queries run on a SQLServer database, SQLServer automatically records informa-tion
about the activity that’s taking place, internally into structures in memory;
you can access this information via DMVs.
DMVs are basically SQLviews on some pretty important internal memory structures.
For more knowlage see this link and read this ebook : SQL Server DMVs in Action
精彩评论