{"id":1033,"date":"2008-08-11T19:10:00","date_gmt":"2008-08-11T19:10:00","guid":{"rendered":"\/blogs\/paul\/post\/How-to-tell-if-you-have-instant-initialization-enabled.aspx"},"modified":"2019-09-27T08:34:15","modified_gmt":"2019-09-27T15:34:15","slug":"how-to-tell-if-you-have-instant-initialization-enabled","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/","title":{"rendered":"How to tell if you have instant initialization enabled?"},"content":{"rendered":"<p style=\"text-align: justify;\">As you may already know, <em>instant file initialization<\/em> is a way to prevent data (not log) file create and grow operations having to zero-initialize the new space before allowing it to be used. This can vastly speed up these operations as zero-initialization can take a *long* time for large files. This is especially useful in disaster recovery operations as the first phase of a restore is always to create the requisite files, if they don&#8217;t already exist. Cutting minutes or even hours from this phase can <em>significantly<\/em> reduce downtime and it&#8217;s in all editions of SQL Server from SQL Server 2005 onward.\u00a0You can get more details from a <a href=\"http:\/\/www.sqlskills.com\/blogs\/kimberly\/instant-initialization-what-why-and-how\/\">blog post of Kimberly&#8217;s<\/a> from March 2007 and note that it only applies to data files (see <a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/search-engine-qa-24-why-cant-the-transaction-log-use-instant-initialization\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a> for why not for log files).<\/p>\n<p style=\"text-align: justify;\">The way to enable it is to give the SQL Server service account (or group that the service account is part of) the <em>&#8216;Perform volume maintenance tasks&#8217; <\/em>privilege and then restart the service, or during installation\/using the config tool for 2016 onwards. There&#8217;s no way to enable it from within SQL Server, and you can disable it using trace flag 1806.<\/p>\n<p style=\"text-align: justify;\">If you&#8217;re running SQL Server 2014 SP2 or later, the state of instant file initialization is reported in the error log during instance startup, as below:<\/p>\n<p style=\"padding-left: 30px; text-align: justify;\"><em>2017-06-16 11:16:49.15 Server Database Instant File Initialization: enabled. For security and performance considerations see the topic &#8216;Database Instant File Initialization&#8217; in SQL Server Books Online. This is an informational message only. No user action is required.<\/em><\/p>\n<p style=\"text-align: justify;\">Before SQL Server 2012, enable trace flags 3004 and 3605 and create\u00a0a dummy database. You&#8217;ll get a message in the error log indicating that SQL Server is zeroing out the log file for the new database. If you do *NOT* have instant file initialization enabled, you&#8217;ll see a similar message for zeroing out the data file of the new database. Don&#8217;t forget to turn the trace flags off again.<\/p>\n<p style=\"text-align: justify;\">After SQL Server 2012, look in the output for the DMV <em>sys.dm_server_services<\/em>\u00a0in the <em>instant_file_initialization_enable<\/em>d column to see whether it&#8217;s enabled or not.<\/p>\n<p style=\"text-align: justify;\">Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you may already know, instant file initialization is a way to prevent data (not log) file create and grow operations having to zero-initialize the new space before allowing it to be used. This can vastly speed up these operations as zero-initialization can take a *long* time for large files. This is especially useful in [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,31,35,38,46,50],"tags":[],"class_list":["post-1033","post","type-post","status-publish","format-standard","hentry","category-backuprestore","category-database-maintenance","category-disaster-recovery","category-example-scripts","category-high-availability","category-instant-initialization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to tell if you have instant initialization enabled? - Paul S. Randal<\/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.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to tell if you have instant initialization enabled? - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"As you may already know, instant file initialization is a way to prevent data (not log) file create and grow operations having to zero-initialize the new space before allowing it to be used. This can vastly speed up these operations as zero-initialization can take a *long* time for large files. This is especially useful in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2008-08-11T19:10:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-27T15:34:15+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/\",\"name\":\"How to tell if you have instant initialization enabled? - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2008-08-11T19:10:00+00:00\",\"dateModified\":\"2019-09-27T15:34:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to tell if you have instant initialization enabled?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to tell if you have instant initialization enabled? - Paul S. Randal","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.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/","og_locale":"en_US","og_type":"article","og_title":"How to tell if you have instant initialization enabled? - Paul S. Randal","og_description":"As you may already know, instant file initialization is a way to prevent data (not log) file create and grow operations having to zero-initialize the new space before allowing it to be used. This can vastly speed up these operations as zero-initialization can take a *long* time for large files. This is especially useful in [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/","og_site_name":"Paul S. Randal","article_published_time":"2008-08-11T19:10:00+00:00","article_modified_time":"2019-09-27T15:34:15+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/","name":"How to tell if you have instant initialization enabled? - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2008-08-11T19:10:00+00:00","dateModified":"2019-09-27T15:34:15+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-tell-if-you-have-instant-initialization-enabled\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"How to tell if you have instant initialization enabled?"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/1033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=1033"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/1033\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=1033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=1033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=1033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}