{"id":11238,"date":"2018-05-11T14:23:13","date_gmt":"2018-05-11T12:23:13","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/"},"modified":"2018-05-11T14:23:13","modified_gmt":"2018-05-11T12:23:13","slug":"sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/","title":{"rendered":"SP2 for SQL Server 2016 is available with new helpful DMVs"},"content":{"rendered":"<p>Last month (April 24, 2018), the <a title=\"SQL Server 2016 Service Pack 2 \" href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=56836\" target=\"_blank\">Service Pack 2 for SQL Server 2016<\/a> was released and distributed.<br \/>\nThis Service Pack has new DMVs, already available in SQL Server 2017 RTM.<\/p>\n<p>In this article, I will just write few words about 2 DMVs (<strong>sys.dm_db_log_stats &amp; sys.dm_db_log_info<\/strong>) and a new column <strong>(modified_extent_page_count<\/strong>) in the DMV <strong>sys.dm_db_file_space_usage<\/strong> that I presented during our last event about SQL Server 2017. I think they are really helpful for DBA.<br \/>\nIt\u2019s also the opportunity to present you the demo that I create for our Event.<\/p>\n<h3>Preparation<\/h3>\n<p>First, I create the database smart_backup_2016 and a table Herge_Heros<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">CREATE DATABASE [smart_backup_2016]\n CONTAINMENT = NONE\n ON  PRIMARY\n( NAME = N'smart_backup_2016', FILENAME = N'G:\\MSSQL\\Data\\smart_backup_2016.mdf' )\n LOG ON\n( NAME = N'smart_backup_2016_log', FILENAME = N'G:\\MSSQL\\Log\\smart_backup_2016_log.ldf' )\nGO\n\nUSE smart_backup_2016\nGO\n\nCREATE TABLE [dbo].[Herge_Heros]\n   (\n   [ID] [int] NULL,\n   [Name] [nchar](10) NULL\n   ) ON [PRIMARY]\nGO<\/pre>\n<p>I do a little insert and run a first Full and a first TLog Backup<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">INSERT INTO [Herge_Heros] VALUES(1,'Tintin') -- Tim\nINSERT INTO [Herge_Heros] VALUES(2,'Milou') -- Struppi\n\n\nBACKUP DATABASE [smart_backup_2016] TO  DISK = N'C:\\Temp\\smart_backup.bak' WITH NOFORMAT, NOINIT,  NAME = N'smart_backup-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10\nGO\nBACKUP Log [smart_backup_2016] TO  DISK = N'C:\\Temp\\smart_backup.log' WITH NOFORMAT, NOINIT,  NAME = N'smart_backup-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10\nGO<\/pre>\n<p>After, I insert a lot of line to have more than 50% modified pages<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">INSERT INTO [Herge_Heros] VALUES(3,'Quick') --Strups\nINSERT INTO [Herge_Heros] VALUES(4,'Flupke')  --Stepppke\nGO 100000<\/pre>\n<p>Now, the demo is ready!<\/p>\n<h3>new column modified_extent_page_count in sys.dm_db_file_space_usage<\/h3>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup01.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23276 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup01.jpg\" alt=\"smart_backup01\" width=\"300\" height=\"83\" \/><\/a><br \/>\nAs you can see in this screenshot, the column is really existing in SQL Server 2016 SP2 (13.0.5026.0).<br \/>\nAfter, you can, like us in our DMK maintenance, create an adapted Backup Strategy depending from changes and no more depending from the time.<br \/>\nIn this stored procedure, if the modified pages are greater than 50% of the total pages, it will do a Full Backup and if the modified pages are less than 50%, it will do a Differential Backup.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">USE [dbi_tools]\nGO\n\nCREATE or ALTER PROCEDURE [maintenance].[dbi_smart_backup] @database_name sysname\nas\nDECLARE @pages_changes Numeric(10,0)\nDECLARE @full_backup_threshold INT\nDECLARE @diff_backup_threshold INT\nDECLARE @sql_query nvarchar(max)\nDECLARE @page_change_text nvarchar(20)\nDECLARE @param nvarchar(50)\nDECLARE @backupfile nvarchar(2000)\nSET @full_backup_threshold=50\nSET @diff_backup_threshold=0\nSET @param = N'@pages_changesOUT nvarchar(20) OUTPUT'\nSET @sql_query =N'SELECT @pages_changesOUT=( 100 * Sum(modified_extent_page_count) \/ Sum(total_page_count) ) FROM ['+@database_name+'].sys.dm_db_file_space_usage'\n\nEXECUTE sp_executesql @sql_query,@param ,@pages_changesOUT=@page_change_text OUTPUT; \nSET @pages_changes = CAST(@page_change_text AS Numeric(10,0)) \nIF @pages_changes &gt; @full_backup_threshold\n  BEGIN\n     --Full Backup threshold exceeded, take a full backup\n     Print 'Full Backup Threshold exceeded, take a full backup'\n     SET @backupfile = N'C:\\Temp\\'+@database_name+N'_' + replace(convert(nvarchar(50), GETDATE(), 120), ':','_') + N'.bak'\n   BACKUP DATABASE @database_name TO DISK=@backupfile\n  END\n  ELSE\n  BEGIN\n\t   IF @pages_changes &gt;= @diff_backup_threshold\n\t\tBEGIN\n\t\t\t-- Diff Backup threshold exceeded, take a differential backup\n\t\t\tPrint 'Diff Backup threshold exceeded, take a differential backup'\n\t\t\tSET @backupfile = N'C:\\Temp\\'+@database_name+N'_' + replace(convert(nvarchar(50), GETDATE(), 120), ':','_') + N'.dif'\n\t\t\tBACKUP DATABASE @database_name TO DISK=@backupfile WITH differential\n\t\tEND\n\tELSE\n\t\tBEGIN\n\t\t\t-- No threshold exceeded, No backup\n\t\tPRINT 'No threshold exceeded, No backup'   \n\t\tEND\n  END\nGO<\/pre>\n<p>Now, I run the stored procedure [maintenance].[dbi_smart_backup] in the dbi_tool<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">USE smart_backup_2016;\nGO\nEXEC [dbi_tools].[maintenance].[dbi_smart_backup] @database_name = N'smart_backup_2016'<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup02.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23275 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup02.jpg\" alt=\"smart_backup02\" width=\"300\" height=\"149\" \/><\/a><br \/>\nThe dbi backup Stored Procedure in this case do a Full Backup because the modified pages are 64%.<br \/>\nI check the status of the modified pages and the modified pages are at 5%.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup03.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23274 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup03.jpg\" alt=\"smart_backup03\" width=\"300\" height=\"107\" \/><\/a><br \/>\nIf I restart the stored procedure, I do a differential backup.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup04.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23273 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup04.jpg\" alt=\"smart_backup04\" width=\"300\" height=\"86\" \/><\/a><br \/>\nMy backup strategy is really adapted to the change of pages in the database and no more based on the time (RTO vs RPO).<br \/>\nLet\u2019s go to the new DMV sys.dm_db_log_stats do to the same with the TLog backup.<\/p>\n<h3>DMV sys.dm_db_log_stats<\/h3>\n<p>This DMV gives really good information about the transaction log files and can help to adapt the backup strategy and also control the growth of the file.<br \/>\nThe DMV is very easy to use and for example, if you want to have the growth of the size since the last TLog backup, use the column log_since_last_log_backup_mb<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SELECT log_since_last_log_backup_mb from sys.dm_db_log_stats(DB_ID('smart_backup_2016'))\nGO<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup05.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23272 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup05.jpg\" alt=\"smart_backup05\" width=\"300\" height=\"105\" \/><\/a><br \/>\nLike below, I create in our DMK maintenance an adapted TLOG Backup [dbi_smart_tlog_backup]<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup06.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23271 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup06.jpg\" alt=\"smart_backup06\" width=\"300\" height=\"137\" \/><\/a><br \/>\nIf the TLOG is growing more that 5 MB from the last TLOG backup, It will do a TLOG Backup and if not, no TLOG Backup.<br \/>\nIn my example, the growth is 548 MB, then a TLOG Backup is necessary.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup07.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23270 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup07.jpg\" alt=\"smart_backup07\" width=\"300\" height=\"138\" \/><\/a><br \/>\nAfter, I control the size and as you can see the size since last TLOG Backup is 0.07MB<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup08.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23269 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup08.jpg\" alt=\"smart_backup08\" width=\"300\" height=\"145\" \/><\/a><br \/>\nAs you can see, no TLOG backup\u2026 My backup strategy is adapted to the load! \ud83d\ude09<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup09.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23268 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup09.jpg\" alt=\"smart_backup09\" width=\"300\" height=\"67\" \/><\/a><\/p>\n<h3>DMV sys.dm_db_log_info<\/h3>\n<p>This DMV will help us to have all VLF(Virtual Log File) information and no more using the DBCC Loginfo.<br \/>\nYou can use this DMV very easily like this:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SELECT [name] AS 'Database Name', COUNT(l.database_id) AS 'VLF Count'\nFROM sys.databases s\nCROSS APPLY sys.dm_db_log_info(s.database_id) l\nGROUP BY [name]\n<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-23267 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg\" alt=\"smart_backup10\" width=\"300\" height=\"217\" \/><\/a><\/p>\n<p>These DMVs are very helpful and it is a good thing to have it also in SQL Server 2016 now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month (April 24, 2018), the Service Pack 2 for SQL Server 2016 was released and distributed. This Service Pack has new DMVs, already available in SQL Server 2017 RTM. In this article, I will just write few words about 2 DMVs (sys.dm_db_log_stats &amp; sys.dm_db_log_info) and a new column (modified_extent_page_count) in the DMV sys.dm_db_file_space_usage that&hellip;&nbsp;<\/p>\n","protected":false},"author":15,"featured_media":11248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133,99],"tags":[202,49,566],"class_list":["post-11238","post","type-post","status-publish","format-standard","has-post-thumbnail","category-database","category-sql-server","tag-backup","tag-microsoft","tag-sql-server-2016"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SP2 for SQL Server 2016 is available with new helpful DMVs - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SP2 for SQL Server 2016 is available with new helpful DMVs\" \/>\n<meta property=\"og:description\" content=\"Last month (April 24, 2018), the Service Pack 2 for SQL Server 2016 was released and distributed. This Service Pack has new DMVs, already available in SQL Server 2017 RTM. In this article, I will just write few words about 2 DMVs (sys.dm_db_log_stats &amp; sys.dm_db_log_info) and a new column (modified_extent_page_count) in the DMV sys.dm_db_file_space_usage that&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-11T12:23:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"523\" \/>\n\t<meta property=\"og:image:height\" content=\"378\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Haby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Haby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7980252d7d7a521e285e7c66114cf82a\"},\"headline\":\"SP2 for SQL Server 2016 is available with new helpful DMVs\",\"datePublished\":\"2018-05-11T12:23:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/\"},\"wordCount\":551,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/smart_backup10.jpg\",\"keywords\":[\"Backup\",\"Microsoft\",\"SQL Server 2016\"],\"articleSection\":[\"Database\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/\",\"name\":\"SP2 for SQL Server 2016 is available with new helpful DMVs - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/smart_backup10.jpg\",\"datePublished\":\"2018-05-11T12:23:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/smart_backup10.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/smart_backup10.jpg\",\"width\":523,\"height\":378},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SP2 for SQL Server 2016 is available with new helpful DMVs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/7980252d7d7a521e285e7c66114cf82a\",\"name\":\"St\u00e9phane Haby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/STH_web-min-scaled.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/STH_web-min-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/STH_web-min-scaled.jpg\",\"caption\":\"St\u00e9phane Haby\"},\"description\":\"St\u00e9phane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/stephane-haby\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SP2 for SQL Server 2016 is available with new helpful DMVs - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/","og_locale":"en_US","og_type":"article","og_title":"SP2 for SQL Server 2016 is available with new helpful DMVs","og_description":"Last month (April 24, 2018), the Service Pack 2 for SQL Server 2016 was released and distributed. This Service Pack has new DMVs, already available in SQL Server 2017 RTM. In this article, I will just write few words about 2 DMVs (sys.dm_db_log_stats &amp; sys.dm_db_log_info) and a new column (modified_extent_page_count) in the DMV sys.dm_db_file_space_usage that&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2018-05-11T12:23:13+00:00","og_image":[{"width":523,"height":378,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg","type":"image\/jpeg"}],"author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7980252d7d7a521e285e7c66114cf82a"},"headline":"SP2 for SQL Server 2016 is available with new helpful DMVs","datePublished":"2018-05-11T12:23:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/"},"wordCount":551,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg","keywords":["Backup","Microsoft","SQL Server 2016"],"articleSection":["Database","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/","url":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/","name":"SP2 for SQL Server 2016 is available with new helpful DMVs - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg","datePublished":"2018-05-11T12:23:13+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/smart_backup10.jpg","width":523,"height":378},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sp2-for-sql-server-2016-is-available-with-new-helpful-dmvs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SP2 for SQL Server 2016 is available with new helpful DMVs"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/7980252d7d7a521e285e7c66114cf82a","name":"St\u00e9phane Haby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/STH_web-min-scaled.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/STH_web-min-scaled.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/STH_web-min-scaled.jpg","caption":"St\u00e9phane Haby"},"description":"St\u00e9phane Haby has more than 20 years of experience in Microsoft solutions, specializing in the installation, migration, best practices, and performance analysis of Microsoft SQL Server, as well as Microsoft Business Intelligence solutions (SharePoint, Office) and .NET development for the banking sector. A former Microsoft Most Valuable Professional (MVP) and early adopter of Microsoft Team System in France, he has authored several technical articles. He holds Microsoft Certified Solutions Associate (MCSA) and Expert (MCSE) for SQL Server, MCTS, MCITP for SQL Server 2008, and ITIL V3 Foundation certifications. His industry experience covers chemicals and pharma, banking, and financial services.","url":"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=11238"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11238\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/11248"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=11238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=11238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=11238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}