<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Solutions Group</title>
	<atom:link href="https://sqlsolutionsgroup.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://sqlsolutionsgroup.com/</link>
	<description></description>
	<lastBuildDate>Mon, 30 Mar 2026 03:33:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://sqlsolutionsgroup.com/wp-content/uploads/2021/01/cropped-SSG_FAVICON0002-32x32.png</url>
	<title>SQL Solutions Group</title>
	<link>https://sqlsolutionsgroup.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Still Running SQL Server 2016? Here’s Why It’s Time to Upgrade</title>
		<link>https://sqlsolutionsgroup.com/still-running-sql-server-2016-heres-why-its-time-to-upgrade/</link>
					<comments>https://sqlsolutionsgroup.com/still-running-sql-server-2016-heres-why-its-time-to-upgrade/#respond</comments>
		
		<dc:creator><![CDATA[A.K. Gonzalez]]></dc:creator>
		<pubDate>Fri, 03 Apr 2026 03:16:37 +0000</pubDate>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2025]]></category>
		<category><![CDATA[#microsftcertifedmaster]]></category>
		<category><![CDATA[#microsftpartner]]></category>
		<category><![CDATA[#sql2016]]></category>
		<category><![CDATA[#sql2025]]></category>
		<category><![CDATA[#SQLAB]]></category>
		<category><![CDATA[#SQlatinoamerica]]></category>
		<category><![CDATA[#sqldatabase]]></category>
		<category><![CDATA[#sqldeveloper]]></category>
		<category><![CDATA[#SQLgroupie]]></category>
		<category><![CDATA[#sqlimer]]></category>
		<category><![CDATA[#sqlinjection]]></category>
		<category><![CDATA[#sqlinternals]]></category>
		<category><![CDATA[#sqlite]]></category>
		<category><![CDATA[#SQLLearning]]></category>
		<category><![CDATA[#SQLMagazine]]></category>
		<category><![CDATA[#sqlmanagementstudio]]></category>
		<category><![CDATA[#sqlmanager]]></category>
		<category><![CDATA[#Sqlmap]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[#sqlserver2022]]></category>
		<category><![CDATA[#SQLsolutionsgroup]]></category>
		<category><![CDATA[#SQLTraining]]></category>
		<category><![CDATA[#SQLYog]]></category>
		<category><![CDATA[SQLPASS]]></category>
		<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[SSG]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7459</guid>

					<description><![CDATA[<p>Many organizations are still relying on SQL Server 2016 to power critical systems. It’s familiar, stable, and “still working”—so it’s easy to push an upgrade down the priority list. But here’s the reality: SQL Server 2016 has reached end of life. And that shouldn&#8217;t be ignored. What “End of Life” Actually Means When Microsoft ends [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/still-running-sql-server-2016-heres-why-its-time-to-upgrade/">Still Running SQL Server 2016? Here’s Why It’s Time to Upgrade</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="p1"><em><strong><span class="s1">Many organizations are still relying on <span class="s2">SQL Server 2016</span> to power critical systems. It’s familiar, stable, and “still working”—so it’s easy to push an upgrade down the priority list.</span></strong></em></p>
<p class="p1"><em><strong><span class="s1">But here’s the reality: SQL Server 2016 has reached end of life. And that shouldn&#8217;t be ignored.</span></strong></em></p>
<hr />
<h2><span class="s1">What “End of Life” Actually Means</span></h2>
<p class="p1"><span class="s1">When Microsoft ends support for a product, it’s not just a technical milestone—it’s a risk shift. The list of &#8216;cons&#8217; becomes much longer than the list of  &#8216;pros&#8217; when deciding if an upgrade is neccesary yet, or if you can put it off another year. </span></p>
<p class="p1"><span class="s1">Officially SQL Server 2016 will have:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">No more security updates</span></p>
</li>
<li>
<p class="p1"><span class="s1">No bug fixes or patches</span></p>
</li>
<li>
<p class="p1"><span class="s1">No official Microsoft support</span></p>
</li>
<li>
<p class="p1"><span class="s1">Increased exposure to vulnerabilities and compliance risks</span></p>
</li>
</ul>
<p class="p1"><span class="s1">Even if your system seems stable today, it’s now operating without a safety net. And in today’s environment, that’s a serious concern.</span></p>
<h2><span class="s1">The Hidden Cost of Staying Put</span></h2>
<p class="p1"><span class="s1">Delaying an upgrade might feel like the easier (and cheaper) option—but it often comes with hidden costs such as security risks, compliance issues, performance limiations and the need for emergency migrations.</span></p>
<p class="p1"><span class="s1">Without ongoing patches, your database becomes more vulnerable to attacks, especially ransomware targeting outdated systems. </span><span class="s1">Many industries require supported software. Running end-of-life systems can put you out of compliance with security standars. </span><span class="s1">Older systems miss out on years of performance improvements, optimization features, and efficiency gains. </span><span class="s1">Waiting too long often leads to rushed, reactive upgrades after a failure or breach—which are far more expensive and disruptive.</span></p>
<h2><span class="s1">What You Gain by Upgrading</span></h2>
<p class="p1"><span class="s1">Moving to a modern platform like <span class="s2">S</span><span class="s2">QL Server 2025</span> isn’t just about staying supported, it’s about unlocking better performance, resilience, and flexibility. </span><span class="s1">Newer versions bring query optimization, smarter resource usage, and faster processing, improving overall performance. There&#8217;s also some exciting new ways to make backup recovery smarter like: </span></p>
<ul>
<li>
<p class="p1"><span class="s1">True full and differential backups on secondary replicas</span></p>
</li>
<li>
<p class="p1"><span class="s1">Improved compression with ZSTD</span></p>
</li>
<li>
<p class="p1"><span class="s1">Immutable backup storage options</span></p>
</li>
</ul>
<p><span class="s1">The new upgrade also means stronger security and cloud-ready flexibility. </span><span class="s1">Modern encryption, threat detection, and tighter integration with cloud security tools help protect your data. And e</span><span class="s1">asier integration with Azure and hybrid environments gives you more options for scaling and disaster  recoverry.</span></p>
<h2><span class="s1">Migration Doesn’t Have to Be Overwhelming</span></h2>
<p class="p1"><span class="s1">One of the biggest reasons businesses delay upgrading is fear of disruption. </span><span class="s1">Downtime, data loss, compatibility issues, etc.  </span><span class="s1">But with the right strategy migrations can be smoooth, controlled, and predictable.</span></p>
<p class="p1"><span class="s1">A well executed upgrade includes:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">A full assessment of your current environment</span></p>
</li>
<li>
<p class="p1"><span class="s1">Compatibility and workload analysis</span></p>
</li>
<li>
<p class="p1"><span class="s1">A clear migration plan with rollback options</span></p>
</li>
<li>
<p class="p1"><span class="s1">Testing before going live</span></p>
</li>
<li>
<p class="p1"><span class="s1">Minimal downtime during cutover</span></p>
</li>
</ul>
<h2><span class="s1">How We Help</span></h2>
<p class="p1"><span class="s1">We specialize in helping businesses move from outdated systems to modern, optimized environments—without the chaos.</span></p>
<p class="p1"><span class="s1">Our approach focuses on:</span></p>
<p class="p1"><span class="s1">✔️ Safe, secure data migration</span></p>
<p class="p1"><span class="s1">✔️ Minimal disruption to your operations</span></p>
<p class="p1"><span class="s1">✔️ Performance tuning post-upgrade</span></p>
<p class="p1"><span class="s1">✔️ Modern backup and recovery setup</span></p>
<p class="p1"><span class="s1">✔️ Long-term scalability and support</span></p>
<p class="p1"><span class="s1">Whether you’re running a single database or a complex environment, we make the transition manageable and worth it.</span></p>
<h2><span class="s1">Ready to Modernize Your SQL Environment?</span></h2>
<p class="p1"><span class="s1">If you’re still on SQL Server 2016, now is the time to act. </span><span class="s1">Let’s build a plan to upgrade your system, migrate your data safely, and set you up with a faster, more secure, and more resilient environment.</span></p>
<p class="p1"><span class="s1">Reach out today to start your upgrade the right way.</span></p>
<p>The post <a href="https://sqlsolutionsgroup.com/still-running-sql-server-2016-heres-why-its-time-to-upgrade/">Still Running SQL Server 2016? Here’s Why It’s Time to Upgrade</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/still-running-sql-server-2016-heres-why-its-time-to-upgrade/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Why use PowerShell when you can use T-SQL?</title>
		<link>https://sqlsolutionsgroup.com/why-use-powershell/</link>
					<comments>https://sqlsolutionsgroup.com/why-use-powershell/#comments</comments>
		
		<dc:creator><![CDATA[Kyle Burwell]]></dc:creator>
		<pubDate>Wed, 11 Mar 2026 20:27:28 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#microsftcertifedmaster #microsftpartner]]></category>
		<category><![CDATA[#sqldatabase]]></category>
		<category><![CDATA[#sqldeveloper]]></category>
		<category><![CDATA[#SQLLearning]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[#SQLsolutionsgroup]]></category>
		<category><![CDATA[#SQLTraining]]></category>
		<guid isPermaLink="false">https://sqlgroupstg.wpengine.com/?p=7450</guid>

					<description><![CDATA[<p>Why use PowerShell? I’ve lost count of how many times I have been asked this question. Most of the time, the inquirer is asking out of genuine curiosity. Other times, there is some obvious (negative) judgement in the question. Either way, my answer is the same: “It’s easier.” I will go through a couple of [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/why-use-powershell/">Why use PowerShell when you can use T-SQL?</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><em><strong><span style="color: #f25e00;">Why use PowerShell?</span></strong></em> I’ve lost count of how many times I have been asked this question. Most of the time, the inquirer is asking out of genuine curiosity. Other times, there is some obvious (negative) judgement in the question. Either way, my answer is the same: “<span style="color: #f25e00;"><strong>It’s easier</strong></span>.”</p>
<p>I will go through a couple of common scenarios that we frequently encounter and give T-SQL and PowerShell solutions.</p>
<h3>Is Max Memory Set Appropriately?</h3>
<p>Let’s start small: Finding max memory values and evaluating if they are appropriate.</p>
<p><strong>T-SQL Script:</strong></p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">SELECT</span> mem.<span class="me1">total_physical_memory_kb</span> <span class="sy0">/</span> <span class="nu0">1024</span> <span class="st0">'server memory (MB)'</span>
&nbsp;
,configs.<span class="me1">value_in_use</span> <span class="st0">'max server memory (MB)'</span>
&nbsp;
<span class="kw1">FROM</span> sys.<span class="me1">dm_os_sys_memory</span> mem
&nbsp;
cross apply <span class="br0">&#40;</span>
&nbsp;
<span class="kw1">SELECT</span> value_in_use
&nbsp;
<span class="kw1">FROM</span> sys.<span class="me1">configurations</span>
&nbsp;
<span class="kw1">WHERE</span> name <span class="sy0">=</span> <span class="st0">'max server memory (MB)'</span>
&nbsp;
<span class="br0">&#41;</span> configs</pre></div></div>
<p><strong>T-SQL Results:</strong><br />
<img decoding="async" width="277" height="46" class="wp-image-7451" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-1.png" /></p>
<p>With that information, I can make a determination if Max Memory is set appropriately. If not, I can calculate an appropriate value and go implement the change.</p>
<p><strong>PowerShell Script:</strong></p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">Test<span class="sy0">-</span>DbaMaxMemory <span class="sy0">-</span>SqlInstance SSG<span class="kw4">-LT</span><span class="sy0">-</span>KBURWELL</pre></div></div>
<p><strong>PowerShell Results:<br />
<img decoding="async" width="250" height="130" class="wp-image-7452" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-screen-ai-generated-co.png" alt="A screenshot of a computer screen AI-generated content may be incorrect." /></strong></p>
<p>Again, this is a basic example, and the T-SQL isn’t exactly complex, but the PowerShell is much easier and even gives you a recommendation for Max Memory.</p>
<h3>LastFullBackup</h3>
<p>The T-SQL for this is also rather easy, but the tricky part is running it against multiple instances and returning a single result set.</p>
<p><strong>T-SQL Script:</strong></p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">SELECT</span> database_name
&nbsp;
,<span class="kw2">MAX</span><span class="br0">&#40;</span>backup_start_date<span class="br0">&#41;</span> latest_full
&nbsp;
<span class="kw1">FROM</span> msdb.<span class="me1">dbo</span>.<span class="me1">backupset</span> s
&nbsp;
<span class="kw1">WHERE</span> s.<span class="me1">type</span> <span class="sy0">=</span> <span class="st0">'D'</span>
&nbsp;
<span class="kw1">GROUP</span> <span class="kw1">BY</span> s.<span class="me1">database_name</span></pre></div></div>
<p><strong>T-SQL Results:</strong></p>
<p><strong><img decoding="async" width="352" height="110" class="wp-image-7453" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-ai-generated-content-m.png" alt="A screenshot of a computer AI-generated content may be incorrect." srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-ai-generated-content-m.png 352w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-ai-generated-content-m-300x94.png 300w" sizes="(max-width: 352px) 100vw, 352px" /></strong></p>
<p>As I mentioned, this is a very simple script, but this is <span style="color: #f25e00;"><strong>only for one instance</strong></span>. If you want to run this against multiple instances, you will need to do some additional setup, such as configuring linked servers or a Central Management Server, neither of which I will be detailing here. Instead, I will show how easy it is to query multiple instances in PowerShell.</p>
<p><strong>PowerShell Script:</strong></p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">Get<span class="sy0">-</span>DbaLastBackup <span class="sy0">-</span>SqlInstance SSG<span class="kw4">-LT</span><span class="sy0">-</span>KBURWELL</pre></div></div>
<p><strong>PowerShell Results:<br />
<img loading="lazy" decoding="async" width="377" height="555" class="wp-image-7454" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-4.png" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-4.png 377w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-4-204x300.png 204w" sizes="(max-width: 377px) 100vw, 377px" /></strong></p>
<p>One simple command and I get the same info, plus details for latest diff and log backups as well. Now let’s make a couple of changes so we can get results for multiple instances and make the output a little more friendly.</p>
<p><strong>PowerShell Script:</strong></p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">Get<span class="sy0">-</span>DbaLastBackup <span class="sy0">-</span>SqlInstance SSG<span class="kw4">-LT</span><span class="sy0">-</span>KBURWELL<span class="sy0">,</span>SSG<span class="kw4">-LT</span><span class="sy0">-</span>KBURWELL\MSSQLSERVER01 <span class="sy0">-</span>ExcludeDatabase msdb<span class="sy0">,</span>model<span class="sy0">,</span>master <span class="sy0">|</span> <span class="kw1">Format-Table</span></pre></div></div>
<p>I made 3 minor changes to the script, but it is still a single line of code and now reads from multiple instances and formats the output as a table.</p>
<ul>
<li><span style="color: #f25e00;"><strong>Change 1</strong></span>: Added an additional SQL instance to the -SqlInstance parameter.</li>
<li><span style="color: #f25e00;"><strong>Change 2</strong></span>: Added the -ExcludeDatabase parameter and passed in the system databases.</li>
<li><span style="color: #f25e00;"><strong>Change 3</strong></span>: Piped the results to Format-Table</li>
</ul>
<p><strong>PowerShell Results:</strong></p>
<p><strong><img loading="lazy" decoding="async" width="1185" height="182" class="wp-image-7455" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-5.png" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-5.png 1185w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-5-300x46.png 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-5-1024x157.png 1024w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/word-image-7450-5-768x118.png 768w" sizes="(max-width: 1185px) 100vw, 1185px" /></strong></p>
<p>Let’s take it one step further and generate a spreadsheet from the results.</p>
<p><strong>PowerShell Script:</strong></p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">Get<span class="sy0">-</span>DbaLastBackup <span class="sy0">-</span>SqlInstance SSG<span class="kw4">-LT</span><span class="sy0">-</span>KBURWELL<span class="sy0">,</span>SSG<span class="kw4">-LT</span><span class="sy0">-</span>KBURWELL\MSSQLSERVER01 <span class="sy0">-</span>ExcludeDatabase msdb<span class="sy0">,</span>model<span class="sy0">,</span>master <span class="sy0">|</span> Export<span class="sy0">-</span>Excel <span class="kw5">-Path</span> C:\Temp\LastBackups.xlsx</pre></div></div>
<p>Instead of piping the results to Format-Table, I am piping the results to Export-Excel and providing a file path and name. Now I have a spreadsheet that I can share with whomever might want to see it.</p>
<p><img loading="lazy" decoding="async" width="327" height="153" class="wp-image-7456" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-ai-generated-content-m-1.png" alt="A screenshot of a computer AI-generated content may be incorrect." srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-ai-generated-content-m-1.png 327w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/03/a-screenshot-of-a-computer-ai-generated-content-m-1-300x140.png 300w" sizes="(max-width: 327px) 100vw, 327px" /></p>
<p>Getting results from SSMS into Excel is obviously possible, it just requires extra manual steps. It&#8217;s much quicker to just have PowerShell do it for you.</p>
<h3>“It’s easier”</h3>
<p>When I say PowerShell is easier, I’m not just talking about the simplicity of commands. I’m also talking about how easy it is to add in functionality, such as querying multiple instances, combining the results, and exporting them to Excel.</p>
<p>If you are perfectly happy using T-SQL and SSMS, then by all means, continue to do so. <em><strong>But</strong></em>, I do encourage you to explore PowerShell, specifically the <a href="dbatools.io">DBATools</a> module. I will be following up this post with more complex Powershell examples such as copying databases between SQL instances and keeping AG objects synchronized between replicas. Stay tuned for more answers to the question &#8220;why use PowerShell?&#8221;</p>
<p>&nbsp;</p>
<p>The post <a href="https://sqlsolutionsgroup.com/why-use-powershell/">Why use PowerShell when you can use T-SQL?</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/why-use-powershell/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Backup Just Got Smarter: What’s New in Microsoft SQL Server 2025</title>
		<link>https://sqlsolutionsgroup.com/backup-just-got-smarter-whats-new-in-microsoft-sql-server-2025/</link>
					<comments>https://sqlsolutionsgroup.com/backup-just-got-smarter-whats-new-in-microsoft-sql-server-2025/#respond</comments>
		
		<dc:creator><![CDATA[A.K. Gonzalez]]></dc:creator>
		<pubDate>Mon, 02 Mar 2026 06:29:59 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#microsftcertifedmaster]]></category>
		<category><![CDATA[#microsftpartner]]></category>
		<category><![CDATA[#SQLAB]]></category>
		<category><![CDATA[#SQlatino]]></category>
		<category><![CDATA[#SQlatinoamerica]]></category>
		<category><![CDATA[#sqldatabase]]></category>
		<category><![CDATA[#sqldeveloper]]></category>
		<category><![CDATA[#SQLgroupie]]></category>
		<category><![CDATA[#sqlimer]]></category>
		<category><![CDATA[#sqlimerbymay]]></category>
		<category><![CDATA[#sqlinjection]]></category>
		<category><![CDATA[#sqlinternals]]></category>
		<category><![CDATA[#sqlite]]></category>
		<category><![CDATA[#sqlite3]]></category>
		<category><![CDATA[#SQLLearning]]></category>
		<category><![CDATA[#SQLMagazine]]></category>
		<category><![CDATA[#sqlmanagementstudio]]></category>
		<category><![CDATA[#sqlmanager]]></category>
		<category><![CDATA[#Sqlmap]]></category>
		<category><![CDATA[#sqlrun]]></category>
		<category><![CDATA[#sqlsaturday2017]]></category>
		<category><![CDATA[#sqlsatvienna]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[#SQLserver2012]]></category>
		<category><![CDATA[#sqlserver2014]]></category>
		<category><![CDATA[#sqlserver2017]]></category>
		<category><![CDATA[#sqlserver2022]]></category>
		<category><![CDATA[#SQLServeronLinux]]></category>
		<category><![CDATA[#SQLsolutionsgroup]]></category>
		<category><![CDATA[#SQLTraining]]></category>
		<category><![CDATA[#SQLYog]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLPASS]]></category>
		<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[SSG]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7438</guid>

					<description><![CDATA[<p>In a recent webinar, Randy Knight walked through the backup enhancements in SQL Server 2025—and one update in particular changes everything for Availability Groups. True Full and Differential Backups on Secondary Replicas For years, database professionals faced a frustrating limitation. With Availability Groups, you could offload some workloads to secondary replicas—but not your real backup [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/backup-just-got-smarter-whats-new-in-microsoft-sql-server-2025/">Backup Just Got Smarter: What’s New in Microsoft SQL Server 2025</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="p1"><em><strong><span class="s1">In a recent webinar, <a href="chatgpt://generic-entity?number=0"><span class="s2">Randy Knight</span></a> walked through the backup enhancements in <a href="chatgpt://generic-entity?number=1"><span class="s2">SQL Server 2025</span></a>—and one update in particular changes everything for Availability Groups.</span></strong></em></p>

<h3><span class="s1">True Full and Differential Backups on Secondary Replicas</span></h3>
<p class="p1"><span class="s1">For years, database professionals faced a frustrating limitation. With Availability Groups, you could offload some workloads to secondary replicas—but not your real backup strategy.</span><span class="s1">Yes, you could run copy-only backups on a secondary. But true full backups? Differential backups that maintain the LSN chain? Those had to run on the primary replica, u</span><span class="s1">ntil now. </span><span class="s1">SQL Server 2025 introduces the ability to run </span><span class="s4">true full backups and true differential backups on secondary replicas</span><span class="s1">.</span></p>
<p class="p1"><span class="s1">That means:</span></p>

<ul>
 	<li>
<p class="p1"><span class="s1">You can move your entire backup workload off the primary.</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">Your backup plan behaves exactly the same as if it were running on the primary.</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">You potentially reduce your RPO by running backups more frequently.</span></p>
</li>
</ul>
<p class="p1"><span class="s1">This isn’t just a convenience feature—it’s a performance and resilience upgrade.</span></p>


<hr />

<h3><span class="s1">ZSTD Backup Compression</span></h3>
<p class="p1"><span class="s1">Another enhancement is the introduction of </span><span class="s4">ZSTD backup compression</span><span class="s1">, an algorithm originally developed at Facebook. </span><span class="s1">Until now, SQL Server used MSXpress as the default compression method. ZSTD brings:</span></p>

<ul>
 	<li>
<p class="p1"><span class="s1">Slightly better compression ratios</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">Faster compression in many cases</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">Less CPU overhead during decompression</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">Potentially faster restores</span></p>
</li>
</ul>
<p class="p1"><span class="s1">In Randy’s testing—and in benchmarking done by <a href="chatgpt://generic-entity?number=2"><span class="s2">Aaron Bertrand</span></a> on an 8TB Stack Overflow database—backup sizes weren’t dramatically smaller. A 50GB database might shrink from 15GB to 14.5GB. </span><span class="s1">That doesn’t sound revolutionary, b</span><span class="s1">ut at scale it really adds up!</span></p>
<p class="p1"><span class="s1">If you’re backing up multi-terabyte databases with long retention periods, even small savings compound quickly. Smaller backups also mean improved storage efficiency and potential restore performance gains. </span><span class="s1">It’s not flashy—but it’s practical, which matters. </span></p>


<hr />

<h3><span class="s1">Immutable Backups in Azure Blob Storage</span></h3>
<p class="p1"><span class="s1">Backing up directly to Azure Blob Storage isn’t new. But SQL Server 2025 now supports backups to </span><span class="s4">immutable Azure Blob storage accounts</span><span class="s1">.</span><span class="s1">This enhancement strengthens ransomware protection. </span><span class="s1">Immutable storage ensures that once a backup is written, it cannot be modified. The only permitted action is deletion under defined rules. While not truly air-gapped, this approach creates a powerful safeguard against backup tampering. </span><span class="s1">In a world where ransomware targets backups first, this feature significantly improves recovery confidence.</span></p>


<hr />

<h3><span class="s1">Why These Enhancements Matter</span></h3>
<p class="p1"><span class="s1">SQL Server 2025 doesn’t reinvent backup strategy—it strengthens it.</span></p>

<ul>
 	<li>
<p class="p1"><span class="s1">Offload backup workloads to secondary replicas</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">Improve compression efficiency at scale</span></p>
</li>
 	<li>
<p class="p1"><span class="s1">Harden backup security against ransomware</span></p>
</li>
</ul>
<p class="p1"><span class="s1">Individually, these updates are incremental. Together, they represent a meaningful evolution in database resilience and performance. F</span><span class="s1">or organizations running mission-critical systems, that’s an especially big deal.</span></p>
<!-- /wp:post-content --><p>The post <a href="https://sqlsolutionsgroup.com/backup-just-got-smarter-whats-new-in-microsoft-sql-server-2025/">Backup Just Got Smarter: What’s New in Microsoft SQL Server 2025</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/backup-just-got-smarter-whats-new-in-microsoft-sql-server-2025/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fixing Full-Text Index Issues</title>
		<link>https://sqlsolutionsgroup.com/fixing-full-text-index/</link>
					<comments>https://sqlsolutionsgroup.com/fixing-full-text-index/#respond</comments>
		
		<dc:creator><![CDATA[Rich Benner]]></dc:creator>
		<pubDate>Thu, 05 Feb 2026 17:34:52 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#Full-TextSearch]]></category>
		<category><![CDATA[#FullTextIndex]]></category>
		<category><![CDATA[#sqldatabase]]></category>
		<category><![CDATA[#SQLPerformance]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7396</guid>

					<description><![CDATA[<p>We’ve had Full-Text index issues come up with surprising frequency lately, so I thought I’d share the fix with all of you lovely people who read this blog. For reference, the customer in this example asked us to look at this problem on a server that is not managed by us.</p>
<p>The post <a href="https://sqlsolutionsgroup.com/fixing-full-text-index/">Fixing Full-Text Index Issues</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>We’ve had Full-Text index issues come up with surprising frequency lately. I thought I’d share the fix with all of you lovely people who read this blog. For reference, the customer in this example asked us to look at this problem on a server that is not managed by us.</p>



<h3 class="wp-block-heading">Problem Statement</h3>



<p>The client noticed the D (data) drive was running out of free space and they asked us to investigate. We found that the SQL Logs folder was much larger than we’d expect. A considerable amount of this data was not database files (.mdf, .ldf, .ndf), but rather log files (.log and anything with a .Number file extension):</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="941" height="159" class="wp-image-7397" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-1.png" alt="" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-1.png 941w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-1-300x51.png 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-1-768x130.png 768w" sizes="(max-width: 941px) 100vw, 941px" /></figure>



<p>&nbsp;</p>



<p>Upon further investigation we could see that there were a large number of files starting with SQLFT%. These are full text error files:</p>



<p>&nbsp;</p>



<figure class="wp-block-image"><img decoding="async" class="wp-image-7398" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-2.png" alt="" /></figure>



<p>&nbsp;</p>



<p>At this point we knew the culprit and had to dig into our full text indexes.</p>



<p>&nbsp;</p>



<h3 class="wp-block-heading">Investigation</h3>



<p><strong>SQL Error Log</strong></p>



<p>If you also check your SQL Error log in SSMS, you will likely see a constant stop and restart of the Full-Text process:</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="776" height="400" class="wp-image-7399" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-3.png" alt="" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-3.png 776w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-3-300x155.webp 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-3-768x396.webp 768w" sizes="(max-width: 776px) 100vw, 776px" /></figure>



<p>&nbsp;</p>



<p>If we want specific details around which table/index is causing issues, we will have to check the Full-Text error log directly.</p>



<p><strong>Reading Your Full-Text Error Log</strong></p>



<p>There’s no GUI way of reading the Full-Text error log in SSMS. To do that, you’ll have to read the file off disk directly. And for that, you’ll need xp_cmdshell enabled, as follows:</p>



<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">EXEC</span> <span class="kw3">SP_CONFIGURE</span> <span class="st0">'show advanced options'</span>, <span class="nu0">1</span>;
<span class="kw1">RECONFIGURE</span>;
<span class="kw1">EXEC</span> <span class="kw3">SP_CONFIGURE</span> <span class="st0">'xp_cmdshell'</span>, <span class="nu0">1</span>;
<span class="kw1">RECONFIGURE</span>;</pre></div></div>
<p>

</p>
<p>You can then read this file (and any others) using the query below:</p>
<p>

</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">EXEC</span> xp_cmdshell <span class="st0">'type &quot;D:<span class="es0">\P</span>rogram Files<span class="es0">\M</span>icrosoft SQL Server<span class="es0">\M</span>SSQL13.MSSQLSERVER<span class="es0">\M</span>SSQL<span class="es0">\L</span>og<span class="es0">\F</span>DLAUNCHERRORLOG&quot;'</span>;</pre></div></div>
<p>

</p>
<p>The potential challenge here is: if you’ve got an issue with Full-Text then this file has the potential to be very large (in this scenario, it was 2.4GB). A file of that size may well make this approach prohibitive.</p>
<p>

</p>
<p><strong>Manually Reading the Error Log</strong></p>
<p>

</p>
<p>You won’t be able to open the FDLAUNCHERRORLOG file directly if it’s in use with SQL Server so in this case you will have to take a copy of the file and read the copy. However, there are file size limitations with tools such as Notepad. You will need to use an application that can deal with these large files (<a href="https://code.visualstudio.com/download">VScode</a>, <a href="https://notepad-plus-plus.org/downloads/">Notepad++</a>, etc.) or something that’s specifically designed to open large text files (<a href="https://apps.microsoft.com/detail/9nblggh4mcm8?hl=en-US&amp;gl=US">Large Text File Viewer</a>, <a href="https://klogg.filimonov.dev/">KLOGG</a>, etc).</p>
<p>

</p>
<p>If you need to copy this text file to a different server, I highly recommend zipping the file first. The files are often multiple GB but because it’s a lot of repeated data, they compress really well. It’ll save you a bunch of time in data transfer over your network.</p>
<p>

</p>
<p><strong>Error Log Output</strong></p>
<p>

</p>
<p>Once you’re able to read the error log, you will see an output like this which gives you the specific table or indexed view which is the issue here:</p>
<p>

</p>
<p>

</p>
<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1652" height="305" class="wp-image-7400" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-4.png" alt="" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-4.png 1652w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-4-300x55.png 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-4-1024x189.png 1024w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-4-768x142.png 768w, https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-4-1536x284.png 1536w" sizes="(max-width: 1652px) 100vw, 1652px" /></figure>
<p>

</p>
<p>This is where (at least one) of our issues are. It’s worth noting that there may well be more than one object involved here. We’re looking for the largest culprit, but once we that one we may well have others that will require our attention. We’ll deal with that when we come to it, though.</p>
<p>

</p>
<p>&nbsp;</p>
<p>

</p>
<h3 class="wp-block-heading">Remediation</h3>
<p>

</p>
<p><strong>Rebuilding Full-Text Catalogue</strong></p>
<p>

</p>
<p>The first thing we want to do is to rebuild our Full-Text catalogue for the affected database. You can easily do this in SSMS:</p>
<p>

</p>
<p>&nbsp;</p>
<p>

</p>
<figure class="wp-block-image"><img decoding="async" class="wp-image-7401" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-5.png" alt="" /></figure>
<p>

</p>
<p>A rebuild should fix the issue. But if not, you’ll have to go to the next step.</p>
<p>

</p>
<p class="wp-block-heading"><strong>Rebuilding Indexes</strong></p>
<p>

</p>
<p>Luckily, in our scenario the table involved was small so this wasn’t a concern. However, rebuilding indexes comes with the dual caveats that, in larger environments, it can take a long time to complete a rebuild, and it will also consume resources and may potentially cause blocking. In this scenario, you’ll want to do this out of hours or inside a maintenance window.</p>
<p>

</p>
<p><strong>An important note here</strong>: We’d recommend just rebuilding the clustered index if you have one. By doing this, the system will automatically rebuild all other indexes on the table. You can do this using the GUI:</p>
<p>

</p>
<p>&nbsp;</p>
<p>

</p>
<figure class="wp-block-image"><img decoding="async" class="wp-image-7402" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-6.png" alt="" /></figure>
<p>

</p>
<p>If you’re more comfortable working with code, then you can perform this manually too:</p>
<p>

</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">ALTER</span> <span class="kw1">INDEX</span> <span class="br0">[</span>IndexName<span class="br0">]</span> <span class="kw1">ON</span> <span class="br0">[</span>dbo<span class="br0">]</span>.<span class="br0">[</span>TableName<span class="br0">]</span> REBUILD</pre></div></div>
<p>

</p>
<p>Once this is rebuilt (and assuming it returns without errors), you should be golden. You then want to follow the process below to allow you to cycle the log files.</p>
<p>

</p>
<p class="wp-block-heading"><strong>Cycling your Full-Text Log Files</strong></p>
<p>

</p>
<p>There is an undocumented stored procedure that lets you cycle your Full-Text log files the same way you are (hopefully) cycling your SQL Error Logs:</p>
<p>

</p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">EXEC</span> sp_fulltext_recycle_crawl_log @ftcat <span class="sy0">=</span> ‘FullText <span class="kw1">CATALOG</span> Name;</pre></div></div>
<p>

</p>
<p>This will deallocate the old log files and create new ones. At this point you’re free to delete or move these log files that are filling the drive to free up the disk space. And don’t worry: If you try to delete a file that’s currently in use by SQL Server (the current log files, for example) you won’t be able to.</p>
<p>

</p>
<p><strong>Cycling your Full-Text master error log</strong></p>
<p>

</p>
<p>There is no way of doing this within SSMS. You can do it with this command:</p>
<p>

</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/exec"><span class="kw3">EXEC</span></a> sp_fulltext_service <span class="st_h">'cycle_errorlog'</span><span class="sy0">;</span></pre></div></div>
<p>

</p>
<p>This will allow you to cycle out this error log, too, if you need to delete the file to free up space.</p>
<p>

</p>
<p>At this point, we have fixed the full text indexes on this database. We may, however, have issues with multiple databases. If we check the SQL Error log and see new errors appearing, then we haven’t quite fixed the whole problem. We will want to go through this process again (check the logs, rebuild indexes, cycle error log files) until we’ve fixed all our problems.</p>
<p>

</p>
<p class="wp-block-heading"><strong>DBCC CHECKTABLE</strong></p>
<p>

</p>
<p>Once we’ve fixed all the issues with Full-Text search it’s a great idea to perform a DBCC CHECKTABLE on the affected tables to ensure we’re not dealing with a corruption issue. CHECKTABLE is much lighter than a full CHECKDB, but it still does read the entire table  to perform the check. Yes, this is another process that we would want to be careful and <strong>perform outside of working hours if at all possible</strong> if the table we’re dealing with is large in our environment.</p>
<p>

</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">USE</span> <span class="br0">[</span>DBName<span class="br0">]</span>
&nbsp;
GO
&nbsp;
<span class="kw1">DBCC</span> CHECKTABLE <span class="br0">&#40;</span>‘TableName’<span class="br0">&#41;</span> <span class="kw1">WITH</span> <span class="kw1">WITH</span> <span class="sy0">ALL</span>_ERR<span class="sy0">OR</span>MSGS, NO_<span class="sy0">IN</span>FOMSGS</pre></div></div>
<p>

</p>
<p>This will return any errors encountered while also avoiding any noise from informational messages.</p>
<p>

</p>
<p>You can see the output in the error log:</p>
<p>

</p>
<p>&nbsp;</p>
<p>

</p>
<figure class="wp-block-image"><img decoding="async" class="wp-image-7403" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/02/word-image-7396-7.png" alt="" /></figure>
<p>

</p>
<p>&nbsp;</p>
<p>

</p>
<h3 class="wp-block-heading">Final Thoughts</h3>
<p>

</p>
<p>If you discover corruption, review <a href="https://sqlsolutionsgroup.com/blindsided-by-database-corruption/">this post</a> I wrote on the topic. If you don’t, you should be good to go — and give yourself a pat on your back for a job well done!</p>
<p>

</p>
<p>And, if you find you can’t solve a Full-Text index issue yourself, we’re always standing by to assist you.</p>
<p>

</p>
<p>&nbsp;</p>
<p></p><p>The post <a href="https://sqlsolutionsgroup.com/fixing-full-text-index/">Fixing Full-Text Index Issues</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/fixing-full-text-index/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server 2025 Performance Enhancements: What Developers and DBAs Need to Know</title>
		<link>https://sqlsolutionsgroup.com/sql-server-2025-performance-enhancements-what-developers-and-dbas-need-to-know/</link>
					<comments>https://sqlsolutionsgroup.com/sql-server-2025-performance-enhancements-what-developers-and-dbas-need-to-know/#respond</comments>
		
		<dc:creator><![CDATA[A.K. Gonzalez]]></dc:creator>
		<pubDate>Wed, 21 Jan 2026 19:01:28 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#microsftcertifedmaster]]></category>
		<category><![CDATA[#microsftpartner]]></category>
		<category><![CDATA[#SQLAB]]></category>
		<category><![CDATA[#SQlatino]]></category>
		<category><![CDATA[#SQlatinoamerica]]></category>
		<category><![CDATA[#sqldatabase]]></category>
		<category><![CDATA[#sqldeveloper]]></category>
		<category><![CDATA[#SQLgroupie]]></category>
		<category><![CDATA[#sqlimer]]></category>
		<category><![CDATA[#sqlimerbymay]]></category>
		<category><![CDATA[#sqlinjection]]></category>
		<category><![CDATA[#sqlinternals]]></category>
		<category><![CDATA[#sqlite]]></category>
		<category><![CDATA[#sqlite3]]></category>
		<category><![CDATA[#SQLLearning]]></category>
		<category><![CDATA[#SQLMagazine]]></category>
		<category><![CDATA[#sqlmanagementstudio]]></category>
		<category><![CDATA[#sqlmanager]]></category>
		<category><![CDATA[#Sqlmap]]></category>
		<category><![CDATA[#sqlrun]]></category>
		<category><![CDATA[#sqlsaturday2017]]></category>
		<category><![CDATA[#sqlsatvienna]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[#SQLserver2012]]></category>
		<category><![CDATA[#sqlserver2014]]></category>
		<category><![CDATA[#sqlserver2017]]></category>
		<category><![CDATA[#sqlserver2022]]></category>
		<category><![CDATA[#SQLServeronLinux]]></category>
		<category><![CDATA[#SQLsolutionsgroup]]></category>
		<category><![CDATA[#SQLTraining]]></category>
		<category><![CDATA[#SQLYog]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLPASS]]></category>
		<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[SSG]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7391</guid>

					<description><![CDATA[<p>SQL Server 2025 continues Microsoft’s steady focus on performance, reliability, and intelligent automation. Rather than introducing one dramatic overhaul, this release delivers a collection of meaningful, incremental improvements that—when combined—can result in noticeable gains for many workloads. During a recent discussion, Rich and Kyle walked through several of the most impactful enhancements, focusing on Intelligent [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/sql-server-2025-performance-enhancements-what-developers-and-dbas-need-to-know/">SQL Server 2025 Performance Enhancements: What Developers and DBAs Need to Know</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<blockquote>
<p><em><strong>SQL Server 2025 continues Microsoft’s steady focus on performance, reliability, and intelligent automation. Rather than introducing one dramatic overhaul, this release delivers a collection of meaningful, incremental improvements that—when combined—can result in noticeable gains for many workloads.</strong></em></p>
</blockquote>
<p><span style="font-weight: 400;">During a recent discussion, Rich and Kyle walked through several of the most impactful enhancements, focusing on Intelligent Query Processing, concurrency improvements, columnstore indexes, and long-awaited TempDB upgrades.</span></p>
<h3><b>Smarter Query Performance with Intelligent Query Processing (IQP)</b></h3>
<p><span style="font-weight: 400;">Intelligent Query Processing isn’t new, but SQL Server 2025 refines it further. IQP is an umbrella term covering a set of features designed to make the query optimizer more adaptive and accurate over time.</span></p>
<p><span style="font-weight: 400;">One key area of improvement is cardinality estimation—the process SQL Server uses to estimate how many rows will flow through each step of a query plan. Anyone who has tuned performance knows how damaging a mismatch between estimated and actual rows can be. SQL Server 2025 introduces incremental enhancements to these estimations, which, in most cases, translate to better execution plans and improved default performance without any code changes.</span></p>
<p><span style="font-weight: 400;">As with any optimizer change, edge cases still exist. Large jumps in behavior—such as the one between SQL Server 2014 and 2016—sometimes caused regressions in specific workloads. While the changes in 2025 are far less dramatic, testing remains essential when upgrading.</span></p>
<p><span style="font-weight: 400;">Another IQP enhancement is parameter-sensitive optimization, which addresses long-standing issues related to parameter sniffing. When query parameters vary significantly between executions, SQL Server can now better recognize those differences and adjust execution strategies accordingly, reducing performance instability.</span></p>
<p><span style="font-weight: 400;">Degree of parallelism (DOP) feedback also continues to evolve. Rather than making a one-time decision based solely on cost thresholds and configuration values, SQL Server now evaluates how well a query performs when running in parallel and adjusts its behavior over time. This allows the engine to fine-tune parallelism instead of blindly running at maximum settings. While powerful, it does require familiarity with execution plans to fully understand how SQL Server is adapting behind the scenes.</span></p>
<h3><b>Adaptive Joins That Adjust on the Fly</b></h3>
<p><span style="font-weight: 400;">Adaptive joins build on SQL Server’s ability to recover from imperfect statistics. Traditionally, SQL Server commits to a join strategy—such as nested loops or hash joins—based on cardinality estimates. If those estimates are wrong, the query can suffer dramatically.</span></p>
<p><span style="font-weight: 400;">With adaptive joins, SQL Server can change its mind mid-execution. If a join starts as a loop join but processes far more rows than expected, the engine can switch to a more appropriate join type, such as a hash join, while the query is still running.</span></p>
<p><span style="font-weight: 400;">SQL Server 2025 improves adaptive joins further, especially in complex scenarios involving multiple joins. This makes the engine more resilient in real-world environments where statistics are rarely perfect.</span></p>
<h3><b>Improved Concurrency Through Smarter Locking</b></h3>
<p><span style="font-weight: 400;">Concurrency is another area receiving meaningful attention. SQL Server has long relied on various lock types—row, key, page, range, and table locks—with relatively rigid thresholds for escalation.</span></p>
<p><span style="font-weight: 400;">Historically, modifying a few thousand rows could trigger escalation to a full table lock, leading many teams to design batch operations around that behavior. SQL Server 2025 is more nuanced. It can now hold thousands of locks without immediately escalating to a table lock when doing so would be unnecessary or harmful.</span></p>
<p><span style="font-weight: 400;">These optimized locking improvements, especially when combined with accelerated database recovery, have already shown dramatic reductions in blocking in real-world workloads. The engine is simply making better decisions about how much data truly needs to be locked.</span></p>
<h3><b>Faster and More Efficient Columnstore Indexes</b></h3>
<p><span style="font-weight: 400;">For organizations using columnstore indexes—particularly in data warehouse and analytics workloads—SQL Server 2025 brings performance gains across the board.</span></p>
<p><span style="font-weight: 400;">Compression is faster, index rebuilds complete more quickly, and the engine handles delta stores more efficiently. Delta stores, which temporarily hold newly inserted uncompressed data before it’s merged into compressed columnstore segments, are now managed more intelligently. This improves both data ingestion and query performance.</span></p>
<p><span style="font-weight: 400;">Reading from columnstore indexes has also been optimized, meaning analytics queries can run faster with no changes required at the application level.</span></p>
<h3><b>TempDB Enhancements That DBAs Will Appreciate</b></h3>
<p><span style="font-weight: 400;">TempDB has long been one of SQL Server’s most critical—and fragile—components. SQL Server 2025 introduces several enhancements that directly address common pain points.</span></p>
<p><span style="font-weight: 400;">One of the most significant changes is the ability to govern TempDB usage using Resource Governor. DBAs can now set quotas that prevent individual queries or workloads from consuming excessive TempDB space. When a query exceeds its limit, SQL Server cancels it before TempDB fills up, preventing server-wide outages.</span></p>
<p><span style="font-weight: 400;">This is especially valuable in environments where large reports or unfiltered queries can consume hundreds of gigabytes and bring systems to a halt—often in the middle of the night.</span></p>
<p><span style="font-weight: 400;">SQL Server 2025 also brings accelerated database recovery (ADR) to TempDB. Large rollbacks that previously took minutes can now complete almost instantly, reducing downtime and improving system responsiveness during heavy workloads.</span></p>
<p><span style="font-weight: 400;">To support monitoring and alerting, new DMV columns expose detailed TempDB usage metrics, including current usage, peak usage, and the number of TempDB limit violations. These additions make it far easier for DBAs and monitoring tools to detect issues before they escalate into outages.</span></p>
<h3><b>A Practical Step Forward</b></h3>
<p><span style="font-weight: 400;">Rather than reinventing SQL Server, the 2025 release refines the engine’s intelligence. Query plans adapt more effectively, locking decisions are smarter, analytics workloads run faster, and TempDB becomes far more manageable.</span></p>
<p><span style="font-weight: 400;">For teams considering an upgrade, SQL Server 2025 offers tangible performance and reliability improvements—especially for environments that struggle with concurrency, large analytical workloads, or TempDB pressure. As always, thorough testing is key, but for many workloads, the benefits will be felt immediately.</span></p>
<p class="p1"> </p>

<p>&nbsp;</p>
<p>The post <a href="https://sqlsolutionsgroup.com/sql-server-2025-performance-enhancements-what-developers-and-dbas-need-to-know/">SQL Server 2025 Performance Enhancements: What Developers and DBAs Need to Know</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/sql-server-2025-performance-enhancements-what-developers-and-dbas-need-to-know/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Enhancements to TempDB in SQL Server 2025</title>
		<link>https://sqlsolutionsgroup.com/enhancements-to-tempdb-in-sql-server-2025/</link>
					<comments>https://sqlsolutionsgroup.com/enhancements-to-tempdb-in-sql-server-2025/#respond</comments>
		
		<dc:creator><![CDATA[Rich Benner]]></dc:creator>
		<pubDate>Wed, 14 Jan 2026 10:07:47 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#sqlserver2025]]></category>
		<category><![CDATA[#tempdb]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7376</guid>

					<description><![CDATA[<p>The latest edition of SQL Server comes with many enhancements, and updates to TempDB in SQL Server 2025 are one of our favourites.</p>
<p>The post <a href="https://sqlsolutionsgroup.com/enhancements-to-tempdb-in-sql-server-2025/">Enhancements to TempDB in SQL Server 2025</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The latest edition of SQL Server comes with plenty of enhancements, and some we are particularly looking forward to. Updates to TempDB in SQL Server 2025 are one of our (&#8230; or my) favourites. We’re not talking a <em>redesign</em> of TempDB but rather some noticeable improvements that the community has been shouting out for. Let’s dig into them.</p>

<h3 class="wp-block-heading"><strong>TempDB Space Governance</strong></h3>



<p>This is the big one. We’re going to do extensive testing on this, but it looks extremely promising. In SQL Server 2025, Resource Governor can now limit how much TempDB space a workload is allowed to use. That means:</p>



<ul class="wp-block-list">
<li>One bad report can’t eat <em>all</em> of TempDB</li>



<li>ETL jobs can’t bully OLTP workloads</li>



<li>You can finally put hard limits on temp space usage</li>
</ul>



<p><strong>Why this matters</strong></p>



<p>You may have run into the issue where TempDB gets filled by somebody running a huge reporting query. This fills the TempDB drive and brings down the production server. Sometimes you can’t help users from being users. This is usually compounded in virtualised environments if you’re using something like the AWS Instance Store when you can’t increase the size of this drive other than increasing your instance size (and cost).</p>



<p>Before 2025, Resource Governor could manage CPU and memory, but TempDB was the Wild West. Now it’s fenced in.</p>



<p>If a workload hits its TempDB limit:</p>



<ul class="wp-block-list">
<li>The request fails</li>



<li>TempDB stays healthy</li>



<li>The rest of the server keeps working</li>
</ul>



<p><strong>Example: Limit TempDB usage for a workload group</strong></p>



<p>Note: There are some <a href="https://learn.microsoft.com/en-us/sql/relational-databases/resource-governor/tempdb-space-resource-governance?view=sql-server-ver17#percent-limit-configuration">requirements</a> for your TempDB configuration:</p>


<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="co1">-- Enable Resource Governor</span>
&nbsp;
<span class="kw1">ALTER</span> RESOURCE GOVERN<span class="sy0">OR</span> <span class="kw1">RECONFIGURE</span>
&nbsp;
GO
&nbsp;
<span class="co1">-- Create a workload group with a TempDB limit of 25%</span>
&nbsp;
<span class="kw1">CREATE</span> W<span class="sy0">OR</span>KLOAD <span class="kw1">GROUP</span> ReportingGroup
&nbsp;
<span class="kw1">WITH</span> <span class="br0">&#40;</span>GROUP_MAX_TEMPDB_DATA_PERCENT <span class="sy0">=</span> 25<span class="br0">&#41;</span>
&nbsp;
GO
&nbsp;
<span class="kw1">ALTER</span> RESOURCE GOVERN<span class="sy0">OR</span> <span class="kw1">RECONFIGURE</span>
&nbsp;
GO</pre></div></div>



<p>By doing this you prevent the new workload group we created for using more than 25% of the TempDB space.</p>



<h3 class="wp-block-heading"><strong>Accelerated Database Recovery (ADR) in TempDB</strong></h3>



<p>ADR has been around for a while in user databases, but the fact that we can now use it on TempDB comes with some promising opportunities, but what <em>is</em> ADR exactly?</p>



<p>ADR is basically SQL Server’s way of cleaning up messes <em>way</em> faster. Instead of doing long painful rollbacks that make you stare at “rolling back transaction…” like it’s judging your life choices, ADR keeps a lightweight version store so SQL Server can undo work almost instantly.</p>



<p>That means cancelled queries don’t hang around forever, crash recovery is dramatically quicker, and the transaction log doesn’t balloon while SQL Server cleans up after a bad decision. Think of ADR as giving SQL Server an “undo” button that actually works.</p>



<p><strong>What changes with ADR on TempDB?</strong></p>



<ul class="wp-block-list">
<li>Cancelled queries clean up <em>fast</em></li>



<li>TempDB log truncates more aggressively</li>



<li>Less waiting around for rollback to finish</li>
</ul>



<p>If you’ve ever cancelled a big query and watched TempDB sit there bloated for minutes… yeah, this helps.</p>



<p><strong>Enabling ADR for TempDB</strong></p>



<p>It’s a simple command to enable ADR for any database:</p>


<div id="wpshdo_14" class="wp-synhighlighter-outer"><div id="wpshdt_14" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_14"></a><a id="wpshat_14" class="wp-synhighlighter-title" href="#codesyntax_14"  onClick="javascript:wpsh_toggleBlock(14)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_14" onClick="javascript:wpsh_code(14)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_14" onClick="javascript:wpsh_print(14)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_14" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">ALTER</span> <span class="kw1">DATABASE</span> <span class="br0">[</span>tempdb<span class="br0">]</span>
&nbsp;
<span class="kw1">SET</span> ACCELERATED_DATABASE_RECOVERY <span class="sy0">=</span> <span class="kw1">ON</span>
&nbsp;
GO</pre></div></div>



<p>For tempdb, you’ll have to restart the SQL Service for this to take effect (because tempdb is recreated from scratch when you restart the SQL Service).</p>



<p>You can check whether ADR is enabled for tempdb by looking at sys.databases:</p>


<div id="wpshdo_15" class="wp-synhighlighter-outer"><div id="wpshdt_15" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_15"></a><a id="wpshat_15" class="wp-synhighlighter-title" href="#codesyntax_15"  onClick="javascript:wpsh_toggleBlock(15)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_15" onClick="javascript:wpsh_code(15)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_15" onClick="javascript:wpsh_print(15)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_15" class="wp-synhighlighter-inner" style="display: block;"><pre class="tsql" style="font-family:monospace;"><span class="kw1">SELECT</span> name, is_accelerated_database_recovery_on <span class="kw1">FROM</span> sys.<span class="me1">databases</span> <span class="kw1">WHERE</span> name <span class="sy0">=</span> <span class="st0">'tempdb'</span></pre></div></div>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="295" height="69" class="wp-image-7377" src="https://sqlsolutionsgroup.com/wp-content/uploads/2026/01/word-image-7376-1.png" alt="" /></figure>



<p>&nbsp;</p>



<p><strong>Why you should turn this on</strong></p>



<p>TempDB is famously described as the public toilet of SQL Server, and this setting makes clean up a whole lot easier!</p>



<h3 class="wp-block-heading"><strong>Fewer TempDB Headaches</strong></h3>



<p>SQL Server 2025 also brings a bunch of quieter improvements that indirectly help TempDB:</p>



<ul class="wp-block-list">
<li>Better memory grant feedback → fewer spills</li>



<li>Smarter throttling for runaway queries</li>



<li>Reduced contention under high concurrency</li>
</ul>



<p>None of these are “headline features,” but together they mean:</p>



<ul class="wp-block-list">
<li>Less TempDB churn</li>



<li>Fewer surprises</li>



<li>Smoother performance under load</li>
</ul>



<p>&nbsp;</p>



<h3 class="wp-block-heading"><strong>Final Thoughts</strong></h3>



<p>These are enhancements to TempDB in SQL Server 2025, rather than re-writes of the fundamentals.  Honestly, that’s a good thing. It gives you, as the DBA, extra control over tempdb on your servers and gives an overall better performing system. Definitely test these things in your test environment first though!</p>
<p>The post <a href="https://sqlsolutionsgroup.com/enhancements-to-tempdb-in-sql-server-2025/">Enhancements to TempDB in SQL Server 2025</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/enhancements-to-tempdb-in-sql-server-2025/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Why a SQL Server Health Check isn’t a Luxury</title>
		<link>https://sqlsolutionsgroup.com/sql-server-health-check-isnt-a-luxury/</link>
					<comments>https://sqlsolutionsgroup.com/sql-server-health-check-isnt-a-luxury/#respond</comments>
		
		<dc:creator><![CDATA[Jason Russell]]></dc:creator>
		<pubDate>Thu, 08 Jan 2026 22:08:30 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#SQLPerformance]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[#SQLServerHealthCheck]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7374</guid>

					<description><![CDATA[<p>Does the integrity of your SQL Server databases keep you up at night? Is an outage of your system a matter of when and not if? Do you dread a call from the C-suite asking why everything is down?</p>
<p>The post <a href="https://sqlsolutionsgroup.com/sql-server-health-check-isnt-a-luxury/">Why a SQL Server Health Check isn’t a Luxury</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><span style="color: #f25e00;"><strong><a style="color: #f25e00;" href="https://sqlsolutionsgroup.com/sql-server-health-check/&quot; \t &quot;_blank">Request&nbsp;a SQL Server Health Check</a> and reduce the cost of downtime before it happens.</strong></span></p>



<p><em>Does the&nbsp;integrity of your SQL Server databases&nbsp;keep you up at night?&nbsp;Is an&nbsp;outage&nbsp;of your&nbsp;system&nbsp;a matter of&nbsp;when&nbsp;and not&nbsp;if?&nbsp;Do you dread a call from the C-suite asking why everything is down?</em> If your heart rate went up just reading those scenarios, you can see why an SSG SQL Server Health&nbsp; isn’t a luxury but a necessity.&nbsp;Don’t&nbsp;leave your business continuity up to chance.</p>



<h3 class="wp-block-heading"><strong>Everything Runs on Data</strong></h3>



<p>Data is the currency of&nbsp;business,&nbsp;and unplanned database outages&nbsp;don’t&nbsp;just disrupt IT.</p>



<p>Industry reports from&nbsp;<a href="https://www.erwoodgroup.com/blog/the-true-costs-of-downtime-in-2025-a-deep-dive-by-business-size-and-industry/" target="_blank" rel="noopener">Gartner, ITIC, and others</a>&nbsp;show that the&nbsp;financial impact&nbsp;of IT and database outages has reached historic highs, with costs for large enterprises often exceeding $1 million per hour.&nbsp;Gartner&#8217;s historical baseline of $5,600 per minute (~$336,000 per hour)&nbsp;remains&nbsp;a widely cited metric, but 2025-2026 data&nbsp;shows&nbsp;this has escalated to approximately $9,000 per minute for many firms. U.S. companies suffer an average of one unplanned&nbsp;downtime incident per month.</p>



<p>These days,&nbsp;database&nbsp;failure is likely to halt operations, impact customers, interrupt sales, and put revenue at risk. <span style="color: #f25e00;"><strong>It could also get someone fired</strong></span>.</p>



<h3 class="wp-block-heading"><strong>Our SQL Server Health Check</strong></h3>



<p>Be proactive and&nbsp;find problems in your&nbsp;SQL Server instances before they blow up.&nbsp;A&nbsp;Health&nbsp;Check&nbsp;from SQL Solutions Group<strong>&nbsp;</strong>helps you identify risks and how to fix issues, as we test everything from hardware to hypervisor/cloud configuration to OS to your SQL Server installation itself.&nbsp;Once&nbsp;we complete a Health Check on your&nbsp;instances, you receive:</p>



<ul class="wp-block-list">
<li>A comprehensive, executive-ready risk report</li>



<li>Prioritized remediation roadmap</li>



<li>Practical recommendations aligned to your business goals</li>
</ul>



<h3 class="wp-block-heading"><strong>Health Check Take-aways</strong></h3>



<p>In other words,&nbsp;you’ll&nbsp;have a clear plan for&nbsp;getting your instances as healthy as possible. You can do that work yourself, or you can&nbsp;leverage&nbsp;our&nbsp;expertise&nbsp;to get it done.&nbsp;Our goal&nbsp;with each SQL Server Health Check is to:</p>



<ul class="wp-block-list">
<li>Restore confidence in your databases</li>



<li>Reduce downtime</li>



<li>Improve resilience</li>



<li>Support uninterrupted business operations</li>



<li>Reduce your stress</li>



<li>Give you peace of mind</li>
</ul>



<p>If SQL Server supports your core systems, a proactive health check&nbsp;is so much more than a useful&nbsp;technical exercise.&nbsp;It’s&nbsp;a <strong>risk-management&nbsp;and ROI decision</strong>. You can’t afford the risk to your databases because the problems won’t go away if you ignore them. Address your ticking timebombs before your phone rings when you least want it to with a Health Check from SQL Solutions Group.</p>
<p>The post <a href="https://sqlsolutionsgroup.com/sql-server-health-check-isnt-a-luxury/">Why a SQL Server Health Check isn’t a Luxury</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/sql-server-health-check-isnt-a-luxury/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Track Database File Sizes with PowerShell: A Quick Guide for DBAs</title>
		<link>https://sqlsolutionsgroup.com/track-database-file-sizes-with-powershell/</link>
					<comments>https://sqlsolutionsgroup.com/track-database-file-sizes-with-powershell/#comments</comments>
		
		<dc:creator><![CDATA[Kyle Burwell]]></dc:creator>
		<pubDate>Mon, 29 Dec 2025 10:48:30 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[#PowerShell]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[DBA]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7348</guid>

					<description><![CDATA[<p>Database files (mdf, nds, ldfs, etc.) can get out of hand quickly and easily, leading to issues down the road. This can be due to improper planning, large data loads, and bad code run in production, just to list a few. As unglamorous as disk space monitoring is, we need to do our part as [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/track-database-file-sizes-with-powershell/">Track Database File Sizes with PowerShell: A Quick Guide for DBAs</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Database files (mdf, nds, ldfs, etc.) can get out of hand quickly and easily, leading to issues down the road. This can be due to improper planning, large data loads, and bad code run in production, just to list a few. As unglamorous as disk space monitoring is, we need to do our part as DBAs. This post is a quick guide on how to track database file sizes with PowerShell.</p>
<h3>Getting Started</h3>
<p>If you haven’t already, make sure you have <a href="https://dbatools.io/">DBATools</a> installed. We are going to be using a command called <strong>Get-DbaDbFile</strong> to gather the information for us. This command only requires one parameter, <strong>-SqlInstance</strong>. Here is a snippet of what I get when I run it against my local dev instance:</p>
<p><figure id="attachment_7349" aria-describedby="caption-attachment-7349" style="width: 757px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="wp-image-7349" src="https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m.png" alt="A screenshot of a computerAI-generated content may be incorrect." width="757" height="632" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m.png 757w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m-300x250.png 300w" sizes="(max-width: 757px) 100vw, 757px" /><figcaption id="caption-attachment-7349" class="wp-caption-text">Figure 1: Really Kyle? Data files on the C: drive?</figcaption></figure></p>
<p>&nbsp;</p>
<p>This is a bit more information than we really need right now, so let’s trim it down and get some parameters added. For this script, we really only need SqlInstance, Database, TypeDescription, LogicalName, PhysicalName, Size, UsedSpace, and AvailableSpace. We can also exclude system databases from the result set. For readability, I am going to use Format-Table. I will also start to add in some parameters:</p>
<p><div id="wpshdo_16" class="wp-synhighlighter-outer"><div id="wpshdt_16" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_16"></a><a id="wpshat_16" class="wp-synhighlighter-title" href="#codesyntax_16"  onClick="javascript:wpsh_toggleBlock(16)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_16" onClick="javascript:wpsh_code(16)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_16" onClick="javascript:wpsh_print(16)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_16" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="re0">$SqlInstance</span> <span class="sy0">=</span> <span class="st0">&quot;SSG-LT-KBURWELL&quot;</span>
&nbsp;
Get<span class="sy0">-</span>DbaDbFile <span class="sy0">-</span>SqlInstance <span class="re0">$SqlInstance</span>
&nbsp;
Get<span class="sy0">-</span>DbaDbFile <span class="sy0">-</span>SqlInstance <span class="re0">$SqlInstance</span> <span class="sy0">-</span>ExcludeDatabase master<span class="sy0">,</span>model<span class="sy0">,</span>msdb<span class="sy0">,</span>tempdb <span class="sy0">|</span>
&nbsp;
    <span class="kw1">Select-Object</span> SqlInstance<span class="sy0">,</span> Database<span class="sy0">,</span> TypeDescription<span class="sy0">,</span> LogicalName<span class="sy0">,</span> PhysicalName<span class="sy0">,</span> Size<span class="sy0">,</span> UsedSpace<span class="sy0">,</span> AvailableSpace <span class="sy0">|</span> <span class="kw1">Format-Table</span></pre></div></div></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-7350" src="https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/word-image-7348-2.png" alt="track database file sizes with Powershell" width="1410" height="138" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/word-image-7348-2.png 1410w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/word-image-7348-2-300x29.png 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/word-image-7348-2-1024x100.png 1024w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/word-image-7348-2-768x75.png 768w" sizes="(max-width: 1410px) 100vw, 1410px" /></p>
<h3>Using Custom Objects</h3>
<p>This will be much easier to work with, but it is important to be aware that the columns related to file size have GB, MB, and KB values, depending on what is most appropriate for that file size. This is great when just looking at the data like this, but can be a bit problematic for mathematical comparisons, which we will be doing later. To get around this, we can just use some custom objects:</p>
<p><div id="wpshdo_17" class="wp-synhighlighter-outer"><div id="wpshdt_17" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_17"></a><a id="wpshat_17" class="wp-synhighlighter-title" href="#codesyntax_17"  onClick="javascript:wpsh_toggleBlock(17)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_17" onClick="javascript:wpsh_code(17)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_17" onClick="javascript:wpsh_print(17)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_17" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="re0">$SqlInstance</span> <span class="sy0">=</span> <span class="st0">&quot;SSG-LT-KBURWELL&quot;</span>
&nbsp;
Get<span class="sy0">-</span>DbaDbFile <span class="sy0">-</span>SqlInstance <span class="re0">$SqlInstance</span> <span class="sy0">-</span>ExcludeDatabase master<span class="sy0">,</span>model<span class="sy0">,</span>msdb<span class="sy0">,</span>tempdb <span class="sy0">|</span>
&nbsp;
    <span class="kw1">Select-Object</span> SqlInstance<span class="sy0">,</span> TypeDescription<span class="sy0">,</span> LogicalName<span class="sy0">,</span> PhysicalName<span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st0">'DatabaseName'</span>; Expression<span class="sy0">=</span><span class="br0">&#123;</span><a href="about:blank"><span class="kw6">$_</span></a>.Database<span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st0">'SizeMB'</span>; Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="br0">[</span>math<span class="br0">]</span>::Round<span class="br0">&#40;</span><a href="about:blank"><span class="kw6">$_</span></a>.Size <span class="sy0">/</span> 1MB<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st0">'UsedSpaceMB'</span>; Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="br0">[</span>math<span class="br0">]</span>::Round<span class="br0">&#40;</span><a href="about:blank"><span class="kw6">$_</span></a>.UsedSpace <span class="sy0">/</span> 1MB<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st0">'AvailableSpaceMB'</span>; Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="br0">[</span>math<span class="br0">]</span>::Round<span class="br0">&#40;</span><a href="about:blank"><span class="kw6">$_</span></a>.AvailableSpace <span class="sy0">/</span> 1MB<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st0">'FreeSpacePercent'</span>; Expression<span class="sy0">=</span><span class="br0">&#123;</span>
&nbsp;
    <span class="kw3">if</span> <span class="br0">&#40;</span><a href="about:blank"><span class="kw6">$_</span></a>.Size <span class="kw4">-gt</span> 0<span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
        <span class="re0">$sizeMB</span> <span class="sy0">=</span> <span class="br0">[</span>math<span class="br0">]</span>::Round<span class="br0">&#40;</span><a href="about:blank"><span class="kw6">$_</span></a>.Size <span class="sy0">/</span> 1MB<span class="sy0">,</span> 2<span class="br0">&#41;</span>
&nbsp;
        <span class="re0">$availMB</span> <span class="sy0">=</span> <span class="br0">[</span>math<span class="br0">]</span>::Round<span class="br0">&#40;</span><a href="about:blank"><span class="kw6">$_</span></a>.AvailableSpace <span class="sy0">/</span> 1MB<span class="sy0">,</span> 2<span class="br0">&#41;</span>
&nbsp;
        <span class="br0">[</span>math<span class="br0">]</span>::Round<span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$availMB</span> <span class="sy0">/</span> <span class="re0">$sizeMB</span><span class="br0">&#41;</span> <span class="sy0">*</span> 100<span class="sy0">,</span> 2<span class="br0">&#41;</span>
&nbsp;
        <span class="br0">&#125;</span> <span class="kw3">else</span> <span class="br0">&#123;</span> <span class="nu0">0</span> <span class="br0">&#125;</span>
&nbsp;
    <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
    <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st0">'CaptureTimestamp'</span>; Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="kw1">Get-Date</span> <span class="kw5">-Format</span> <span class="st0">&quot;yyyy-MM-dd HH:mm:ss&quot;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span>
&nbsp;
    <span class="sy0">|</span> <span class="kw1">Format-Table</span></pre></div></div></p>
<p>This converts all sizes to MB, which will make any mathematical operations much easier. I also included a custom object for DatabaseName, FileSpacePercent, and CaptureTimestamp. DatabaseName really just acts as a custom column name, which is necessary when loading the data into SQL.</p>
<h3>On To The Comparisons</h3>
<p>Now that we are getting only the data we need, we need to save it to a table so we can do point in time comparisons. As with everything else, DBATools makes this ridiculously easy. We just need to point it to an instance and a database, it will take care of the rest. Instead of piping our results to Format-Table, I am going to pipe them to a command that will build and load a SQL table:</p>
<p><div id="wpshdo_18" class="wp-synhighlighter-outer"><div id="wpshdt_18" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_18"></a><a id="wpshat_18" class="wp-synhighlighter-title" href="#codesyntax_18"  onClick="javascript:wpsh_toggleBlock(18)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_18" onClick="javascript:wpsh_code(18)" title="Show code only"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_18" onClick="javascript:wpsh_print(18)" title="Print code"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img decoding="async" border="0" style="border: 0 none" src="https://sqlsolutionsgroup.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_18" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="re0">$SqlInstance</span> <span class="sy0">=</span> <span class="st0">&quot;SSG-LT-KBURWELL&quot;</span>
&nbsp;
<span class="re0">$WriteInstance</span> <span class="sy0">=</span> <span class="st0">&quot;SSG-LT-KBURWELL&quot;</span>
&nbsp;
<span class="re0">$WriteDB</span> <span class="sy0">=</span> <span class="st0">&quot;DBA&quot;</span>
&nbsp;
<span class="re0">$WriteTable</span> <span class="sy0">=</span> <span class="st0">&quot;FileSizesAndUsage&quot;</span>
&nbsp;
Get<span class="sy0">-</span>DbaDbFile <span class="sy0">-</span>SqlInstance <span class="re0">$SqlInstance</span> <span class="sy0">-</span>ExcludeDatabase master<span class="sy0">,</span>model<span class="sy0">,</span>msdb<span class="sy0">,</span>tempdb <span class="sy0">|</span>
&nbsp;
    Select<span class="sy0">-</span>Object SqlInstance<span class="sy0">,</span> TypeDescription<span class="sy0">,</span> LogicalName<span class="sy0">,</span> PhysicalName<span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st_h">'DatabaseName'</span><span class="sy0">;</span> Expression<span class="sy0">=</span><span class="br0">&#123;</span><span class="re0">$_</span><span class="sy0">.</span>Database<span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st_h">'SizeMB'</span><span class="sy0">;</span> Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="br0">[</span>math<span class="br0">]</span><span class="sy0">::</span><a href="http://www.php.net/round"><span class="kw3">Round</span></a><span class="br0">&#40;</span><span class="re0">$_</span><span class="sy0">.</span>Size <span class="sy0">/</span> 1MB<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st_h">'UsedSpaceMB'</span><span class="sy0">;</span> Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="br0">[</span>math<span class="br0">]</span><span class="sy0">::</span><a href="http://www.php.net/round"><span class="kw3">Round</span></a><span class="br0">&#40;</span><span class="re0">$_</span><span class="sy0">.</span>UsedSpace <span class="sy0">/</span> 1MB<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st_h">'AvailableSpaceMB'</span><span class="sy0">;</span> Expression<span class="sy0">=</span><span class="br0">&#123;</span> <span class="br0">[</span>math<span class="br0">]</span><span class="sy0">::</span><a href="http://www.php.net/round"><span class="kw3">Round</span></a><span class="br0">&#40;</span><span class="re0">$_</span><span class="sy0">.</span>AvailableSpace <span class="sy0">/</span> 1MB<span class="sy0">,</span> <span class="nu0">2</span><span class="br0">&#41;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
     <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st_h">'FreeSpacePercent'</span><span class="sy0">;</span> Expression<span class="sy0">=</span><span class="br0">&#123;</span>
&nbsp;
    <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$_</span><span class="sy0">.</span>Size <span class="sy0">-</span>gt 0<span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
        <span class="re0">$sizeMB</span> <span class="sy0">=</span> <span class="br0">[</span>math<span class="br0">]</span><span class="sy0">::</span><a href="http://www.php.net/round"><span class="kw3">Round</span></a><span class="br0">&#40;</span><span class="re0">$_</span><span class="sy0">.</span>Size <span class="sy0">/</span> 1MB<span class="sy0">,</span> 2<span class="br0">&#41;</span>
&nbsp;
        <span class="re0">$availMB</span> <span class="sy0">=</span> <span class="br0">[</span>math<span class="br0">]</span><span class="sy0">::</span><a href="http://www.php.net/round"><span class="kw3">Round</span></a><span class="br0">&#40;</span><span class="re0">$_</span><span class="sy0">.</span>AvailableSpace <span class="sy0">/</span> 1MB<span class="sy0">,</span> 2<span class="br0">&#41;</span>
&nbsp;
        <span class="br0">[</span>math<span class="br0">]</span><span class="sy0">::</span><a href="http://www.php.net/round"><span class="kw3">Round</span></a><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$availMB</span> <span class="sy0">/</span> <span class="re0">$sizeMB</span><span class="br0">&#41;</span> <span class="sy0">*</span> 100<span class="sy0">,</span> 2<span class="br0">&#41;</span>
&nbsp;
        <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span> <span class="nu0">0</span> <span class="br0">&#125;</span>
&nbsp;
    <span class="br0">&#125;</span><span class="br0">&#125;</span><span class="sy0">,</span>
&nbsp;
    <span class="sy0">@</span><span class="br0">&#123;</span>Name<span class="sy0">=</span><span class="st_h">'CaptureTimestamp'</span><span class="sy0">;</span> Expression<span class="sy0">=</span><span class="br0">&#123;</span> Get<span class="sy0">-</span><a href="http://www.php.net/date"><span class="kw3">Date</span></a> <span class="sy0">-</span>Format <span class="st0">&quot;yyyy-MM-dd HH:mm:ss&quot;</span> <span class="br0">&#125;</span><span class="br0">&#125;</span>
&nbsp;
    <span class="sy0">|</span> Write<span class="sy0">-</span>DbaDbTableData <span class="sy0">-</span>SqlInstance <span class="re0">$WriteInstance</span> <span class="sy0">-</span>Database <span class="re0">$WriteDB</span> <span class="sy0">-</span>Table <span class="re0">$WriteTable</span> <span class="sy0">-</span>AutoCreateTable</pre></div></div></p>
<p>Now I have the data in SQL Server:</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-7351" src="https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m-1.png" alt="track database file sizes with Powershell" width="1267" height="207" srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m-1.png 1267w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m-1-300x49.png 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m-1-1024x167.png 1024w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/12/a-screenshot-of-a-computer-ai-generated-content-m-1-768x125.png 768w" sizes="(max-width: 1267px) 100vw, 1267px" /></p>
<p>With this information being collected regularly, via scheduled task or agent job, we can easily trend out how much our database files are growing. It will also make potential misconfigurations stand out, such as a 1TB mdf with 99% free space. Personally, I use it in client environments to find over-allocated files that can be shrunk to reclaim some space. I know, “shrink bad”, but sometimes you just need to do it. As you can see, it&#8217;s quite straightforward and rather easy to track database file sizes with Powershell!</p>
<p>The post <a href="https://sqlsolutionsgroup.com/track-database-file-sizes-with-powershell/">Track Database File Sizes with PowerShell: A Quick Guide for DBAs</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/track-database-file-sizes-with-powershell/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Contained Availability Groups in SQL Server 2022: What You Need to Know</title>
		<link>https://sqlsolutionsgroup.com/contained-availability-groups-in-sql-server-2022-what-you-need-to-know/</link>
					<comments>https://sqlsolutionsgroup.com/contained-availability-groups-in-sql-server-2022-what-you-need-to-know/#respond</comments>
		
		<dc:creator><![CDATA[A.K. Gonzalez]]></dc:creator>
		<pubDate>Sat, 22 Nov 2025 19:40:40 +0000</pubDate>
				<category><![CDATA[Contained AG's]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2022]]></category>
		<category><![CDATA[#microsftcertifedmaster]]></category>
		<category><![CDATA[#microsftpartner]]></category>
		<category><![CDATA[#parallelism #azure]]></category>
		<category><![CDATA[#SQLAB]]></category>
		<category><![CDATA[#SQlatino]]></category>
		<category><![CDATA[#SQlatinoamerica]]></category>
		<category><![CDATA[#sqldatabase]]></category>
		<category><![CDATA[#sqldeveloper]]></category>
		<category><![CDATA[#SQLgroupie]]></category>
		<category><![CDATA[#sqlimer]]></category>
		<category><![CDATA[#sqlimerbymay]]></category>
		<category><![CDATA[#sqlinjection]]></category>
		<category><![CDATA[#sqlinternals]]></category>
		<category><![CDATA[#sqlite]]></category>
		<category><![CDATA[#sqlite3]]></category>
		<category><![CDATA[#SQLLearning]]></category>
		<category><![CDATA[#SQLMagazine]]></category>
		<category><![CDATA[#sqlmanagementstudio]]></category>
		<category><![CDATA[#sqlmanager]]></category>
		<category><![CDATA[#Sqlmap]]></category>
		<category><![CDATA[#sqlrun]]></category>
		<category><![CDATA[#sqlsaturday2017]]></category>
		<category><![CDATA[#sqlsatvienna]]></category>
		<category><![CDATA[#sqlserver]]></category>
		<category><![CDATA[#SQLserver2012]]></category>
		<category><![CDATA[#sqlserver2014]]></category>
		<category><![CDATA[#sqlserver2017]]></category>
		<category><![CDATA[#sqlserver2022]]></category>
		<category><![CDATA[#SQLServeronLinux]]></category>
		<category><![CDATA[#SQLsolutionsgroup]]></category>
		<category><![CDATA[#SQLTraining]]></category>
		<category><![CDATA[#SQLYog]]></category>
		<category><![CDATA[availability groups]]></category>
		<category><![CDATA[contained ag]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLPASS]]></category>
		<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[SSG]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7298</guid>

					<description><![CDATA[<p>Overview One of the more intriguing features introduced in SQL Server 2022 is Contained Availability Groups (AGs). At first glance, they look very similar to traditional AGs — but there are some key differences that can trip you up if you’re not prepared. In this post, we’ll walk through: What a normal AG looks like [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/contained-availability-groups-in-sql-server-2022-what-you-need-to-know/">Contained Availability Groups in SQL Server 2022: What You Need to Know</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><em><span class="s1">Overview</span></em></h1>
<p class="p3"><em><strong><span class="s2">One of the more intriguing features introduced in SQL Server 2022 is </span><span class="s3">Contained Availability Groups (AGs)</span><span class="s2">. At first glance, they look very similar to traditional AGs — but there are some key differences that can trip you up if you’re not prepared.</span></strong></em></p>
<p class="p1"><span class="s1">In this post, we’ll walk through:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">What a normal AG looks like (and its limitations)</span></p>
</li>
<li>
<p class="p1"><span class="s1">How Contained AGs change the game</span></p>
</li>
<li>
<p class="p1"><span class="s1">The pitfalls we’ve seen in real-world use</span></p>
</li>
<li>
<p class="p1"><span class="s1">Practical solutions if you run into these issues</span></p>
</li>
</ul>
<h2><em><span class="s1">A Quick Refresher: Always On Availability Groups</span></em></h2>
<p class="p3"><span class="s2">Availability Groups, introduced back in SQL Server 2012, are Microsoft’s built-in solution for </span><span class="s3">high availability and disaster recovery</span><span class="s2">. They let you replicate databases across multiple instances, managed by a Windows Server Failover Cluster (WSFC).</span></p>
<p class="p1"><span class="s1">Key benefits:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">Seamless failover between primary and secondary nodes</span></p>
</li>
<li>
<p class="p1"><span class="s1">Read-only replicas to offload workloads</span></p>
</li>
<li>
<p class="p1"><span class="s1">The ability to perform backups and DBCC checks on secondaries, easing the load on your primary</span></p>
</li>
</ul>
<p class="p1"><span class="s1">But AGs have always had one big limitation: </span><span class="s2">only user databases are replicated.</span><span class="s1"> System databases like </span><span class="s3">msdb</span><span class="s1"> and </span><span class="s3">master</span><span class="s1"> stay local to each node.</span></p>
<p class="p1"><span class="s1">Why does that matter? Think about Agent jobs:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">You have to manually install jobs on every node (and keep them in sync).</span></p>
</li>
<li>
<p class="p1"><span class="s1">Jobs need to be AG-aware — otherwise they might try to run against a read-only secondary.</span></p>
</li>
<li>
<p class="p1"><span class="s1">Job history lives only on the current primary, which makes tracking a little messy.</span></p>
</li>
</ul>
<p class="p1"><span class="s1">For years, DBAs have worked around these issues, but it’s always been a pain point.</span></p>
<h2><em><span class="s1">*Enter Contained Availability Groups*</span></em></h2>
<p class="p3"><span class="s2">Contained AGs look and act like traditional AGs, but with one important twist: they include their own </span><span class="s3">contained system databases.</span></p>
<p class="p3"><span class="s2">For example, if you create a Contained AG called </span><span class="s4">MyAg</span><span class="s2">, you’ll see:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">MyAg_master</span></p>
</li>
<li>
<p class="p1"><span class="s1">MyAg_msdb</span></p>
</li>
</ul>
<p class="p3"><span class="s2">These are replicated to all nodes in the AG, just like user databases.</span></p>
<h3><span class="s1">Why this matters</span></h3>
<ul>
<li>
<p class="p1"><span class="s1">Agent jobs now live inside the contained msdb.</span><span class="s2"> No more duplicating jobs on every node.</span></p>
</li>
<li>
<p class="p1"><span class="s1">Job history is replicated.</span><span class="s2"> After failover, you don’t lose tracking.</span></p>
</li>
<li>
<p class="p1"><span class="s1">System tables travel with the AG.</span><span class="s2"> Everything stays consistent across nodes.</span></p>
</li>
</ul>
<p class="p3"><span class="s2">That’s a big win for manageability and one of the headline features of SQL Server 2022.</span></p>
<h2><em><span class="s1">Gotchas Seen in the Wild</span></em></h2>
<p class="p3"><span class="s2">As with most “new shiny” features, Contained AGs aren’t a silver bullet. There&#8217;s a few things to watch out for:</span></p>
<ol start="1">
<li>
<p class="p1"><span class="s1">No more job offloading to secondaries.</span><span class="s2"> Jobs inside the contained msdb only run on the primary. If you used secondaries to handle CHECKDB or backups, you’ll need to rethink.</span></p>
</li>
<li>
<p class="p1"><span class="s1">Replication is not supported.</span><span class="s2"> If transactional replication is part of your design, contained AGs may not be an option.</span></p>
</li>
<li>
<p class="p1"><span class="s1">Seeding is clunky.</span><span class="s2"> The GUI doesn’t support manual seeding yet. You’ll need to fall back to T-SQL.</span></p>
</li>
<li>
<p class="p1"><span class="s1">No distributed AG support.</span><span class="s2"> If you rely on DAGs for hybrid or geo-distributed HA, contained AGs won’t help.</span></p>
</li>
<li>
<p class="p1"><span class="s1">Confusion with system databases.</span><span class="s2"> When you connect to the listener, the </span><span class="s3">msdb</span><span class="s2"> and </span><span class="s3">master</span><span class="s2"> you see belong to the contained AG — not the local system copies.</span></p>
</li>
</ol>
<p>&nbsp;</p>
<h2><em><span class="s1">Workarounds &amp; Solutions</span></em></h2>
<h3><span class="s1">For Agent Jobs</span></h3>
<p class="p3"><span class="s2">If you truly need jobs to run on a secondary node, you still can — but you’ll have to install them in the </span><span class="s3">local msdb</span><span class="s2"> outside the contained AG. That means:</span></p>
<ul>
<li>
<p class="p1"><span class="s1">Jobs must be AG-aware again</span></p>
</li>
<li>
<p class="p1"><span class="s1">You’ll have to maintain them separately</span></p>
</li>
</ul>
<p class="p3"><span class="s2">It’s not elegant, but it gets the job done.</span></p>
<h3><span class="s1">For System Databases</span></h3>
<p class="p3"><span class="s2">This is case-by-case. If your code doesn’t touch </span><span class="s4">master</span><span class="s2"> or </span><span class="s4">msdb</span><span class="s2">, you’re fine. But if you do, you’ll need to carefully evaluate whether those objects belong in the contained copies or the traditional system DBs.</span></p>
<p class="p3"><span class="s2">Remember: you can query both contained and local msdbs — just make sure your scripts account for both.</span></p>
<p>&nbsp;</p>
<h2><em><span class="s1">Final Word</span></em></h2>
<p class="p3"><span class="s2">Contained Availability Groups solve one of the long-standing headaches of AGs — managing Agent jobs across nodes. But they come with trade-offs that every DBA needs to be aware of.</span></p>
<p class="p3"><span class="s2">Test carefully. Know where your jobs live. And make sure your disaster recovery plan accounts for these differences.</span></p>
<p class="p3"><span class="s2">If you want to see them in action, check out our webinar on SQL Server 2022 features, where we demo Contained AGs in detail.</span></p>
<p>The post <a href="https://sqlsolutionsgroup.com/contained-availability-groups-in-sql-server-2022-what-you-need-to-know/">Contained Availability Groups in SQL Server 2022: What You Need to Know</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/contained-availability-groups-in-sql-server-2022-what-you-need-to-know/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A Bug: Log Shipping in Contained Availability Groups</title>
		<link>https://sqlsolutionsgroup.com/log-shipping-in-contained-availability-groups/</link>
					<comments>https://sqlsolutionsgroup.com/log-shipping-in-contained-availability-groups/#respond</comments>
		
		<dc:creator><![CDATA[Rich Benner]]></dc:creator>
		<pubDate>Mon, 03 Nov 2025 14:23:03 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">https://sqlsolutionsgroup.com/?p=7326</guid>

					<description><![CDATA[<p>We’ve recently come up across a fun little bug with log shipping in contained availability groups. A cursory Google search did not bring up any useful posts for troubleshooting, so here we are. If you’re here for the bug, feel free to scroll to the bottom of this post. For the rest of you, however, [&#8230;]</p>
<p>The post <a href="https://sqlsolutionsgroup.com/log-shipping-in-contained-availability-groups/">A Bug: Log Shipping in Contained Availability Groups</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We’ve recently come up across a fun little bug with log shipping in contained availability groups. A cursory Google search did not bring up any useful posts for troubleshooting, so here we are. If you’re here for the bug, feel free to scroll to the bottom of this post. For the rest of you, however, let’s add a little context to this scenario before getting to the meat of the situation.</p>
<h3><strong>What’s an Availability Group?</strong></h3>
<p>In short, Availability Groups (AGs) are a SQL Server feature that enables you to connect multiple servers together (at least two, limits depend upon your edition) so they can share databases. One server runs as the primary node and the others act as secondary nodes. In this example we’re going to assume we’re in a two-node AG with one primary node and one secondary node. We’re also going to assume we have a synchronous AG here.</p>
<p>In this setup, the nodes share the databases and sync with each other.  The primary server holds the primary copy of the database and the secondary server holds a read only copy of the same database. The idea is that if we lose the primary node for whatever reason, the AG will fail over and make the other node the primary node. This <span style="color: #f25e00;"><strong>removes any downtime concerns</strong></span> and allows for things like patching to take place without making the database inaccessible while this happens.</p>
<p>The main issue people have is that while databases are shared between the two servers, we (as DBAs) have to keep all non-databases objects synchronized across both nodes — things like user logins, SQL Agent jobs and server level settings. We can do this with tools like the dbatools powershell modules. But, Microsoft decided that they wanted to <span style="color: #f25e00;"><strong>make this process slightly easier</strong></span> for us.</p>
<h3><strong>How is a contained Availability Group different?</strong></h3>
<p>Contained AGs add a third server category, the Listener. This is what users will usually see and connect to; they won’t connect to the nodes separately. This listener also contains all of the server level objects, so you no longer have to do things like sync your agent jobs and logins across your nodes manually.</p>
<p>There are some things to consider. Such as, agent jobs will only run on the primary node at all times. If you want them to run on the secondary then you will have to install it on the nodes directly and avoid the contained AG.</p>
<h3><strong>The Bug: Transaction Log Shipping</strong></h3>
<p>The reason for this blog post is the bug that was mentioned at the beginning. In this scenario, we have a customer with a contained AG that has log shipping involved.</p>
<p>To quickly summarize: log shipping is the act of taking transaction log backups on a server and restoring them elsewhere to make a read-only copy of the original database. In this scenario, the logs are shipped to a server that processes reporting workloads so that this workload does not happen on the main production servers.</p>
<p>Once we set up transaction log shipping in place, we will have three Agent jobs:</p>
<ul>
<li><span style="color: #f25e00;"><strong>LSBackup_DatabaseName</strong></span>: This will happen on the primary node (or the listener in the case of a contained AG) and performs the transaction log backup.</li>
<li><span style="color: #f25e00;"><strong>LSCopy_DatabaseName</strong></span>: This is installed on the recipient of the log shipped data; in this scenario, the reporting server. This finds all of the log backups that have happened within LSBackup and copies them over to the target server.</li>
<li><strong><span style="color: #f25e00;">LSRestore_DatabaseName</span></strong>: This uses the local log backups and restores them to the local copy of the database.</li>
</ul>
<p>Contained AGs absolutely support transaction log shipping. It works much better as you don’t have to manage the primary/secondary server relationship at all. However, we wouldn’t all be here if it was all butterflies and roses, would we?</p>
<p>When you set up log shipping using the GUI you will need several pieces of information to get to the right place. This includes things like backup paths for shared folders, server names, etc. <strong><span style="color: #f25e00;">Our specific bug is all about the server names</span></strong>.</p>
<p>The problem occurred when, for patching, a planned failover of the AG happened. This caused the LSBackup job to begin failing. This meant that there were no files to copy over, and therefore the reporting database began falling behind with data. With no backups, it also caused the transaction log to increase in size.</p>
<p>The specific error we began getting was this (GUID is a placeholder for an actual GUID):</p>
<p><span style="color: #f25e00;"><strong>Error: Could not retrieve backup settings for primary ID ‘GUID’</strong></span></p>
<p>Which is odd in a contained AG, as technically the primary node never changes (it’s always the listener).</p>
<p>We then see, upon the built-in retry logic, the following error:</p>
<p><span style="color: #f25e00;"><strong>Error: Failed to connect to server “SECONDARY NODE”</strong></span></p>
<p>Which it shouldn’t be trying to do at all.</p>
<p>I scripted out the log shipping configuration and the only server names involved were the listener and the reporting server. I didn&#8217;t see any reference to a specific node, so I went digging.</p>
<p>By looking at the LSBackup agent job, we could see that, for some reason, it had been generated with the server name of the primary node at the point of the log shipping being set up:</p>
<p><img loading="lazy" decoding="async" width="1200" height="386" class="wp-image-7327" src="https://sqlsolutionsgroup.com/wp-content/uploads/2025/10/a-screenshot-of-a-computer-ai-generated-content-m.png" alt="A screenshot of a computer AI-generated content may be incorrect." srcset="https://sqlsolutionsgroup.com/wp-content/uploads/2025/10/a-screenshot-of-a-computer-ai-generated-content-m.png 1200w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/10/a-screenshot-of-a-computer-ai-generated-content-m-300x97.png 300w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/10/a-screenshot-of-a-computer-ai-generated-content-m-1024x329.png 1024w, https://sqlsolutionsgroup.com/wp-content/uploads/2025/10/a-screenshot-of-a-computer-ai-generated-content-m-768x247.png 768w" sizes="(max-width: 1200px) 100vw, 1200px" /></p>
<p><span style="color: #f25e00;"><strong>This was the source of the issue</strong></span>. It was trying to read backup information from a secondary database, which it was unable to do. It was therefore failing on log backups. I have no idea why it would have chosen this server. This is now something we’re going to build into all of our checks moving forward.</p>
<h3>Fixing the Bug</h3>
<p><span style="color: #f25e00;"><strong>The fix is simple</strong></span>: Change this job manually to look at the listener and execute the agent job. It will likely take a lot longer than it usually would as it’s backing up a lot more data than normal. However, once complete, the LSCopy and LSRestore jobs will do their job and get the target database up to date.</p>
<p>Hopefully this helps anybody in a similar situation, feel free to reach out if you have any specific questions at all around any of this. I’d be more than happy to have a chat about log shipping in contained availability groups.</p>
<p>The post <a href="https://sqlsolutionsgroup.com/log-shipping-in-contained-availability-groups/">A Bug: Log Shipping in Contained Availability Groups</a> appeared first on <a href="https://sqlsolutionsgroup.com">SQL Solutions Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlsolutionsgroup.com/log-shipping-in-contained-availability-groups/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
