{"id":60,"date":"2018-05-25T13:04:23","date_gmt":"2018-05-25T13:04:23","guid":{"rendered":"http:\/\/dbtut.com\/?p=60"},"modified":"2020-10-13T14:19:46","modified_gmt":"2020-10-13T14:19:46","slug":"sql-server-does-not-truncate-the-transaction-log-after-log-backup-and-can-not-shrink-the-transaction-log","status":"publish","type":"post","link":"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\/","title":{"rendered":"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log"},"content":{"rendered":"<p>If you regularly backup your sql server transaction log of your database that uses full recovery model, it truncate the Transaction Log file after each log backup under normal conditions. Thus, this prevents the transaction log file from growing. You can see the details in <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/backup-restore\/back-up-a-transaction-log-sql-server?view=sql-server-ver15\" target=\"_blank\" rel=\"noopener noreferrer\">docs.microsoft.com<\/a><\/p>\n<p>If your sql server log file not shrinking after backup this article will help you.<\/p>\n<p>In addition a friend asked me a question? Does sql server full backup truncate the log?<\/p>\n<p>Short answer is no, sql server full backup does not truncate log.<\/p>\n<p><strong>If CDC(Change Data Capture) or replication is enabled in your database<\/strong>, SQL Server will not truncate the transaction log file or you will not be able to shrink the transaction log file after backing up the Transaction Log, and this start filling your disks.<\/p>\n<h2>Why SQL Server does not truncate transaction log or you can not shrink log file?<\/h2>\n<p>Normally, the log file may not be truncated after a backup for another reason. We can learn why the log file is not truncated using the following query.<\/p>\n<pre class=\"\">USE mydatabase\r\nGO\r\nselect log_reuse_wait_desc from sys.databases where database_id=DB_ID()<\/pre>\n<p><strong>If the log_reuse_wait_desc is LOG_BACKUP,<\/strong> this means that transaction log is not backed up. To shrink the log file, you should backup your transaction log one or more times.<\/p>\n<p>If you are using the full recovery model, you should create a job to backup transaction logs on a regular basis. You may want to read the article titled &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/05\/26\/database-recovery-models\/\" target=\"_blank\" rel=\"noopener noreferrer\">Database Recovery Models<\/a>&#8220;.<\/p>\n<p><strong>If the log_reuse_wait_desc is replication and you can not shrink log,<\/strong> and no replication has been configured on the database, then this means that CDC is enabled in your database. If you use replication and see this error you should check the replication status. Probably there are some errors about replication and SQL Server does not truncate the transaction log due to hold the changed data in the transaction log. That&#8217;s why fix the error about replication to solve this error.<\/p>\n<h2>Disable CDC<\/h2>\n<p>To disable the CDC, you must use the following command.<\/p>\n<pre class=\"\">USE mydatabase\r\nGO\r\nEXEC sys.sp_cdc_disable_db\u00a0\r\nGO<\/pre>\n<p>After disabling the CDC, you will not be able to shrink the log file for a while.<\/p>\n<p>This is because the <strong>CHECKPOINT<\/strong> process has not yet been triggered.<\/p>\n<p>When you execute the above query again after the CHECKPOINT operation is triggered, it will write nothing in the log_reuse_wait_desc column and the transaction log file will become shrinkable.<\/p>\n<p>You can find the details of the CHECKPOINT operation in the article named &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/05\/28\/database-checkpoint\/\" target=\"_blank\" rel=\"noopener noreferrer\">Database Checkpoint<\/a>&#8221;<\/p>\n<p>There could be another reason such as ACTIVE_TRANSACTION. You should read the article &#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2019\/03\/26\/transaction-log-for-database-is-full-due-to-a-reason-active-transaction-log-backup-replication\/\" target=\"_blank\" rel=\"noopener noreferrer\">Transaction Log For Database is Full Due To a Reason (ACTIVE_TRANSACTION, LOG_BACKUP, REPLICATION)<\/a>&#8221;<\/p>\n<h3>Is it possible to truncate log with TSQL?<\/h3>\n<p>If log_reuse_wait_desc is nothing and you shrink transaction log file with below tsql, it will truncate transaction log automatically.<\/p>\n<pre class=\"lang:default decode:true \">BACKUP LOG [MyDB] TO  DISK = N'C:\\Backup\\MyTransactionLogBackup.trn' \r\nWITH NOFORMAT, NOINIT,  NAME = N'MyDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 1\r\nGO\r\n<\/pre>\n<p>But be careful when backing up transaction log, it will broke your backup chain. So if you have a transaction log backup schedule and if you backup your transaction log with tsql outside of scheduled log backup with the above script, you should not lose this log backup file. Because when you want to restore your database from your backups it will need all transaction log backups. See below articles;<\/p>\n<p class=\"name post-title entry-title\"><a href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/22\/backup-restore-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Backup Restore On SQL Server,<\/a><\/p>\n<p class=\"name post-title entry-title\"><a href=\"https:\/\/dbtut.com\/index.php\/2019\/08\/08\/point-in-time-restore-with-database-recovery-advisor\/\" target=\"_blank\" rel=\"noopener noreferrer\">Point-in-time Restore With Database Recovery Advisor<\/a><\/p>\n<p><b>Conclusion<\/b><\/p>\n<p>If everything I mentioned not working and sql server transaction log not shrinking after backup and log_reuse_wait_desc nothing, backup your transaction log again and see what is going on.<\/p>\n<p>Also I suggest to read the article <a href=\"https:\/\/dbtut.com\/index.php\/2018\/05\/31\/what-is-sql-server-transaction-log\/\">What is SQL Server Transaction Log <\/a>to understand the importance of SQL Server transaction log file.<\/p>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_60\" class=\"pvc_stats all  \" data-element-id=\"60\" 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>If you regularly backup your sql server transaction log of your database that uses full recovery model, it truncate the Transaction Log file after each log backup under normal conditions. Thus, this prevents the transaction log file from growing. You can see the details in docs.microsoft.com If your sql server log file not shrinking after &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_60\" class=\"pvc_stats all  \" data-element-id=\"60\" 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":10956,"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":[2704,2705,40,44,22,1116,2697,2676,2707,2806,2807,2700,42,43,10183,2701,2702,41,37,38,39,2698,10179,2788,10185,10182,10184,10180,27,8972,2699,1115,1114,2703,10181,10186,2808,2706,2675],"class_list":["post-60","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mssql","tag-can-not-shrink-log-file","tag-can-not-shrink-transaction-log","tag-cdc","tag-change-data-capture","tag-checkpoint","tag-db_id","tag-dbcc-shrinkfile-not-releasing-space","tag-disable-cdc","tag-does-a-transaction-log-backup-truncate-the-log","tag-does-transaction-log-shrink-after-backup","tag-how-do-i-truncate-a-transaction-log","tag-log-backup-does-not-truncate-the-log","tag-log_backup","tag-log_reuse_wait_desc","tag-log_reuse_wait_desc-replication-shrink-log","tag-logs-not-shrinking-after-backup","tag-logs-not-truncating-after-backup","tag-replication","tag-shrink","tag-shrink-log-file","tag-shrink-transaction-log","tag-shrinking-the-log-file-does-not-reduce-size","tag-sql-backup-log-truncate","tag-sql-server-does-not-truncate-the-transaction-log","tag-sql-server-log-file-not-shrinking","tag-sql-server-transaction-log-not-shrinking-after-backup","tag-sql-server-truncate-log","tag-sql-server-truncate-transaction-log","tag-transaction-log","tag-transaction-log-cannot-shrink","tag-transaction-log-does-not-truncated-even-after-log-backup","tag-transaction-log-file-does-not-shrink","tag-transaction-log-file-does-not-shrink-or-truncate","tag-transaction-log-is-not-truncating","tag-truncate-log-file-sql","tag-truncate-transaction-log","tag-what-is-transaction-log-backup","tag-why-the-log-file-does-not-shrink-or-truncate","tag-why-the-log-file-is-not-truncated"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log - Database Tutorials<\/title>\n<meta name=\"description\" content=\"If you backup transaction log of database that uses full recovery model, it truncate the Transaction Log file after each log backup normally.\" \/>\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\/05\/25\/sql-server-does-not-truncate-the-transaction-log-after-log-backup-and-can-not-shrink-the-transaction-log\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"If you backup transaction log of database that uses full recovery model, it truncate the Transaction Log file after each log backup normally.\" \/>\n<meta property=\"og:url\" content=\"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\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-25T13:04:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-13T14:19:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"712\" \/>\n\t<meta property=\"og:image:height\" content=\"388\" \/>\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\/05\/25\/sql-server-does-not-truncate-the-transaction-log-after-log-backup-and-can-not-shrink-the-transaction-log\/#article\",\"isPartOf\":{\"@id\":\"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\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log\",\"datePublished\":\"2018-05-25T13:04:23+00:00\",\"dateModified\":\"2020-10-13T14:19:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"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\/\"},\"wordCount\":632,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"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\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png\",\"keywords\":[\"can not shrink log file\",\"can not shrink transaction log\",\"cdc\",\"Change Data Capture\",\"Checkpoint\",\"DB_ID()\",\"DBCC ShrinkFile Not releasing Space\",\"Disable CDC\",\"Does a transaction log backup truncate the log?\",\"Does transaction log shrink after backup?\",\"How do I truncate a transaction log?\",\"Log Backup Does Not Truncate the Log\",\"LOG_BACKUP\",\"log_reuse_wait_desc\",\"log_reuse_wait_desc replication shrink log\",\"Logs not Shrinking after Backup\",\"Logs not truncating after Backup\",\"replication\",\"shrink\",\"shrink log file\",\"shrink transaction log\",\"Shrinking the log file does not reduce size\",\"sql backup log truncate\",\"SQL Server does not truncate the transaction log\",\"sql server log file not shrinking\",\"sql server transaction log not shrinking after backup\",\"sql server truncate log\",\"sql server truncate transaction log\",\"Transaction Log\",\"transaction log cannot shrink\",\"Transaction log does not truncated even after log backup\",\"Transaction Log File Does Not Shrink\",\"Transaction Log File Does Not Shrink or Truncate\",\"Transaction Log is not Truncating\",\"truncate log file sql\",\"truncate transaction log\",\"What is transaction log backup?\",\"Why the log file does not shrink or truncate\",\"Why the log file is not truncated\"],\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"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\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"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\/\",\"url\":\"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\/\",\"name\":\"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"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\/#primaryimage\"},\"image\":{\"@id\":\"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\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png\",\"datePublished\":\"2018-05-25T13:04:23+00:00\",\"dateModified\":\"2020-10-13T14:19:46+00:00\",\"description\":\"If you backup transaction log of database that uses full recovery model, it truncate the Transaction Log file after each log backup normally.\",\"breadcrumb\":{\"@id\":\"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\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"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\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"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\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png\",\"width\":712,\"height\":388},{\"@type\":\"BreadcrumbList\",\"@id\":\"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\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the 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":"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log - Database Tutorials","description":"If you backup transaction log of database that uses full recovery model, it truncate the Transaction Log file after each log backup normally.","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\/05\/25\/sql-server-does-not-truncate-the-transaction-log-after-log-backup-and-can-not-shrink-the-transaction-log\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log - Database Tutorials","og_description":"If you backup transaction log of database that uses full recovery model, it truncate the Transaction Log file after each log backup normally.","og_url":"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\/","og_site_name":"Database Tutorials","article_published_time":"2018-05-25T13:04:23+00:00","article_modified_time":"2020-10-13T14:19:46+00:00","og_image":[{"width":712,"height":388,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.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\/05\/25\/sql-server-does-not-truncate-the-transaction-log-after-log-backup-and-can-not-shrink-the-transaction-log\/#article","isPartOf":{"@id":"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\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log","datePublished":"2018-05-25T13:04:23+00:00","dateModified":"2020-10-13T14:19:46+00:00","mainEntityOfPage":{"@id":"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\/"},"wordCount":632,"commentCount":3,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"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\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png","keywords":["can not shrink log file","can not shrink transaction log","cdc","Change Data Capture","Checkpoint","DB_ID()","DBCC ShrinkFile Not releasing Space","Disable CDC","Does a transaction log backup truncate the log?","Does transaction log shrink after backup?","How do I truncate a transaction log?","Log Backup Does Not Truncate the Log","LOG_BACKUP","log_reuse_wait_desc","log_reuse_wait_desc replication shrink log","Logs not Shrinking after Backup","Logs not truncating after Backup","replication","shrink","shrink log file","shrink transaction log","Shrinking the log file does not reduce size","sql backup log truncate","SQL Server does not truncate the transaction log","sql server log file not shrinking","sql server transaction log not shrinking after backup","sql server truncate log","sql server truncate transaction log","Transaction Log","transaction log cannot shrink","Transaction log does not truncated even after log backup","Transaction Log File Does Not Shrink","Transaction Log File Does Not Shrink or Truncate","Transaction Log is not Truncating","truncate log file sql","truncate transaction log","What is transaction log backup?","Why the log file does not shrink or truncate","Why the log file is not truncated"],"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["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\/#respond"]}]},{"@type":"WebPage","@id":"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\/","url":"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\/","name":"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the Transaction Log - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"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\/#primaryimage"},"image":{"@id":"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\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png","datePublished":"2018-05-25T13:04:23+00:00","dateModified":"2020-10-13T14:19:46+00:00","description":"If you backup transaction log of database that uses full recovery model, it truncate the Transaction Log file after each log backup normally.","breadcrumb":{"@id":"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\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["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\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"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\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/05\/Ads\u0131z-3.png","width":712,"height":388},{"@type":"BreadcrumbList","@id":"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\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"SQL Server Does Not Truncate the Transaction Log After Log Backup and Can Not Shrink the 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\/60","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=60"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/10956"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}