{"id":154,"date":"2016-03-14T16:26:14","date_gmt":"2016-03-14T16:26:14","guid":{"rendered":"https:\/\/sqldoubleg.live-website.com\/?p=154"},"modified":"2016-03-14T16:26:14","modified_gmt":"2016-03-14T16:26:14","slug":"the-mysterious-case-of-the-missing-default-value","status":"publish","type":"post","link":"https:\/\/www.sqldoubleg.com\/es\/2016\/03\/14\/the-mysterious-case-of-the-missing-default-value\/","title":{"rendered":"The Mysterious Case of the Missing Default Value"},"content":{"rendered":"<p>Sometimes things are not exactly how we think they are. Read the story of the missing default value and learn why.&nbsp;<em>*First published @ <a href=\"http:\/\/www.sqlservercentral.com\/articles\/SQL+Server+internal+storage\/132990\/\">www.SQLServerCentral.com<\/a> (2015\/12\/01)<\/em><\/p>\n<p>Once upon a time, there was a DBA\u2026 yeah right!<\/p>\n<p>As probably like many SQL DBA\u2019s, little by little I\u2019m getting more curious about how SQL Server works internally. To learn more, I\u2019m using a variety of resources, books, blog posts and more. An important part of internals is the SQL Server storage engine and one of the first things you need to know is how SQL Server stores the data.<\/p>\n<p>First, I have to say I\u2019m not claiming to be an expert, and I don\u2019t pretend to speak like one of them. I hope this story can come across to regular people who want to learn about something curious maybe you have never thought of before.<\/p>\n<p><strong>Background<\/strong><\/p>\n<p>Not so long ago I had to add one column to a table (What a challenge for a DBA!!), but the table I had to deal with was a terrible, 120 million row table. Does that sound more like a challenge?<\/p>\n<p>The column was just a flag (bit), to facilitate some logic when accessing the table. This would also allow us to create some filtered indexes. I wanted the field to be NOT NULL and to have a DEFAULT VALUE of 0.<\/p>\n<p>First idea, easy peasy, just write the command and you\u2019re good to go.<\/p>\n<pre class=\"brush: tsql; title: ; notranslate\" title=\"\">\r\nALTER TABLE dbo.MyTable \r\nADD Flag BIT NOT NULL CONSTRAINT DF_MyTable_Flag_0 DEFAULT 0\r\n<\/pre>\n<p>It\u2019s important to mention this happened on a SQL Server 2008R2 instance, which probably lots of people are still running.<\/p>\n<p>When running this statement, I had time to go for coffee, returning to find it was still running on my DEV box.<\/p>\n<p>OK, that\u2019s something I don\u2019t want to happen. The table was locked and no one could access it. This might not a big deal in a DEV environment, but a big problem in production (24&#215;7), where people are trying to access the table constantly.<\/p>\n<p>According to Books online,<\/p>\n<blockquote><p>The Database Engine uses schema modification (Sch-M) locks during a table data definition language (DDL) operation, such as adding a column or dropping a table. During the time that it is held, the Sch-M lock prevents concurrent access to the table. This means the Sch-M lock blocks all outside operations until the lock is released.\n<\/p><\/blockquote>\n<p>When you have millions of rows to update, writing the simplest and cheapest value (1 byte), will become really expensive. For many minutes your table will be locked and users will be waiting to access the data.<\/p>\n<p>So my idea of defining the column properly (in terms of nullability and default value) got to a point where I had to choose between my users or my ego. Since I can\u2019t have people waiting for something like this, the choice was clear.<\/p>\n<p>I worked around this issue by creating the column as NULL, updating the values to 0 in small batches, and that was it. The job was completed without locking problems.<br \/>\nOK, but what about the mysterious default value? Ups, I almost forgot. \ud83d\ude42<\/p>\n<p>Up to SQL Server 2008R2, when we add a column to a table that contains rows, the metadata is updated, the new column is added to the table, the default constraint is created and every single row within the table is UPDATED to hold the new value, not necessarily in that order.<\/p>\n<p>We can see how it happens in this demo.<\/p>\n<p><strong>Create the playground (SQL Server 2008R2)<\/strong><\/p>\n<p>We need to create one table and insert some values.<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/01_create_playground_2008R2.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/01_create_playground_2008R2.png\" alt=\"01_create_playground_2008R2\" width=\"1041\" height=\"334\" class=\"aligncenter size-full wp-image-167\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/01_create_playground_2008R2.png 1041w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/01_create_playground_2008R2-300x96.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/01_create_playground_2008R2-1024x329.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/01_create_playground_2008R2-150x48.png 150w\" sizes=\"(max-width: 1041px) 100vw, 1041px\" \/><\/a><\/p>\n<p>Now let\u2019s see how this row looks like in a data page. You can use the <del>undocumented<\/del> unsupported commands DBCC IND() and DBCC PAGE(), the first to get a list of pages that belong to my index table and the second to dump the content of one of the pages to my messages tab in SSMS.<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/02_DBCC_PAGE_4_Columns.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/02_DBCC_PAGE_4_Columns.png\" alt=\"02_DBCC_PAGE_4_Columns\" width=\"1052\" height=\"530\" class=\"aligncenter size-full wp-image-168\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/02_DBCC_PAGE_4_Columns.png 1052w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/02_DBCC_PAGE_4_Columns-300x151.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/02_DBCC_PAGE_4_Columns-1024x516.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/02_DBCC_PAGE_4_Columns-150x76.png 150w\" sizes=\"(max-width: 1052px) 100vw, 1052px\" \/><\/a> <\/p>\n<p>If we look at it, we see the first four bytes belong to metadata (I won\u2019t go into it further, though I\u2019d suggest further reading on this), then we can see the values corresponding to our four columns<\/p>\n<p>\u2022\t01000000 is column c1 value 1<br \/>\n\u2022\t02000000 is column c2 value 2<br \/>\n\u2022\t03000000 is column c3 value 3<br \/>\n\u2022\t04000000 is column c4 value 4<br \/>\n\u2022\t040000, the last 3 bytes, the first two belong to the number of columns and the third one to the NULL bitmap<\/p>\n<p>Also we can see how a value stored as INT datatype takes 4 bytes (as expected).<\/p>\n<p>Now if we add our column the way we want, NOT NULL WITH VALUES, we will see how this change is reflected to the data pages.<\/p>\n<p> <a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/03_ALTER_TABLE_DBCC_PAGE_5_Columns.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/03_ALTER_TABLE_DBCC_PAGE_5_Columns.png\" alt=\"03_ALTER_TABLE_DBCC_PAGE_5_Columns\" width=\"1045\" height=\"545\" class=\"aligncenter size-full wp-image-169\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/03_ALTER_TABLE_DBCC_PAGE_5_Columns.png 1045w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/03_ALTER_TABLE_DBCC_PAGE_5_Columns-300x156.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/03_ALTER_TABLE_DBCC_PAGE_5_Columns-1024x534.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/03_ALTER_TABLE_DBCC_PAGE_5_Columns-150x78.png 150w\" sizes=\"(max-width: 1045px) 100vw, 1045px\" \/><\/a><\/p>\n<p>The new column is added after the existing one, and the new value is written. See that 05000000 is column c5 value 5, and the number of columns is updated to five.<br \/>\nThis happened immediately because we had a single row in our table, but let&#8217;s see how this works when we have a large number of rows involved.<\/p>\n<p> <a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/04_ALTER_TABLE_lock_problems.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/04_ALTER_TABLE_lock_problems.png\" alt=\"04_ALTER_TABLE_lock_problems\" width=\"1185\" height=\"578\" class=\"aligncenter size-full wp-image-170\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/04_ALTER_TABLE_lock_problems.png 1185w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/04_ALTER_TABLE_lock_problems-300x146.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/04_ALTER_TABLE_lock_problems-1024x499.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/04_ALTER_TABLE_lock_problems-150x73.png 150w\" sizes=\"(max-width: 1185px) 100vw, 1185px\" \/><\/a><\/p>\n<p>In one of the other windows, we execute a SELECT against our table:<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/05_SELECT_blocked.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/05_SELECT_blocked.png\" alt=\"05_SELECT_blocked\" width=\"967\" height=\"65\" class=\"aligncenter size-full wp-image-171\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/05_SELECT_blocked.png 967w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/05_SELECT_blocked-300x20.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/05_SELECT_blocked-150x10.png 150w\" sizes=\"(max-width: 967px) 100vw, 967px\" \/><\/a><\/p>\n<p>And execute sp_WhoIsActive to see what is going on:<\/p>\n<p> <a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/06_EXECUTE_sp_WhoIsActive.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/06_EXECUTE_sp_WhoIsActive.png\" alt=\"06_EXECUTE_sp_WhoIsActive\" width=\"1030\" height=\"204\" class=\"aligncenter size-full wp-image-172\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/06_EXECUTE_sp_WhoIsActive.png 1030w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/06_EXECUTE_sp_WhoIsActive-300x59.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/06_EXECUTE_sp_WhoIsActive-1024x203.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/06_EXECUTE_sp_WhoIsActive-150x30.png 150w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/a><\/p>\n<p>So for each row in the table, SQL Server actually write the value (see the UPDATE without a WHERE clause). That&#8217;s why it takes so long to execute and prevents any other request to access the table)<\/p>\n<p>OK, but what about the mysterious default value?<\/p>\n<p>It seems like the SQL Server team has been working hard since this process, adding a NOT NULL column WITH VALUES, has become a much less painful process. I will demo it for you.<\/p>\n<p>If I say the same statement will take practically no time even when the table contains millions of rows, would you believe me? OK, get ready for what you\u2019re going to see. This will run in a SQL Server 2012+ instance.<\/p>\n<p><strong>Create the playground (SQL2012 onwards)<\/strong><\/p>\n<p>We create the same table and insert a large amount of rows as we did back in SQL2008R2.<\/p>\n<p> <a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/07_create_playground_2012.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/07_create_playground_2012.png\" alt=\"07_create_playground_2012\" width=\"1052\" height=\"354\" class=\"aligncenter size-full wp-image-173\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/07_create_playground_2012.png 1052w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/07_create_playground_2012-300x101.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/07_create_playground_2012-1024x345.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/07_create_playground_2012-150x50.png 150w\" sizes=\"(max-width: 1052px) 100vw, 1052px\" \/><\/a><\/p>\n<p>Previously we have seen that when we create a new column with a default constraint WITH VALUES, SQL Server had to write those values for each row. We also saw how they are stored on each page for that table.<\/p>\n<p>Let&#8217;s give it a go.<\/p>\n<p> <a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/08_ALTER_TABLE_2012.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/08_ALTER_TABLE_2012.png\" alt=\"08_ALTER_TABLE_2012\" width=\"1047\" height=\"132\" class=\"aligncenter size-full wp-image-174\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/08_ALTER_TABLE_2012.png 1047w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/08_ALTER_TABLE_2012-300x38.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/08_ALTER_TABLE_2012-1024x129.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/08_ALTER_TABLE_2012-150x19.png 150w\" sizes=\"(max-width: 1047px) 100vw, 1047px\" \/><\/a><\/p>\n<p>Wow, that was quick! But wait\u2026 Maybe it didn\u2019t finish properly\u2026 <\/p>\n<p> <a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns.png\" alt=\"09_SELECT_sys_columns\" width=\"1060\" height=\"221\" class=\"aligncenter size-full wp-image-175\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns.png 1060w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns-300x63.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns-1024x213.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns-150x31.png 150w\" sizes=\"(max-width: 1060px) 100vw, 1060px\" \/><\/a><\/p>\n<p>Ok, the column is there, and so are the values. Let\u2019s have a look at one of the pages to see one row. We&#8217;ve seen that specifying the last parameter as 3 in DBCC PAGE() will output each row individually together with each column and value.<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/12_DBCC_PAGE_missing_value.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/12_DBCC_PAGE_missing_value.png\" alt=\"12_DBCC_PAGE_missing_value\" width=\"1044\" height=\"527\" class=\"aligncenter size-full wp-image-178\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/12_DBCC_PAGE_missing_value.png 1044w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/12_DBCC_PAGE_missing_value-300x151.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/12_DBCC_PAGE_missing_value-1024x517.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/12_DBCC_PAGE_missing_value-150x76.png 150w\" sizes=\"(max-width: 1044px) 100vw, 1044px\" \/><\/a> <\/p>\n<p>Errrr, where is the DATA? The row does not have the value on it, but we can see in the detail for each row that c5 = 5. Note also that the column count at the end of the row does not match, still shows 4 (0x0400).<\/p>\n<p>Run again both statements and rub your eyes, the SELECT and DBCC PAGE bring up the column and its value but they actually DO NOT exist in the page, everything is a metadata illusion.<\/p>\n<p><strong>The Metadata<\/strong><\/p>\n<p>The metadata associated to this new column is as follows. First, the SQL engine knows there is a new column.<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns.png\" alt=\"09_SELECT_sys_columns\" width=\"1060\" height=\"221\" class=\"aligncenter size-full wp-image-175\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns.png 1060w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns-300x63.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns-1024x213.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/09_SELECT_sys_columns-150x31.png 150w\" sizes=\"(max-width: 1060px) 100vw, 1060px\" \/><\/a><\/p>\n<p>And it\u2019s aware of the Default constraint definition.<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/10_SELECT_sys_default_constraints.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/10_SELECT_sys_default_constraints.png\" alt=\"10_SELECT_sys_default_constraints\" width=\"1055\" height=\"157\" class=\"aligncenter size-full wp-image-176\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/10_SELECT_sys_default_constraints.png 1055w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/10_SELECT_sys_default_constraints-300x45.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/10_SELECT_sys_default_constraints-1024x152.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/10_SELECT_sys_default_constraints-150x22.png 150w\" sizes=\"(max-width: 1055px) 100vw, 1055px\" \/><\/a><\/p>\n<p>So technically the SQL engine does not care whether the value is stored along with the other values in each row within a data page as long as it knows what the value should be like.<br \/>\nWhat if we UPDATE some of the rows?<\/p>\n<p><a href=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/13_UPDATE_DBCC_PAGE.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sqldoubleg.live-website.com\/wp-content\/uploads\/2016\/03\/13_UPDATE_DBCC_PAGE.png\" alt=\"13_UPDATE_DBCC_PAGE\" width=\"1034\" height=\"400\" class=\"aligncenter size-full wp-image-179\" srcset=\"https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/13_UPDATE_DBCC_PAGE.png 1034w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/13_UPDATE_DBCC_PAGE-300x116.png 300w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/13_UPDATE_DBCC_PAGE-1024x396.png 1024w, https:\/\/www.sqldoubleg.com\/wp-content\/uploads\/2016\/03\/13_UPDATE_DBCC_PAGE-150x58.png 150w\" sizes=\"(max-width: 1034px) 100vw, 1034px\" \/><\/a> <\/p>\n<p>After updating some rows we can see that those rows updated do have the value now (** Note I\u2019m updating c1, nothing to do with c5).<\/p>\n<p>SQL Server knows there is something not quite consistent and it does the job any other time it\u2019s got to go there to update something else\u2026 Smart!<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>The change of behaviour explained is a major improvement and can save a lot of grief for DBAs.The actual work can happen at other more convenient time since the final output can rely exclusively on the column\u2019s metadata. This avoids long term SCHema Modification Locks required by ALTER TABLE that prevent other people from accessing the data. <\/p>\n<p>So seems like we\u2019ve solved the mystery of the missing default value, but wait&#8230; where is record 10?<\/p>\n<p>That&#8217;s another story my friends but don&#8217;t worry, one of these days I will tell you about the \u00abMystery of the 10th record\u00bb.<\/p>\n<p>Hope you have enjoyed the reading, just to finish I want to put together all references and concepts involved in this article.<\/p>\n<p>\u2022<a href=\"https:\/\/msdn.microsoft.com\/en-gb\/library\/ms190273.aspx\" target=\"_blank\">ALTER TABLE ADD COLUMN and Default constraints<\/a><br \/>\n\u2022<a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/ms175519(v=sql.105).aspx\" target=\"_blank\">Locking and blocking<\/a><br \/>\n\u2022<a href=\"http:\/\/blogs.msdn.com\/b\/sqlserverstorageengine\/archive\/2006\/12\/13\/more-undocumented-fun_3a00_-dbcc-ind_2c00_-dbcc-page_2c00_-and-off_2d00_row-columns.aspx\" target=\"_blank\">DBCC IND and DBCC PAGE<\/a><br \/>\n\u2022<a href=\"http:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-anatomy-of-a-record\/\" target=\"_blank\">Database structures, row structure<\/a><br \/>\n\u2022<a href=\"http:\/\/www.sqlskills.com\/blogs\/paul\/sql-server-2008-new-undocumented-physical-row-locator-function\/\" target=\"_blank\">sys.fn_PhysLocFormatter<\/a><br \/>\n\u2022<a href=\"http:\/\/sqlblog.com\/blogs\/adam_machanic\/archive\/2012\/03\/22\/released-who-is-active-v11-11.aspx\" target=\"_blank\">sp_whoIsActive<\/a><\/p>\n<p>Just to say thanks to my friend and reviewer <a href=\"http:\/\/twitter.com\/jonwolds\" target=\"_blank\">@jonwolds<\/a> for his help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes things are not exactly how we think they are. Read the story of the missing default value and learn why.&nbsp;*First published @ www.SQLServerCentral.com (2015\/12\/01) Once upon a time, there was a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[5,12,25],"_links":{"self":[{"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqldoubleg.com\/es\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}