{"id":110,"date":"2018-06-03T13:35:19","date_gmt":"2018-06-03T13:35:19","guid":{"rendered":"http:\/\/dbtut.com\/?p=110"},"modified":"2019-10-31T14:22:23","modified_gmt":"2019-10-31T14:22:23","slug":"how-to-shrink-sql-server-transaction-log","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/","title":{"rendered":"How To Shrink SQL Server Transaction Log"},"content":{"rendered":"<p lang=\"en-US\">Before shrinking the SQL Server log file, I recommend you read articles &#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2018\/05\/31\/what-is-sql-server-transaction-log\/\" target=\"_blank\" rel=\"noopener noreferrer\">What is SQL Server Transaction Log<\/a>&#8221; and\u00a0 &#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2018\/05\/26\/what-is-database-recovery-model\/\" target=\"_blank\" rel=\"noopener noreferrer\">What is Database Recovery Model<\/a>&#8221; that related with this file to understand what this file is.<\/p>\n<p lang=\"en-US\">&#8220;Shrinking the log file&#8221; means that take unused space in the transaction log file back to the operating system.<\/p>\n<p lang=\"en-US\">For example, we have a transaction log file with a size of 100 GB and 99 percent of this file is empty.<\/p>\n<p lang=\"en-US\">By shrinking, you can reduce the size of this file to 1 GB.<\/p>\n<p>Under normal circumstances, you do not need to shrink the log file.<\/p>\n<p>Because even if we shrink, since the file reaches that size it is very likely that it will reach the same size again.<\/p>\n<h2>When To Shrink Transaction Log File<\/h2>\n<h2>Case 1<\/h2>\n<p>In some cases a large transaction can increase the log file size. For example 100 GB to 500 GB.<\/p>\n<p>And if is a transaction that run only once, transaction log file size will be 500 GB unnecessarily.<\/p>\n<p>In such a case it would make sense to shrink the log file to reduce the size to 100 GB.<\/p>\n<h2>Case 2<\/h2>\n<p>In a second scenario, the number of vlf in the log file is too large, so the recover and restore times may be too long.<\/p>\n<p>In such a case, you can shrink and set a healthy auto growth value.<\/p>\n<p>For more detailed information on this process, I would recommend reading the article named &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/09\/vlfvirtual-log-file-count\/\" target=\"_blank\" rel=\"noopener noreferrer\">Vlf (Virtual Log File) Count<\/a>&#8220;.<\/p>\n<p><strong>As an important note<\/strong>, you should not mistakenly shrink the data file while trying to shrink the log file.<\/p>\n<p>Data file can be shrinkable, but this should be avoided if there is another solution.<\/p>\n<p>I would recommend reading this article on &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/05\/how-to-shrink-sql-server-data-file\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Shrink SQL Server Data File<\/a>&#8220;.<\/p>\n<h2>Shrink the Transaction Log File<\/h2>\n<p>Right-click on the database and click Tasks-&gt; Shrink-&gt; Files as follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/390.png\" width=\"699\" height=\"165\" \/><\/p>\n<p>In the screen that appears we choose below options;<\/p>\n<ul>\n<li>&#8220;Log&#8221; from the File type<\/li>\n<li>The log file name we want to shrink from the File name (there can be multiple log files)<\/li>\n<li>&#8220;Reorganize pages before releasing unused space&#8221; from the &#8220;Shrink action&#8221;<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/213.png\" width=\"739\" height=\"668\" \/><\/p>\n<p>After choose the above options, click &#8220;Script Action to New Query Window&#8221; as below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/431.png\" width=\"727\" height=\"203\" \/><\/p>\n<p lang=\"en-US\">As you can see there is 0,60 mb free space in available free space. This means that our file is 60% empty.<\/p>\n<p lang=\"en-US\">The current size of the file is shown in the &#8220;Currently allocated space section&#8221;.<\/p>\n<p lang=\"en-US\">When we select the reorganize pages before releasing unused space, 1 MB(this is currently allocated space) value is shown in the &#8220;shrink file to:&#8221; section. You should type the value in which you want to reduce the file instead of the value here.<\/p>\n<p lang=\"en-US\">When we get the script like above, it gives us the following script.<\/p>\n<pre class=\"\">USE [Test]\nGO\nDBCC SHRINKFILE (N'Test_log' , 1)\nGO<\/pre>\n<p>The script you see above means that the size of the Test_log file will be reduced to 1 MB. We can perform shrink operation by decreasing this value. In our example, it is not necessary to do this because our file is too small. But if our file had a size of 1 GB and there was an empty space of 60%, we could shrink it by 60% by typing in the value we wanted.<\/p>\n<p lang=\"en-US\">The article entitled &#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2018\/05\/25\/sql-server-does-not-truncate-the-transaction-log-after-log-backup-and-can-not-shrink-the-transaction-log\/\" target=\"_blank\" rel=\"noopener noreferrer\">SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log<\/a>&#8221; may also interest you.<\/p>\n<p lang=\"en-US\">\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_110\" class=\"pvc_stats all  \" data-element-id=\"110\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Before shrinking the SQL Server log file, I recommend you read articles &#8220;What is SQL Server Transaction Log&#8221; and\u00a0 &#8220;What is Database Recovery Model&#8221; that related with this file to understand what this file is. &#8220;Shrinking the log file&#8221; means that take unused space in the transaction log file back to the operating system. For &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_110\" class=\"pvc_stats all  \" data-element-id=\"110\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":11007,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[106,2833,2836,2830,2835,5121,2832,2831,2834,57,5096,37,56,38,5125,58,39,5124,5123,5122,46,45,2837,2838,5095],"class_list":["post-110","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mssql","tag-dbcc-shrinkfile","tag-how-do-i-clear-a-sql-server-log-file","tag-how-do-i-reduce-the-size-of-my-database","tag-how-do-i-reduce-the-size-of-my-transaction-log","tag-how-do-i-shrink-a-sql-database","tag-how-do-i-shrink-a-sql-log-file","tag-how-do-i-shrink-a-transaction-log-in-sql-server-2012","tag-how-do-i-shrink-a-transaction-log","tag-how-do-i-shrink-an-sql-ldf-file","tag-how-to-shrink","tag-how-to-shrink-sql-transaction-log","tag-shrink","tag-shrink-log","tag-shrink-log-file","tag-shrink-sql-log-file","tag-shrink-sql-transaction-log","tag-shrink-transaction-log","tag-shrinking-ldf","tag-shrinking-sql-log","tag-shrinking-transaction-log","tag-virtual-log-file","tag-vlf","tag-what-happens-when-you-shrink-a-database","tag-what-is-shrink-sql-server","tag-when-to-shrink-transaction-log-file"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Shrink SQL Server Transaction Log - Database Tutorials<\/title>\n<meta name=\"description\" content=\"How To Shrink SQL Server Transaction Log\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Shrink SQL Server Transaction Log - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"How To Shrink SQL Server Transaction Log\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-03T13:35:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-10-31T14:22:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"545\" \/>\n\t<meta property=\"og:image:height\" content=\"335\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dbtut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dbtut\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"How To Shrink SQL Server Transaction Log\",\"datePublished\":\"2018-06-03T13:35:19+00:00\",\"dateModified\":\"2019-10-31T14:22:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\"},\"wordCount\":559,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png\",\"keywords\":[\"DBCC SHRINKFILE\",\"How do I clear a SQL server log file?\",\"How do I reduce the size of my database?\",\"How do I reduce the size of my transaction log?\",\"How do I shrink a SQL database?\",\"How do I shrink a SQL log file?\",\"How do I shrink a transaction log in SQL Server 2012?\",\"How do I shrink a transaction log?\",\"How do I shrink an SQL LDF file?\",\"how to shrink\",\"how to shrink sql transaction log\",\"shrink\",\"shrink log\",\"shrink log file\",\"shrink sql log file\",\"shrink sql transaction log\",\"shrink transaction log\",\"Shrinking ldf\",\"Shrinking sql log\",\"Shrinking transaction log\",\"virtual log file\",\"vlf\",\"What happens when you shrink a database?\",\"What is shrink SQL Server?\",\"When To Shrink Transaction Log File\"],\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\",\"name\":\"How To Shrink SQL Server Transaction Log - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png\",\"datePublished\":\"2018-06-03T13:35:19+00:00\",\"dateModified\":\"2019-10-31T14:22:23+00:00\",\"description\":\"How To Shrink SQL Server Transaction Log\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png\",\"width\":545,\"height\":335},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Shrink SQL Server Transaction Log\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\",\"name\":\"dbtut\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"caption\":\"dbtut\"},\"description\":\"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.\",\"sameAs\":[\"http:\/\/NurullahCAKIR\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dbtut\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Shrink SQL Server Transaction Log - Database Tutorials","description":"How To Shrink SQL Server Transaction Log","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:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/","og_locale":"en_US","og_type":"article","og_title":"How To Shrink SQL Server Transaction Log - Database Tutorials","og_description":"How To Shrink SQL Server Transaction Log","og_url":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/","og_site_name":"Database Tutorials","article_published_time":"2018-06-03T13:35:19+00:00","article_modified_time":"2019-10-31T14:22:23+00:00","og_image":[{"width":545,"height":335,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png","type":"image\/png"}],"author":"dbtut","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dbtut","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"How To Shrink SQL Server Transaction Log","datePublished":"2018-06-03T13:35:19+00:00","dateModified":"2019-10-31T14:22:23+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/"},"wordCount":559,"commentCount":1,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png","keywords":["DBCC SHRINKFILE","How do I clear a SQL server log file?","How do I reduce the size of my database?","How do I reduce the size of my transaction log?","How do I shrink a SQL database?","How do I shrink a SQL log file?","How do I shrink a transaction log in SQL Server 2012?","How do I shrink a transaction log?","How do I shrink an SQL LDF file?","how to shrink","how to shrink sql transaction log","shrink","shrink log","shrink log file","shrink sql log file","shrink sql transaction log","shrink transaction log","Shrinking ldf","Shrinking sql log","Shrinking transaction log","virtual log file","vlf","What happens when you shrink a database?","What is shrink SQL Server?","When To Shrink Transaction Log File"],"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/","url":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/","name":"How To Shrink SQL Server Transaction Log - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png","datePublished":"2018-06-03T13:35:19+00:00","dateModified":"2019-10-31T14:22:23+00:00","description":"How To Shrink SQL Server Transaction Log","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-1.png","width":545,"height":335},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/03\/how-to-shrink-sql-server-transaction-log\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"How To Shrink SQL Server Transaction Log"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408","name":"dbtut","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","caption":"dbtut"},"description":"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.","sameAs":["http:\/\/NurullahCAKIR"],"url":"https:\/\/dbtut.com\/index.php\/author\/dbtut\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/110\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/11007"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}