{"id":28457,"date":"2023-10-06T10:43:02","date_gmt":"2023-10-06T08:43:02","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=28457"},"modified":"2023-10-06T10:43:05","modified_gmt":"2023-10-06T08:43:05","slug":"sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/","title":{"rendered":"SQL Server: How to shrink the T-log file for a lot of old user-databases"},"content":{"rendered":"\n<p>Recently I have the case that a customer has a lot of databases not more used but need to be accessible at any time.<\/p>\n\n\n\n<p>In this case, we had a lot of T-log with the size when there are used and now we can really shrink and have some place on the disk.<\/p>\n\n\n\n<p>I don\u2019t precise but it\u2019s very important to the customer to have free space and not every time extend the disk.<\/p>\n\n\n\n<p>Some words about the environment.<\/p>\n\n\n\n<p>The instance has&nbsp; 139 user-databases with the year in the database name and all databases are in recovery model simple.<\/p>\n\n\n\n<p>If I exclude the year, the instance has 122 user-databases where I need to run a T-Log file shrink\u2026<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Select count(*) from sys.databases where database_id&gt;4\r\nSelect count(*) from sys.databases where database_id&gt;4 and DB_NAME(database_id) not like '%2023%' \r\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"388\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png\" alt=\"\" class=\"wp-image-28458\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png 977w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01-300x119.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01-768x305.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p>To create the query for the shrink, I use the sys_master_files view and select only the Type \u2018Log\u2019 (value=1):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select * from sys.master_files where type=1 and database_id &gt;4 and DB_NAME(database_id) not like '%2023%'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"378\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink02-1024x378.png\" alt=\"\" class=\"wp-image-28459\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink02-1024x378.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink02-300x111.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink02-768x284.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink02-1536x568.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink02.png 1789w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In my case, I will also only the T-Log file bigger than 128MB. The size is in size &nbsp;8-KB pages.<\/p>\n\n\n\n<p>I need to do a little calculation to have MB \u00a0with 8-KB pages*size\/1024:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select count(*) from sys.master_files where type=1 and database_id &gt;4 and DB_NAME(database_id) not like '%2023%' and (8*size\/1024) &gt; 128<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"409\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink03-1024x409.png\" alt=\"\" class=\"wp-image-28461\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink03-1024x409.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink03-300x120.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink03-768x307.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink03.png 1285w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As you can see, I have now only 63 T-Log file for this shrink but it\u2019s a lot and I need to script it.<\/p>\n\n\n\n<p>To do the shrink, I use the usual command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>USE &#091;xxx2012xxx];\r\nDBCC SHRINKFILE (N'xxx2012xx_log' , 128);\r\n<\/code><\/pre>\n\n\n\n<p>I inject this query in my select to have the query to generate my script for all databases:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select 'USE &#091;'+DB_NAME(database_id)+'];DBCC SHRINKFILE (N'''+name+''', 128);' from sys.master_files where type=1 and database_id &gt;4 and DB_NAME(database_id) not like '%2023%' and (8*size\/1024) &gt; 128\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"316\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink04-1024x316.png\" alt=\"\" class=\"wp-image-28462\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink04-1024x316.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink04-300x93.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink04-768x237.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink04-1536x474.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink04.png 1706w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After taking the script in a new query, I run it and as result I win the double free space on the Log disk.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"757\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink05.png\" alt=\"\" class=\"wp-image-28463\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink05.png 974w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink05-300x233.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink05-768x597.png 768w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/figure>\n\n\n\n<p>My customer is happy, finally we win 12GB on the disk&#8230;<\/p>\n\n\n\n<p>I finish this blog with this advice: <strong><mark class=\"has-inline-color has-luminous-vivid-orange-color\">don\u2019t do it without knowing how the databases work<\/mark><\/strong><mark class=\"has-inline-color has-luminous-vivid-orange-color\">s<\/mark>.<\/p>\n\n\n\n<p>My case was with a lot of \u201cold\u201d databases, no more used and in recovery model simple.<\/p>\n\n\n\n<p>One point will be to add the sys.databases and take only databases in recovery model simple&#8230;.<\/p>\n\n\n\n<p>Don&#8217;t hesitate to give me your feedback about the script. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I have the case that a customer has a lot of databases not more used but need to be accessible at any time. In this case, we had a lot of T-log with the size when there are used and now we can really shrink and have some place on the disk. I don\u2019t [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198,99],"tags":[49,51],"type_dbi":[2874],"class_list":["post-28457","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","category-sql-server","tag-microsoft","tag-sql-server","type-sql-server"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server: How to shrink the T-log file for a lot of old user-databases - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server: How to shrink the T-log file for a lot of old user-databases\" \/>\n<meta property=\"og:description\" content=\"Recently I have the case that a customer has a lot of databases not more used but need to be accessible at any time. In this case, we had a lot of T-log with the size when there are used and now we can really shrink and have some place on the disk. I don\u2019t [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-06T08:43:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-06T08:43:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Haby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Haby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0bfb7484ae81c8980fc2b11334f803b\"},\"headline\":\"SQL Server: How to shrink the T-log file for a lot of old user-databases\",\"datePublished\":\"2023-10-06T08:43:02+00:00\",\"dateModified\":\"2023-10-06T08:43:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/\"},\"wordCount\":338,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/shrink01.png\",\"keywords\":[\"Microsoft\",\"SQL Server\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/\",\"name\":\"SQL Server: How to shrink the T-log file for a lot of old user-databases - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/shrink01.png\",\"datePublished\":\"2023-10-06T08:43:02+00:00\",\"dateModified\":\"2023-10-06T08:43:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0bfb7484ae81c8980fc2b11334f803b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/shrink01.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/10\\\/shrink01.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server: How to shrink the T-log file for a lot of old user-databases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0bfb7484ae81c8980fc2b11334f803b\",\"name\":\"St\u00e9phane Haby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"caption\":\"St\u00e9phane Haby\"},\"description\":\"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \\\/ Financial Services, and many other industries.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/stephane-haby\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server: How to shrink the T-log file for a lot of old user-databases - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server: How to shrink the T-log file for a lot of old user-databases","og_description":"Recently I have the case that a customer has a lot of databases not more used but need to be accessible at any time. In this case, we had a lot of T-log with the size when there are used and now we can really shrink and have some place on the disk. I don\u2019t [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/","og_site_name":"dbi Blog","article_published_time":"2023-10-06T08:43:02+00:00","article_modified_time":"2023-10-06T08:43:05+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png","type":"","width":"","height":""}],"author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"headline":"SQL Server: How to shrink the T-log file for a lot of old user-databases","datePublished":"2023-10-06T08:43:02+00:00","dateModified":"2023-10-06T08:43:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/"},"wordCount":338,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png","keywords":["Microsoft","SQL Server"],"articleSection":["Database Administration &amp; Monitoring","Database management","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/","name":"SQL Server: How to shrink the T-log file for a lot of old user-databases - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png","datePublished":"2023-10-06T08:43:02+00:00","dateModified":"2023-10-06T08:43:05+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/10\/shrink01.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-how-to-shrink-the-t-log-file-for-a-lot-of-old-user-databases\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server: How to shrink the T-log file for a lot of old user-databases"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b","name":"St\u00e9phane Haby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","caption":"St\u00e9phane Haby"},"description":"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.","url":"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=28457"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28457\/revisions"}],"predecessor-version":[{"id":28464,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/28457\/revisions\/28464"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=28457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=28457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=28457"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=28457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}