<?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>Luke Campbell, Author at The SERO Group</title>
	<atom:link href="https://theserogroup.com/author/lukec/feed/" rel="self" type="application/rss+xml" />
	<link>https://theserogroup.com/author/lukec/</link>
	<description>SQL Servers Healthy, Secure, And Reliable</description>
	<lastBuildDate>Tue, 13 May 2025 16:21:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://theserogroup.com/wp-content/uploads/2024/07/cropped-Canister-only-1-32x32.png</url>
	<title>Luke Campbell, Author at The SERO Group</title>
	<link>https://theserogroup.com/author/lukec/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">121220030</site>	<item>
		<title>How We Migrated 1,200+ SQL Server Databases in Under 3 Hours (While Cutting Storage Costs by 84%)</title>
		<link>https://theserogroup.com/dba/how-we-migrated-1200-sql-server-databases-in-under-3-hours-while-cutting-storage-costs-by-84/</link>
					<comments>https://theserogroup.com/dba/how-we-migrated-1200-sql-server-databases-in-under-3-hours-while-cutting-storage-costs-by-84/#comments</comments>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 14 May 2025 12:00:00 +0000</pubDate>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Consultant]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Consultant]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=3646</guid>

					<description><![CDATA[<p>Editor’s Note: This is part one of a two-part series. In next week’s follow-up, we’ll cover the project management and coordination strategies that helped make this migration a success. What if you could retire two aging SQL Server 2016 failover clustered instances, migrate 1,200+ databases to SQL Server 2022, and slash storage spend by 84%—all&#8230; <br /> <a class="read-more" href="https://theserogroup.com/dba/how-we-migrated-1200-sql-server-databases-in-under-3-hours-while-cutting-storage-costs-by-84/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/dba/how-we-migrated-1200-sql-server-databases-in-under-3-hours-while-cutting-storage-costs-by-84/">How We Migrated 1,200+ SQL Server Databases in Under 3 Hours (While Cutting Storage Costs by 84%)</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><em><strong>Editor’s Note: </strong>This is part one of a two-part series. In next week’s follow-up, we’ll cover the project management and coordination strategies that helped make this migration a success.</em></p>



<p>What if you could retire two aging SQL Server 2016 failover clustered instances, migrate 1,200+ databases to SQL Server 2022, and slash storage spend by 84%—all in the length of a weekend maintenance window?</p>



<p>In this post, I&#8217;ll tell you exactly how we did it for a client using AWS.</p>



<p>We had multiple goals for this migration:</p>



<ul class="wp-block-list">
<li>Move to SQL Server 2022 and Windows Server 2022</li>



<li>Reduce Amazon AWS storage costs</li>



<li>Minimize the downtime required for the migration</li>
</ul>



<p>The environment consisted of two SQL Server 2016 Enterprise failover clustered instances hosting over 1,200 production databases. As you may know, mainstream support for SQL Server 2016 ended on July 13, 2021, with extended support ending on July 14, 2026 (which is approaching quickly). This post explains how we successfully migrated this complex environment with less than 3 hours of planned downtime while simultaneously reducing infrastructure costs by transforming their storage architecture and backup strategy.</p>



<p><strong>Key Results:</strong></p>



<ul class="wp-block-list">
<li>1,200+ databases migrated with minimal business disruption.</li>



<li>Infrastructure storage costs reduced by 84% (estimated).</li>



<li>SQL Server platform modernized from 2016 to 2022.</li>
</ul>



<h3 class="wp-block-heading">Client Profile</h3>



<p><strong>Industry</strong>: Education software</p>



<p><strong>Environment</strong>:</p>



<ul class="wp-block-list">
<li>Two SQL Server 2016 Enterprise failover clustered instances in Amazon AWS</li>



<li>FSx file share volumes for database storage</li>



<li>FSx file share for backups</li>



<li>Multi-subnet configuration</li>



<li>1,200+ production databases ranging from 1GB to 3TB in size</li>



<li>24/7 business operations with minimal tolerance for downtime</li>
</ul>



<h3 class="wp-block-heading">The Challenge</h3>



<h4 class="wp-block-heading" id="h-business-drivers">Business Drivers:</h4>



<p>The client approached us with several business requirements:</p>



<p><strong>Cost Reduction</strong>: Their existing FSx storage and backup architecture was consuming an unsustainable portion of their IT budget.</p>



<p><strong>Technology Modernization</strong>: SQL Server 2016 was approaching the end of extended support, requiring an upgrade path to maintain vendor support and security compliance.</p>



<p><strong>Minimal Disruption</strong>: With 1,200+ production databases supporting critical business functions, any migration solution needed to minimize downtime.</p>



<h4 class="wp-block-heading" id="h-technical-challenges">Technical Challenges:</h4>



<p>The technical landscape presented several significant obstacles:</p>



<h4 class="wp-block-heading" id="h-fsx-storage-cost-and-performance">FSx Storage Cost and Performance</h4>



<p>The client&#8217;s reliance on Amazon FSx for Windows File Server provided the necessary shared storage functionality for their SQL Server failover clusters, but at a premium price point. The FSx architecture also introduced additional network latency for I/O operations, affecting database performance.</p>



<h4 class="wp-block-heading">Complex Multi-Subnet Configuration</h4>



<p>The existing environment leveraged a multi-subnet configuration, adding complexity to any potential migration solution.</p>



<h4 class="wp-block-heading">Database Scale and Diversity</h4>



<p>With over 1,200 databases that vary dramatically in size, usage patterns, and business criticality, a one-size-fits-all migration approach would be insufficient.</p>



<h4 class="wp-block-heading">Backup Architecture Limitations</h4>



<p>The existing backup strategy relied on additional FSx storage, increasing the storage costs while creating management overhead.</p>



<h4 class="wp-block-heading">Strict Downtime Constraints</h4>



<p>The business could tolerate a maximum of 8 hours of downtime, with a strong preference for staying under 4 hours to minimize impact on operations.</p>



<h3 class="wp-block-heading">The Solution</h3>



<p>After a comprehensive analysis and planning, we designed a phased approach that would transform the client&#8217;s database infrastructure while meeting their strict requirements for minimal disruption.</p>



<h4 class="wp-block-heading">Solution Architecture</h4>



<p>We architected a modern SQL Server environment on AWS with the following components:</p>



<ol class="wp-block-list">
<li><strong>Platform Upgrade:</strong> 
<ul class="wp-block-list">
<li>SQL Server 2022 Enterprise Edition</li>



<li>Leveraged latest features and extended support lifecycle</li>
</ul>
</li>



<li><strong>Storage Transformation:</strong> 
<ul class="wp-block-list">
<li>From FSx file shares to Multi-Attached EBS volumes</li>



<li>io2 Block Express volumes for critical data files</li>



<li>Optimized configuration for SQL Server workloads</li>
</ul>
</li>



<li><strong>Backup Modernization: </strong>
<ul class="wp-block-list">
<li>Implement S3-based backup strategy
<ul class="wp-block-list">
<li>Direct SQL Server native backup to S3</li>
</ul>
</li>



<li>Intelligent lifecycle policies for cost-effective long-term retention</li>



<li>Elimination of dedicated backup storage infrastructure</li>
</ul>
</li>



<li><strong>High Availability Design: </strong>
<ul class="wp-block-list">
<li>SQL Server 2022 FCI</li>



<li>Modern monitoring integration</li>
</ul>
</li>
</ol>



<h3 class="wp-block-heading">Implementation Approach</h3>



<p>We divided the implementation into distinct phases to manage risk and ensure successful outcomes.</p>



<h4 class="wp-block-heading">Phase 1: Development Environment Migration</h4>



<p>We began with the client&#8217;s development environment to validate our approach and identify potential issues. We worked with the client’s internal system admins to complete the EC2 instance and Windows Server Failover Cluster builds. This allowed us to focus mainly on the SQL Server FCI components:</p>



<ol class="wp-block-list">
<li><strong>Infrastructure Provisioning:</strong>
<ul class="wp-block-list">
<li>Deployed new EC2 instances optimized for SQL Server 2022</li>



<li>Configured multi-attached EBS volumes</li>



<li>Established networking and security configurations</li>
</ul>
</li>



<li><strong>Initial Testing:</strong>
<ul class="wp-block-list">
<li>Validated storage performance</li>



<li>Confirmed failover functionality and timing</li>



<li>Verified backup and restore operations to S3</li>
</ul>
</li>



<li><strong>Migration Dry Run:</strong>
<ul class="wp-block-list">
<li>Executed migration process on a subset of development databases</li>



<li>Measured migration times</li>



<li>Refined automation scripts based on observations</li>
</ul>
</li>
</ol>



<h4 class="wp-block-heading">Phase 2: Production Environment Preparation</h4>



<p>With lessons from the development migration incorporated, we prepared for the production migration:</p>



<ol class="wp-block-list">
<li><strong>Pre-Migration Activities:</strong>
<ul class="wp-block-list">
<li>Comprehensive database inventory and dependency mapping (i.e., agent jobs, applications, etc.)
<ul class="wp-block-list">
<li>Planning, communication, and task tracking were crucial to the overall success of the migration.</li>
</ul>
</li>



<li>Database health checks to identify potential migration blockers
<ul class="wp-block-list">
<li>Including utilizing Microsoft&#8217;s Data Migration Assistant to ensure database compatibility</li>
</ul>
</li>



<li>Implementation of enhanced monitoring</li>
</ul>
</li>



<li><strong>Automation Development:</strong>
<ul class="wp-block-list">
<li>Custom PowerShell script creation for orchestrating the migration</li>



<li>Integration with DBATOOLS for database backup and restore operations</li>
</ul>
</li>



<li><strong>Infrastructure Deployment:</strong>
<ul class="wp-block-list">
<li>Production SQL Server 2022 cluster provisioning</li>



<li>Multi-attached storage configuration and testing</li>



<li>S3 bucket preparation with appropriate security and lifecycle policies</li>



<li>Tested access to the current backup location from the new SQL Server 2022 instances (permissions and network access)</li>
</ul>
</li>
</ol>



<h4 class="wp-block-heading">Phase 3: Production Migration Execution</h4>



<p>The production migration followed our carefully orchestrated plan:</p>



<ol class="wp-block-list">
<li><strong>Pre-Stage Initial Data:</strong>
<ul class="wp-block-list">
<li>Performed initial data copy without taking systems offline</li>



<li>Utilized a combination of native Full, Differential, and Log backups</li>



<li>Leveraged the rebuilt PowerShell script to perform the initial full restore and differential restore</li>



<li>Restored log backups every 30 minutes</li>



<li>Scheduled restores via the SQL Server Agent on the new SQL Server 2022 FCIs</li>



<li>Established baseline synchronization to minimize final transfer time.</li>
</ul>
</li>



<li><strong>Migration Window Execution:</strong>
<ul class="wp-block-list">
<li>Implemented application maintenance mode at the start of the maintenance window, blocking access</li>



<li>Executed the final data synchronization using our custom migration script
<ul class="wp-block-list">
<li>Tail-log backup was used to capture all transactions and place the database on the SQL Server 2016 instances into “recovering” status
<ul class="wp-block-list">
<li>This accomplished two important goals:
<ul class="wp-block-list">
<li>Capture all transactions that have occurred since the last transaction log backup</li>



<li>Place the database into a &#8220;recovering&#8221; state so that new connections were not allowed in the old environment</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>



<li>Performed database restores on the new SQL Server 2022 instances using all transaction log backups, including the final tail-log backup
<ul class="wp-block-list">
<li>Databases were then recovered and placed into a multi-user read-write state</li>
</ul>
</li>



<li>Raised the database compatibility level to 160</li>



<li>Changed the database owner</li>



<li>Validated each database post-migration</li>



<li>Initiated post-migration full backups</li>
</ul>
</li>



<li><strong>Cutover:</strong>
<ul class="wp-block-list">
<li>Updated connection strings and DNS entries</li>



<li>Performed final validation testing</li>



<li>Opened systems for production use</li>
</ul>
</li>
</ol>



<h3 class="wp-block-heading">The Technology</h3>



<h4 class="wp-block-heading">Multi-Attached Storage Architecture</h4>



<p>The shift from FSX to multi-attached EBS volumes represented one of the most significant technical innovations in this project. We configured the volumes with performance characteristics matched to their specific workloads:</p>



<ul class="wp-block-list">
<li>Data volumes: 3,000 IOPS</li>



<li>Log volumes: 3,000 IOPs</li>



<li>TempDB volumes: Amazon EC2 instance store volume (local to each EC2 instance)</li>
</ul>



<p>This approach delivered both performance improvements and significant cost savings compared to the FSx solution.</p>



<h4 class="wp-block-heading">Custom Migration Automation</h4>



<p>The scale of this migration—over 1,200 databases—demanded sophisticated automation. We developed a custom PowerShell script that utilized multiple commandlets from the DBATools module.</p>



<h4 class="wp-block-heading" id="h-dbatools-integration">DBATools Integration</h4>



<p>While our custom script orchestrated the overall migration process, we leveraged the power of <a href="https://dbatools.io/">DBATools—an open-source PowerShell module for SQL Server management</a>—for many of the core database operations. This combination of custom automation with proven community tools provided the perfect balance of flexibility and reliability.</p>



<p>Key DBATools functions employed included:</p>



<ul class="wp-block-list">
<li><strong>Get-DBABackupHistory</strong> to retrieve the latest backup information for each database.</li>



<li><strong>Restore-DbaDatabase </strong>for restoring the initial full, differential, and all t-log backups.</li>
</ul>



<h3 class="wp-block-heading">The Results</h3>



<p>The migration was completed successfully with impressive metrics:</p>



<h4 class="wp-block-heading" id="h-cost-reduction">Cost Reduction</h4>



<ul class="wp-block-list">
<li>84% reduction in monthly storage costs</li>
</ul>



<h4 class="wp-block-heading" id="h-business-impact">Business Impact</h4>



<ul class="wp-block-list">
<li><strong>Minimal disruption: </strong>Total downtime of only 2 hours and 55 minutes, well under the 8-hour target</li>



<li><strong>Extended support lifecycle: </strong>Movement to SQL Server 2022 provides support through 2032</li>



<li><strong>Performance headroom for growth: </strong>New infrastructure accommodates projected 55% database growth</li>
</ul>



<h4 class="wp-block-heading" id="h-migration-metrics">Migration Metrics</h4>



<ul class="wp-block-list">
<li><strong>Total databases migrated: </strong>1,235</li>
</ul>



<h3 class="wp-block-heading" id="h-key-lessons-learned">Key Lessons Learned</h3>



<p>Throughout this project, we gained valuable insights that would benefit any organization undertaking a similar database migration:</p>



<ol class="wp-block-list">
<li><strong>Thorough database inventory is critical</strong>
<ul class="wp-block-list">
<li>Understanding dependencies between databases was crucial</li>



<li>Early identification of current database sizes allowed for proper allocation of storage to support the migration.</li>
</ul>
</li>



<li><strong>Storage strategy has an outsized impact</strong>
<ul class="wp-block-list">
<li>Moving to multi-attached EBS volumes delivered both cost and performance benefits</li>



<li>SQL Server 2022 introduced the ability to backup directly to S3, delivering significant storage savings vs. FSx</li>
</ul>
</li>



<li><strong>Automation is non-negotiable at scale</strong>
<ul class="wp-block-list">
<li>Manual migration for 1,200+ databases not possible within time constraints</li>



<li>Investment in custom automation paid dividends in reliability and speed</li>
</ul>
</li>



<li><strong>Pre-staging reduces risk</strong>
<ul class="wp-block-list">
<li>Copying the bulk of data before the migration window dramatically reduced the final migration time</li>



<li>Delta synchronization proved highly efficient using t-log backups</li>
</ul>
</li>



<li><strong>Multi-phase approach validates methodology</strong>
<ul class="wp-block-list">
<li>Starting with the development environment allowed refinement of techniques</li>



<li>Lessons learned in initial phases improved production migration execution</li>
</ul>
</li>
</ol>



<h3 class="wp-block-heading" id="h-conclusion">Conclusion</h3>



<p>This post demonstrates how even the most challenging database migrations can be accomplished with minimal downtime when approached with careful planning, appropriate technology choices, and custom automation. By transforming the storage architecture and leveraging modern AWS services, we not only successfully migrated 1,200+ SQL Server databases but also delivered substantial cost savings and performance improvements.</p>



<p>For organizations facing similar challenges with aging SQL Server environments, this project provides a proven blueprint for success—combining the best of cloud infrastructure, modern database platforms, and sophisticated automation techniques.</p>



<p>The client now enjoys a modern, cost-effective SQL Server environment that provides room for growth while reducing ongoing operational costs. <strong>Most importantly, they achieved this transformation with minimal disruption to their business operations—proving that with the right approach, large-scale database migrations don&#8217;t have to be painful or disruptive.</strong></p>



<h3 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h3>



<p>Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a>&nbsp;with us to get started.</p>
<p>The post <a href="https://theserogroup.com/dba/how-we-migrated-1200-sql-server-databases-in-under-3-hours-while-cutting-storage-costs-by-84/">How We Migrated 1,200+ SQL Server Databases in Under 3 Hours (While Cutting Storage Costs by 84%)</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/dba/how-we-migrated-1200-sql-server-databases-in-under-3-hours-while-cutting-storage-costs-by-84/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3646</post-id>	</item>
		<item>
		<title>Why Tail-Log Backups Matter for SQL Server Recovery and Migration</title>
		<link>https://theserogroup.com/sql-server/why-tail-log-backups-matter-for-sql-server-recovery-and-migration/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 16 Apr 2025 12:00:23 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[Script Library]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Consultant]]></category>
		<category><![CDATA[SQL Events]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=7302</guid>

					<description><![CDATA[<p>In previous posts, we&#8217;ve covered the more routine types of backups available within SQL Server — full, differential, and transaction log backups. While you may not use them as often, you should also be aware of tail-log backups when managing SQL Server. Tail-log backups can help in two scenarios. What is a tail-log backup? Tail-log&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/why-tail-log-backups-matter-for-sql-server-recovery-and-migration/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/why-tail-log-backups-matter-for-sql-server-recovery-and-migration/">Why Tail-Log Backups Matter for SQL Server Recovery and Migration</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In previous posts, we&#8217;ve covered the more routine types of backups available within SQL Server — full, differential, and transaction log backups. While you may not use them as often, you should also be aware of tail-log backups when managing SQL Server. Tail-log backups can help in two scenarios.</p>



<ol class="wp-block-list">
<li><strong>Recovering after a database outage</strong></li>



<li><strong>Database migrations</strong></li>
</ol>



<h2 class="wp-block-heading" id="h-what-is-a-tail-log-backup">What is a tail-log backup?</h2>



<p>Tail-log backups capture transaction log records that haven&#8217;t been backed up yet and set the database into a &#8220;restoring&#8221; state. Think of it as the last transaction log backup taken right before a database is restored, moved, or damaged. Its primary purpose is to capture the &#8220;tail&#8221; end of the log (any transactions that occurred since the last regular log backup to prevent data loss).</p>



<h2 class="wp-block-heading" id="h-when-are-tail-log-backups-important">When are tail-log backups important?</h2>



<h3 class="wp-block-heading" id="h-scenario-1-preventing-data-loss-after-a-failure">Scenario 1: Preventing data loss after a failure</h3>



<p>Imagine that you schedule transaction log backups to occur every 15 minutes. At 10:05 AM, the server hosting your database experiences a critical failure, taking the database offline. Your last log backup was at 10:00 AM. This means that transactions that have occurred between 10:00 AM and 10:05 AM would be lost without a tail-log backup.</p>



<p>The tail-log backup bridges this gap, capturing those final crucial log records and allowing you to restore the database to the exact point of failure. Depending on the damage, you may need to add additional options for this backup to succeed. See <a href="https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/tail-log-backups-sql-server?view=sql-server-ver16#TailLogScenarios" target="_blank" rel="noreferrer noopener">here</a> for those options.</p>



<h3 class="wp-block-heading" id="h-scenario-2-supporting-a-smooth-database-migration">Scenario 2: Supporting a smooth database migration</h3>



<p>If you&#8217;re migrating a database to a new instance, tail-log backups can be beneficial as well. Let&#8217;s say you have a migration coming up from SQL Server 2016 to a new SQL Server 2022 instance. You&#8217;ve pre-staged the database on the new instance by restoring the latest Full and have been applying transaction log backups periodically without recovery throughout the week leading up to migration day. On migration day, you need to ensure the following happens:</p>



<ol class="wp-block-list">
<li>All transactions are captured up to and right after the maintenance window begins.</li>



<li>Ensure the database on the old instance can no longer accept new connections.  You don&#8217;t want new transactions landing here by accident.</li>



<li>Restore the final transaction log backup on the new instance and recover the database.</li>
</ol>



<p>A tail-log backup can help in this scenario as well. You see, once you perform a tail-log backup, the database you performed it on is placed into the &#8220;<strong>restoring</strong>&#8221; state, which doesn&#8217;t allow connections. This ensures no future transactions can be written. Just in case a connection string wasn&#8217;t updated somewhere during the migration (I&#8217;d personally rather the connection fail vs. being able to connect to the database that is no longer in use). Once the migration is complete, including testing and validation, the old database can be dropped.</p>



<p>Let&#8217;s take a look at the requirements needed before you can utilize tail-log backups.</p>



<h2 class="wp-block-heading" id="h-requirements-for-tail-log-backups">Requirements for tail-log backups</h2>



<p>To perform a tail-log backup, the following conditions must be met:</p>



<h3 class="wp-block-heading" id="h-recovery-model">Recovery model</h3>



<p>The database must be in the <strong>FULL</strong> or <strong>BULK_LOGGED </strong>recovery model. Tail-log backups are not possible (or needed) in the <strong>SIMPLE </strong>recovery model, as the transaction log is automatically truncated.</p>



<h3 class="wp-block-heading" id="h-prior-full-backup">Prior full backup</h3>



<p>At least one full database backup must have been taken previously.  </p>



<h3 class="wp-block-heading" id="h-log-file-accessibility">Log file accessibility</h3>



<p>The transaction log file (.ldf) must be accessible and largely intact, even if the data files are damaged or the database is offline.</p>



<p>You can determine if your database meets the first two requirements by using a query similar to the one below.</p>



<pre class="wp-block-code"><code>
USE MSDB
SELECT distinct
	backupSet.&#91;Database_Name],  
	s.recovery_model_desc AS RecoveryModel,
	backupmediafamily.logical_device_name AS LogicalDeviceName, 
	backupmediafamily.physical_device_name AS PhysicalDeviceName, 
	backupset.expiration_date AS ExpirationDate, 
	backupset.name AS Name, 
	backupset.&#91;description] AS &#91;Description], 
	backupset.user_name AS UserName, 
	backupset.backup_start_date AS StartDate, 
	backupset.backup_finish_date AS EndDate, 
	DATEDIFF(mi, backupset.backup_start_date, backupset.backup_finish_date) AS DurationInMinutes,
	CAST(CASE backupset.type 
	WHEN 'D' THEN 'Database' 
	WHEN 'L' THEN 'Log' 
	WHEN 'I' THEN 'Differential' 
	WHEN 'F' THEN 'File' 
	WHEN 'G' THEN 'Diff File' 
	WHEN 'P' THEN 'Partial' 
	WHEN 'Q' THEN 'Diff Partial' 
	END AS NVARCHAR(128)) AS BackupType, 
	--backupset.compressed_backup_size / 1048576 , 
--	backupset.backup_size / 1048576,
	ISNULL(backupset.compressed_backup_size, backupset.backup_size) / 1048576 as SIZE,
	is_snapshot,
	is_copy_only,
	GetDate() AS DateChecked --, *
FROM msdb.dbo.backupmediafamily AS backupmediafamily
INNER JOIN msdb.dbo.backupset AS backupset ON backupmediafamily.media_set_id = backupset.media_set_id
INNER JOIN master.sys.databases as s ON backupset.database_name = s.name
WHERE     (CONVERT(datetime, backupset.backup_start_date, 102) &gt;= GETDATE() - 1)
AND backupset.server_name = @@servername  --Filters out databases that were restored from other instances.
AND backupSet.&#91;Database_Name] = 'YourDatabaseName'
AND backupset.type = 'D'
--AND backupSet.Type = 'D'
ORDER BY StartDate --DurationInMinutes DESC
</code></pre>



<h2 class="wp-block-heading" id="h-how-to-perform-a-tail-log-backup-high-level">How to perform a tail-log backup (high-level)</h2>



<p>The command is a variation of the standard <strong>BACKUP LOG</strong> statement. The key difference often lies in the options used, particularly <strong>WITH NORECOVERY </strong>or <strong>WITH NO_TRUNCATE</strong>.</p>



<h3 class="wp-block-heading" id="h-scenario-1-database-damaged-not-starting-log-file-intact">Scenario 1: Database damaged/not starting (log file intact)</h3>



<p>In this scenario, you may have lost a drive containing your data files (.mdf).  You&#8217;re lucky because you&#8217;ve been following the old adage of keeping your data files and log files on separate disks so the log file is available.  </p>



<p>If the database data files are damaged or missing, the database cannot start normally.  You can attempt a tail-log backup using <strong>WITH NO_TRUNCATE</strong>.  This tells SQL Server to back up the log records without trying to access the data files or truncate the inactive portion of the log, which might fail since the database is damaged.</p>



<pre class="wp-block-code"><code>BACKUP LOG ExampleDB
TO DISK = '\\YourBackupShare\Backup\ExampleDB_TailLog_NoTruncate.trn'
WITH NO_TRUNCATE;</code></pre>



<h3 class="wp-block-heading" id="h-scenario-2-planned-migration">Scenario 2: Planned migration</h3>



<p>In scenario 2, you&#8217;re migrating the database to a new instance and must ensure all transactions are captured.  I&#8217;ll typically switch the database into <strong>SINGLE_USER</strong> mode and kill all other connections when doing so.</p>



<pre class="wp-block-code"><code>ALTER DATABASE ExampleDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE</code></pre>



<p>Perform this step once your migration window has started and any applications, scheduled tasks, jobs, etc. have been stopped.</p>



<p>Perform the tail-log backup.</p>



<pre class="wp-block-code"><code>BACKUP LOG ExampleDB
TO DISK = '\\YourBackupShare\Backup\ExampleDB_TailLog.trn'
WITH NORECOVERY;</code></pre>



<p>Here&#8217;s what happens when you run this backup.</p>



<ol class="wp-block-list">
<li>The final log records are backed up to ExampleDB_TailLog.trn.</li>



<li>The ExampleDB database is put into the RESTORING state.</li>



<li>No further transactions can occur in the original ExampleDB database.</li>



<li>You can now proceed to restore any subsequent differential/log backups that you haven&#8217;t restored yet and, finally, this tail-log backup (using WITH RECOVERY) on the target server.</li>



<li>Once restored and recovered, don&#8217;t forget to place ExampleDB into MULTI_USER mode on the target server.</li>
</ol>



<h2 class="wp-block-heading" id="h-tail-log-backup-process-checklist">Tail-log backup process checklist</h2>



<p>Here&#8217;s a quick checklist for performing a planned tail-log backup (like for a migration):</p>



<ul class="wp-block-list">
<li><strong>Verify Recovery Model: </strong>Ensure the database is in FULL or BULK_LOGGED mode.</li>



<li><strong>Check Backup History: </strong>Confirm a recent full backup exists.  Regular log backups should be running.</li>



<li><strong>Notify Users: </strong>Inform users of the planned downtime. Work with all other teams that depend on the database to determine a sufficient maintenance window for the migration. They&#8217;ll need to update connection strings, scheduled jobs, SSIS packages, etc., to point to the new database location.</li>



<li><strong>Restrict Access: </strong>Prevent new connections/transactions just before the backup.  </li>



<li>Execute <strong>BACKUP LOG &#8230; WITH NORECOVERY: </strong>Run the command, specifying a clear path and filename.</li>



<li><strong>Verify Backup File</strong>: Ensure the .trn file was created successfully.</li>



<li><strong>Confirm Database State: </strong>Check that the source database is now in the <strong>RESTORING </strong>state.</li>



<li><strong>Proceed with Restore: </strong>Use the tail-log backup as the final restore step on the target server or for recovery.</li>



<li><strong>Set database to MULTI_USER: </strong>If you&#8217;ve placed the source database in <strong>SINGLE_USER</strong> mode just prior to performing the tail-log backup, the restored database on the target will be in <strong>SINGLE_USER</strong> mode as well.  To allow connections, be sure to switch it to <strong>MULTI_USER</strong>.</li>
</ul>



<h2 class="wp-block-heading" id="h-in-conclusion">In conclusion</h2>



<p>While often overlooked in basic backup discussions, the tail-log backup is a vital tool in the SQL Server DBA&#8217;s toolkit.  It provides the critical ability to capture the very last transactions before a database restore or migration, minimizing data loss and ensuring the most up-to-date recovery possible.  Understanding when and how to use it is key to robust data protection and seamless database migrations.</p>



<h2 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h2>



<p>Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a>&nbsp;with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/why-tail-log-backups-matter-for-sql-server-recovery-and-migration/">Why Tail-Log Backups Matter for SQL Server Recovery and Migration</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7302</post-id>	</item>
		<item>
		<title>SQL Server Piecemeal Restores: Minimize Downtime &#038; Speed Up Recovery</title>
		<link>https://theserogroup.com/sql-server/sql-server-piecemeal-restores-minimize-downtime-speed-up-recovery/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 12 Feb 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=7058</guid>

					<description><![CDATA[<p>Restoring large databases can be time-consuming, but online piecemeal restores in SQL Server Enterprise offer quicker access to data. This method allows partial restoration while keeping the primary filegroup online, minimizing downtime. Requirements include using the Enterprise edition, multiple filegroups, a full recovery model, and available log backups. Best practices enhance efficiency.</p>
<p>The post <a href="https://theserogroup.com/sql-server/sql-server-piecemeal-restores-minimize-downtime-speed-up-recovery/">SQL Server Piecemeal Restores: Minimize Downtime &amp; Speed Up Recovery</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p id="bh-CeMYLyrXSyYyMQilSGp-J">Restoring large databases can be extremely time-consuming. That time feels like it’s slipping away even faster when you&#8217;re racing to recover a crucial VLDB lost to corruption or mishap.</p>



<p id="bh-9hNBs8IFq4h11Z7nOxxQ0">Fortunately, if you’re using SQL Server Enterprise and require quicker access to only a subset of data, piecemeal restores may be your answer to faster recovery.</p>



<p id="bh-V4e1KMh9MJIC0qjjIBSwy">Piecemeal restores <a href="https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/example-piecemeal-restore-of-database-full-recovery-model?view=sql-server-ver16" target="_blank" rel="noreferrer noopener">are available in both Standard and Enterprise editions</a>. However, with Enterprise, you can perform these online.</p>



<p id="bh-Qa5Lp5fyfakoFQj9wjusB">In this post, I’ll cover:</p>



<ul class="wp-block-list">
<li>What is an online piecemeal restore?</li>



<li>Requirements for performing an online piecemeal restore.</li>



<li>Best practices for online piecemeal restores.</li>
</ul>



<h1 class="wp-block-heading" id="h-what-is-an-online-piecemeal-restore">What is an online piecemeal restore?</h1>



<p id="bh-KBFy5k_LdCElytVXcp0fu">An online piecemeal restore is a multi-stage process that allows partial restoration of a database while keeping the primary filegroup available for access. This is particularly useful for:</p>



<ul id="bh-OYuiqemwCRvpPilXV_eP8" class="wp-block-list">
<li><strong>Minimizing downtime:</strong>&nbsp;The primary filegroup remains online while secondary filegroups are restored.</li>



<li><strong>High Availability:</strong>&nbsp;Users can continue working with critical data while less frequently accessed data is recovered.</li>



<li><strong>Efficient Disaster Recovery:</strong>&nbsp;Restoring large databases in phases instead of performing a full database restore.</li>
</ul>



<h2 class="wp-block-heading" id="h-requirements-for-performing-an-online-piecemeal-restore">Requirements for performing an online piecemeal restore</h2>



<p id="bh-eD0WIy9dmYQ7DHVUD0eHk">Before you can perform an online piecemeal restore, ensure that</p>



<ol id="bh-p3QiFqbP8Smsb-pA3zjAf" class="wp-block-list">
<li><strong>Enterprise edition of SQL Server:</strong>&nbsp;Online piecemeal restores are only supported in SQL Server Enterprise edition.</li>



<li><strong>Database uses multiple filegroups:</strong>&nbsp;The database must utilize multiple filegroups.</li>



<li><strong>Database uses full recovery model: </strong>Ensure the database is using the full recovery model.</li>



<li><strong>Primary filegroup remains online:</strong>&nbsp;The primary filegroup must be online before restoring secondary filegroups.</li>



<li><strong>Log backups are available:</strong>&nbsp;Transaction logs must cover the period between the full backup and the latest (differential or filegroup) backup.</li>



<li><strong>No cross-filegroup constraints:</strong>&nbsp;Foreign key constraints referencing objects in different filegroups can block an online restore. However, FKs that reference objects in the primary filegroup will not cause an issue (the primary filegroup must be restored first and online before all secondary filegroups can be restored).</li>
</ol>



<h2 class="wp-block-heading" id="h-step-by-step-guide-to-performing-an-online-piecemeal-restore"><strong>Step-by-step guide to performing an online piecemeal restore</strong></h2>



<h3 class="wp-block-heading" id="h-step-1-verify-database-filegroups">Step 1: Verify database filegroups</h3>



<p>Before initiating a restore, check the current filegroups in the database:</p>



<pre class="wp-block-code"><code>select name, type_desc from sys.filegroups;
</code></pre>



<h3 class="wp-block-heading" id="h-step-2-restore-the-primary-filegroup">Step 2: Restore the primary filegroup</h3>



<p>Restore the primary filegroup and bring the database online. If you are restoring additional differential or log backups, include “NORECOVERY” in your restore statement. However, in this example, we’re only restoring the FULL backup and then bringing the database online. Take note of the &#8220;<a href="https://learn.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql?view=sql-server-ver16#about-restore-scenarios">PARTIAL</a>&#8221; keyword:</p>



<pre class="wp-block-code"><code>RESTORE DATABASE MyDatabase FILEGROUP = 'PRIMARY' FROM DISK = '\\myshare\mydatabase\full\MyDatabase_FULL.bak' 
WITH PARTIAL, STATS = 10;</code></pre>



<h3 class="wp-block-heading" id="h-step-3-restore-additional-filegroups">Step 3: Restore additional filegroups</h3>



<p>Each additional filegroup must be restored. If a query attempts to access an object that is in the secondary filegroup, an error will be returned stating the filegroup is offline.</p>



<pre class="wp-block-code"><code>RESTORE DATABASE MyDatabase FILEGROUP = 'MyFileGroup' FROM DISK = '\\myshare\mydatabase\full\MyDatabase_FULL.bak'
WITH STATS = 10;</code></pre>



<p>At this point, the database is fully available for use.</p>



<h2 class="wp-block-heading" id="h-best-practices-for-online-piecemeal-restores">Best practices for online piecemeal restores</h2>



<ul class="wp-block-list">
<li>To support online piecemeal restores, Enterprise edition must be used.</li>



<li>Ensure no foreign keys or indexed views span multiple filegroups that may block restores.</li>
</ul>



<h2 class="wp-block-heading" id="bh-Kq-Gdhr8oo_ONK_REifgI">Want to work with The SERO Group?</h2>



<p>Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a>&nbsp;with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/sql-server-piecemeal-restores-minimize-downtime-speed-up-recovery/">SQL Server Piecemeal Restores: Minimize Downtime &amp; Speed Up Recovery</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7058</post-id>	</item>
		<item>
		<title>Understanding SQL Server’s High Memory Usage: What You Need to Know</title>
		<link>https://theserogroup.com/sql-server/understanding-sql-servers-high-memory-usage-what-you-need-to-know/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 15 Jan 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6988</guid>

					<description><![CDATA[<p>&#8220;Why is SQL Server memory usage high?&#8221; If you haven’t been asked this question, you haven’t supported SQL Server long enough. I&#8217;ve encountered managers, systems administrators, and developers who&#8217;ve wondered this. Simply put, data reads are much faster in RAM than from disks. RAM latency is typically measured in nanoseconds. By contrast, disk latency is&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/understanding-sql-servers-high-memory-usage-what-you-need-to-know/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/understanding-sql-servers-high-memory-usage-what-you-need-to-know/">Understanding SQL Server’s High Memory Usage: What You Need to Know</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>&#8220;Why is SQL Server memory usage high?&#8221; If you haven’t been asked this question, you haven’t supported SQL Server long enough.</p>



<p>I&#8217;ve encountered managers, systems administrators, and developers who&#8217;ve wondered this. Simply put, data reads are much faster in RAM than from disks. RAM latency is typically measured in nanoseconds. By contrast, disk latency is measured in milliseconds.</p>



<figure class="wp-block-image size-large is-resized"><a href="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2.png"><img fetchpriority="high" decoding="async" width="1024" height="751" src="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-1024x751.png" alt="" class="wp-image-7009" style="width:646px;height:auto" srcset="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-1024x751.png 1024w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-300x220.png 300w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-768x563.png 768w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-1536x1126.png 1536w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-2048x1501.png 2048w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-2-1473x1080.png 1473w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>It&#8217;s not uncommon to find dedicated SQL Server machines with 90% of memory allocated to the sqlservr.exe process (another reason to use dedicated SQL Server machines, but that&#8217;s for another post).</p>



<p>Let&#8217;s take a high-level look at how SQL Server uses memory so the next time you&#8217;re asked why memory usage is so high, you&#8217;ll be able to respond and explain why this is typically ok.  </p>



<figure class="wp-block-image size-large is-resized"><a href="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3.png"><img decoding="async" width="1024" height="805" src="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-1024x805.png" alt="" class="wp-image-7010" style="width:668px;height:auto" srcset="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-1024x805.png 1024w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-300x236.png 300w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-768x604.png 768w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-1536x1208.png 1536w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-2048x1610.png 2048w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-High-Memory-Usage-in-SQL-Server-visual-selection-3-1374x1080.png 1374w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading" id="h-buffer-pool-cache">Buffer Pool (Cache)</h3>



<p>This is the largest memory area used for caching data and index pages. SQL Server keeps data in memory to minimize expensive disk I/O operations. Many things can affect how long pages are kept in the cache, but we won&#8217;t cover those here. When you adjust SQL Server&#8217;s max memory setting, you&#8217;re telling SQL Server how much memory it can use for the Buffer Pool (<a href="https://learn.microsoft.com/en-us/sql/relational-databases/memory-management-architecture-guide?view=sql-server-ver16#changes-to-memory-management-starting-with-sql-server-2012" target="_blank" rel="noreferrer noopener">this affects other types of memory allocations as well, but the Buffer Pool is the largest consumer</a>).</p>



<p>If you&#8217;ve adjusted max memory but still see that the sqlservr.exe process is consuming more, it&#8217;s because SQL Server has additional memory requirements unaffected by this setting. See &#8220;<a href="https://learn.microsoft.com/en-us/sql/relational-databases/memory-management-architecture-guide?view=sql-server-ver16#sql-server-might-commit-memory-over-the-max-server-memory-setting" target="_blank" rel="noreferrer noopener">SQL Server might commit memory over the max memory setting</a>&#8221; for some reasons why you may be experiencing this.</p>



<figure class="wp-block-image size-large"><a href="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2.png"><img decoding="async" width="1024" height="519" src="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-1024x519.png" alt="" class="wp-image-7019" srcset="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-1024x519.png 1024w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-300x152.png 300w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-768x390.png 768w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-1536x779.png 1536w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-2048x1039.png 2048w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Buffer-Pool-visual-selection-2-1920x974.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading" id="h-plan-cache">Plan Cache</h3>



<p>The plan cache stores execution plans to avoid the cost of recompiling queries. You see, when SQL Server compiles a query, it must perform <a href="https://learn.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver16" target="_blank" rel="noreferrer noopener">several steps</a>:</p>



<ol class="wp-block-list">
<li>Parse the query.</li>



<li>Bind it by resolving objects (tables, columns, etc) referenced in the query to ensure they exist.  Validate data types, perform implicit conversions (try to avoid these if possible), and ensure logical operators in the query are bound to database objects to ensure it can actually execute.</li>



<li>Next, the optimizer takes the parsed query and attempts to generate the most efficient execution plan (the keyword here is <em><strong>attempts</strong></em>).  This is a critical step.</li>



<li>Next, the plan is finalized and converted into a format SQL Server can execute.</li>



<li>Then, the plan is stored in the plan cache for future reuse, provided the same query is executed.</li>
</ol>



<p>Just like with the Buffer Pool, various things can affect plan reuse or force a query to be recompiled. Again, I won&#8217;t go too far into that today. </p>



<p>The max memory setting influences the plan cache size and is managed dynamically within this allocation. For a more in-depth understanding of SQL Server&#8217;s plan cache limits and memory management, see Erin Stellato&#8217;s blog post on <a href="https://www.sqlskills.com/blogs/erin/sql-server-plan-cache-limits/" target="_blank" rel="noreferrer noopener">SQLskills</a>.</p>



<figure class="wp-block-image size-large"><a href="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection.png"><img loading="lazy" decoding="async" width="1024" height="840" src="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-1024x840.png" alt="" class="wp-image-7014" srcset="https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-1024x840.png 1024w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-300x246.png 300w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-768x630.png 768w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-1536x1260.png 1536w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-2048x1680.png 2048w, https://theserogroup.com/wp-content/uploads/2025/01/Understanding-SQL-Servers-Plan-Cache-visual-selection-1317x1080.png 1317w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading" id="h-worker-threads-and-connections">Worker Threads and Connections</h3>



<p>SQL Server needs memory to manage worker threads and connections.  These are critical components of its query execution engine.</p>



<p>Worker threads are responsible for executing tasks in SQL Server (running queries, handling requests, and performing background tasks). Each thread needs a certain amount of memory to function. These can be adjusted through the max worker threads configuration setting. I can&#8217;t recall a time I&#8217;ve ever needed to change this setting. If you find yourself thinking you need to change the default, check out Brent Ozar&#8217;s post <a href="https://www.brentozar.com/archive/2017/02/max-worker-threads-dont-touch/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<figure class="wp-block-image size-large"><a href="https://theserogroup.com/wp-content/uploads/2025/01/image-2.png"><img loading="lazy" decoding="async" width="1024" height="612" src="https://theserogroup.com/wp-content/uploads/2025/01/image-2-1024x612.png" alt="" class="wp-image-7015" srcset="https://theserogroup.com/wp-content/uploads/2025/01/image-2-1024x612.png 1024w, https://theserogroup.com/wp-content/uploads/2025/01/image-2-300x179.png 300w, https://theserogroup.com/wp-content/uploads/2025/01/image-2-768x459.png 768w, https://theserogroup.com/wp-content/uploads/2025/01/image-2-1536x918.png 1536w, https://theserogroup.com/wp-content/uploads/2025/01/image-2-2048x1224.png 2048w, https://theserogroup.com/wp-content/uploads/2025/01/image-2-1807x1080.png 1807w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Each client&#8217;s connection to SQL Server requires memory to handle communication and processing.</p>



<ul class="wp-block-list">
<li>Connection Context &#8211; Session settings, Query and command states, etc.</li>
</ul>



<p>If you want to take a deep dive into threads, review <a href="https://learn.microsoft.com/en-us/sql/relational-databases/thread-and-task-architecture-guide?view=sql-server-ver16" target="_blank" rel="noreferrer noopener">Microsoft&#8217;s Thread and Tasks Architecture Guide</a>.</p>



<h3 class="wp-block-heading" id="h-memory-for-internal-processes">Memory for Internal Processes</h3>



<p>SQL Server performs various operations during query execution and other activities.  It needs memory to do that.</p>



<ul class="wp-block-list">
<li>Locking</li>



<li>Sorting</li>



<li>Hash Joins</li>



<li>Temporary Objects (that don&#8217;t spill over to tempdb)</li>
</ul>



<h3 class="wp-block-heading" id="h-in-memory-oltp-memory-optimized-tables">In-memory OLTP (Memory-Optimized Tables)</h3>



<p>This feature was introduced in SQL Server 2014 and designed for high-performance transactions.  It can consume large amounts of memory; you should plan carefully before using this feature.  See <a href="https://learn.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/bind-a-database-with-memory-optimized-tables-to-a-resource-pool?view=sql-server-ver16&amp;redirectedfrom=MSDN#bkmk_PercentAvailable">he</a><a href="https://learn.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/bind-a-database-with-memory-optimized-tables-to-a-resource-pool?view=sql-server-ver16&amp;redirectedfrom=MSDN#bkmk_PercentAvailable" target="_blank" rel="noreferrer noopener">r</a><a href="https://learn.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/bind-a-database-with-memory-optimized-tables-to-a-resource-pool?view=sql-server-ver16&amp;redirectedfrom=MSDN#bkmk_PercentAvailable">e</a> for more information on managing memory allocated to these objects using SQL Server&#8217;s Resource Governor.</p>



<h3 class="wp-block-heading" id="h-in-conclusion">In Conclusion</h3>



<p>High memory usage in SQL Server is not a problem—it’s a feature that improves performance by reducing reliance on slower disk operations.</p>



<h3 class="wp-block-heading" id="h-ready-to-optimize-your-sql-server">Ready to Optimize Your SQL Server?</h3>



<p>Discover how The SERO Group can take the guesswork out of SQL Server management. <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a> today!</p>
<p>The post <a href="https://theserogroup.com/sql-server/understanding-sql-servers-high-memory-usage-what-you-need-to-know/">Understanding SQL Server’s High Memory Usage: What You Need to Know</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6988</post-id>	</item>
		<item>
		<title>How to Build SQL Server FCIs in AWS with Multi-Attach EBS Volumes</title>
		<link>https://theserogroup.com/sql-server/how-to-build-sql-server-fcis-in-aws-with-multi-attach-ebs-volumes/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 18 Dec 2024 13:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[Serogroup]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6945</guid>

					<description><![CDATA[<p>Need to build a SQL Server FCI in AWS but prefer not to use FSx for Windows File Server? Good news, you have other options. One option that more closely aligns with traditional FCIs that use shared disks is Multi-Attach EBS volumes. Multi-Attach EBS volumes in AWS enable organizations to use Windows Server Failover Clusters&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/how-to-build-sql-server-fcis-in-aws-with-multi-attach-ebs-volumes/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/how-to-build-sql-server-fcis-in-aws-with-multi-attach-ebs-volumes/">How to Build SQL Server FCIs in AWS with Multi-Attach EBS Volumes</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Need to build a SQL Server FCI in AWS but prefer not to use FSx for Windows File Server?  Good news, you have other options.  One option that more closely aligns with traditional FCIs that use shared disks is Multi-Attach EBS volumes.</p>



<p>Multi-Attach EBS volumes in AWS enable organizations to use Windows Server Failover Clusters with shared storage. Attaching a single EBS (Elastic Block Store) to multiple EC2 instances simultaneously makes them ideal for SQL Server FCIs.</p>



<h2 class="wp-block-heading" id="h-what-are-multi-attach-ebs-volumes">What are Multi-Attach EBS Volumes?</h2>



<p>These EBS volumes are single Elastic Block Store volumes that can be attached to multiple EC2 instances.  The feature is available for io1 and io2 Block Express volumes.  However, Windows instances only support io2 Block Express volumes.  Multi-Attach facilitates high availability and seamless failover for SQL Server FCIs (similar to how they operate on-premises).  </p>



<h2 class="wp-block-heading" id="h-prerequisites">Prerequisites</h2>



<p>Before setting up these volumes for SQL Server FCIs, ensure the following prerequisites are met:</p>



<h3 class="wp-block-heading" id="h-1-ec2-instances-in-the-same-availability-zone">1. EC2 Instances in the same Availability Zone</h3>



<p>All EC2 instances that will attach to the EBS volume must reside within the same AZ.  This ensures low latency and high throughput between the instances and the EBS volume.  This is critical for maintaining performance and reliability in a failover scenario.</p>



<h3 class="wp-block-heading" id="h-2-supported-ebs-volume-types">2. Supported EBS Volume Types</h3>



<p>While both io1 and io2 Block Express volumes support the Multi-Attach option, Windows instances only support io2 Block Express volumes.  This limitation is due to the enhanced performance and features that io2 Block Express provides.</p>



<h3 class="wp-block-heading" id="h-3-regional-availability-of-io2-block-express-volumes">3. Regional Availability of io2 Block Express Volumes</h3>



<p>Verify that io2 Block Express Volumes are available in your AWS region.  Not all regions may support this volume type, so review the <strong><a href="https://docs.aws.amazon.com/ebs/latest/userguide/provisioned-iops.html">Amazon EBS Provisioned IOPS SSD volumes</a></strong> user guide to confirm availability.</p>



<h3 class="wp-block-heading" id="h-4-additional-networking-and-vpc-configurations">4. Additional Networking and VPC Configurations</h3>



<p>While this post focuses on EBS Multi-Attach, ensure that your networking and VPC configurations meet the requirements for setting up a Windows Server Failover Cluster.  See this <a href="https://aws.amazon.com/blogs/modernizing-with-aws/how-to-deploy-a-sql-server-failover-cluster-with-amazon-ebs-multi-attach-on-windows-server/#:~:text=In%20this%20blog%20post%2C%20we%E2%80%99ll%20walk%20you%20through,Multi-Attach%20on%20io2%20volumes%20with%20persistent%20reservations%20feature.">link</a> to review the full list of prerequisites for WSFC.</p>



<h2 class="wp-block-heading" id="h-io2-block-express-volumes">io2 Block Express Volumes</h2>



<p>These volumes offer the highest-performance block storage.  Key features include:</p>



<ul class="wp-block-list">
<li><strong>Capacity: </strong>Ranges from 4 GB to 64 TB, accommodating various workloads.</li>



<li><strong>Performance:</strong>
<ul class="wp-block-list">
<li><strong>IOPS: </strong>Up to 256,000 IOPS per volume.</li>



<li><strong>Throughput: </strong>Maximum throughput of 4 GB/s per volume</li>
</ul>
</li>
</ul>



<p>These high-performance metrics make io2 Block Express volumes ideal for demanding SQL Server workloads, especially those requiring rapid data access and high transaction rates.</p>



<h3 class="wp-block-heading" id="h-compatibility">Compatibility</h3>



<p>io2 Block Express volumes are available on all <strong><a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">Nitro-based EC2</a></strong> instances.  The AWS Nitro system is a collection of hardware and software components designed to provide enhanced security, performance, and flexibility for EC2 instances.  </p>



<h2 class="wp-block-heading" id="h-enabling-multi-attach-for-ebs-volumes">Enabling Multi-Attach for EBS Volumes</h2>



<p>By default, this option is disabled but simple to enable. See this <a href="https://docs.aws.amazon.com/ebs/latest/userguide/working-with-multi-attach.html">link</a> for instructions on using the AWS Console or Command-Line.</p>



<h2 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h2>



<p>Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a>&nbsp;with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/how-to-build-sql-server-fcis-in-aws-with-multi-attach-ebs-volumes/">How to Build SQL Server FCIs in AWS with Multi-Attach EBS Volumes</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6945</post-id>	</item>
		<item>
		<title>Prevent SQL Server Outages by Monitoring Transaction Log Growth</title>
		<link>https://theserogroup.com/sql-server/prevent-sql-server-outages-by-monitoring-transaction-log-growth/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 09 Oct 2024 12:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[Script Library]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Consultant]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6725</guid>

					<description><![CDATA[<p>I&#8217;ve lost count of the times I&#8217;ve been called after hours due to a drive filling up. The usual culprit? Transaction file log growth. Monitoring the growth of your SQL Server transaction log files is crucial for maintaining database performance and ensuring system reliability. Unchecked transaction log growth can lead to disk space issues and&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/prevent-sql-server-outages-by-monitoring-transaction-log-growth/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/prevent-sql-server-outages-by-monitoring-transaction-log-growth/">Prevent SQL Server Outages by Monitoring Transaction Log Growth</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve lost count of the times I&#8217;ve been called after hours due to a drive filling up.  The usual culprit?  Transaction file log growth.</p>



<p>Monitoring the growth of your SQL Server transaction log files is crucial for maintaining database performance and ensuring system reliability.  Unchecked transaction log growth can lead to disk space issues and system outages.  Let&#8217;s take a look at some of the causes of transaction log file growth, why it&#8217;s important to monitor, and how you can use the sp_whoisactive procedure to keep an eye on it.</p>



<h2 class="wp-block-heading" id="h-what-causes-the-transaction-log-file-to-grow">What Causes the Transaction Log File to Grow</h2>



<p>The transaction log file records all transactions and database modifications made by each transaction.  Several factors can contribute to its growth:</p>



<ul class="wp-block-list">
<li><strong>Long-Running Transactions: </strong>Transactions that take a long time to complete prevent the log from truncating because SQL Server needs to maintain the log records until the transaction is committed.</li>



<li><strong>Recovery Models: </strong>
<ul class="wp-block-list">
<li><strong>Full Recovery Model: </strong>In this model, the transaction log will not truncate until a log backup occurs.  If log backups are not taken regularly, the log file will grow indefinitely.</li>



<li><strong>Bulk-Logged Recovery Model: </strong>Similar to the full recovery model, it is used for bulk operations. Log growth can still be an issue if backups aren&#8217;t scheduled appropriately.</li>



<li><strong>Simple Recovery Model: </strong>Although SQL Server automatically truncates the log in this recovery model, you must still watch for transactions that are making large changes all at once. For instance, if you update millions of rows in one transaction, this could be enough to cause the log file to grow.</li>
</ul>
</li>



<li><strong>Lack of Log Backups: </strong>Without regular log backups in the full or bulk-logged recovery models, the log cannot truncate, leading to continuous growth.</li>



<li><strong>High Transaction Volume: </strong>A sudden spike in transaction activity can cause the log file to grow rapidly to accommodate the increased volume.</li>



<li><strong>Replication and Availability Groups: </strong>Features like availability groups and replication can delay log truncation until the data is sent to the replicas or replicated databases.  Seeing the log file continue to grow even after taking a log backup?  Check the l<strong>og_reuse_wait_desc </strong>column in <strong>sys.databases</strong>.  It&#8217;ll indicate why.</li>



<li><strong>Open Transactions</strong>: Uncommitted transactions hold on to log space because SQL Server needs the log records to roll backup if necessary. Who hasn&#8217;t started their session with &#8220;begin transaction&#8221; and gone home for the weekend (forgetting the commit)?</li>
</ul>



<h2 class="wp-block-heading" id="h-why-it-matters">Why it Matters</h2>



<p>The impact can be massive, from crashing applications to filling up disk space and affecting all other databases on the same drive.</p>



<ul class="wp-block-list">
<li><strong>Disk Space Consumption: </strong>Uncontrolled log growth can consume all available disk space, leading to application failures and downtime.</li>



<li><strong>Performance Degradation: </strong>Large log files can slow down database operations, including backups and recovery processes, affecting overall system performance.</li>



<li><strong>Recovery Time Objectives (RTOs): </strong>In disaster recovery scenarios, large transaction logs can increase the time it takes to restore databases, impacting business continuity.</li>



<li><strong>Maintenance Challenges: </strong>Managing and maintaining oversized log files can be cumbersome, requiring more time for routine operations like backups.</li>



<li><strong>Risk</strong> <strong>of Data Loss: </strong>If the disk runs out of space due to log growth, new transactions cannot be logged, leading to potential data loss or corruption. </li>
</ul>



<h2 class="wp-block-heading" id="h-how-to-monitor-it-using-sp-whoisactive">How to monitor it using sp_WhoIsActive</h2>



<p>sp_whoisactive is a powerful stored procedure developed by Adam Machanic that provides a comprehensive view of the current activity on your SQL Server.  It can be used to monitor transaction log growth.</p>



<p>Here&#8217;s how you can use it:</p>



<h3 class="wp-block-heading" id="h-installation">Installation</h3>



<p>First, download the script from <a href="https://github.com/amachanic/sp_whoisactive">https://github.com/amachanic/sp_whoisactive</a> and run it on your instance. I usually place it in a database named DBA vs. master.</p>



<h3 class="wp-block-heading" id="h-monitoring-active-sessions"><strong>Monitoring Active Sessions</strong></h3>



<p>Run the procedure to see all active sessions:</p>



<pre class="wp-block-code"><code>USE DBA
GO
EXEC sp_whoisactive</code></pre>



<h3 class="wp-block-heading" id="h-identifying-long-running-transactions"><strong>Identifying Long-Running Transactions</strong></h3>



<p>To focus on transactions that might be causing log growth, look for sessions with high values in the <em>tran_log_writes<strong> </strong></em>column, which shows the number of log records written by the session. You&#8217;ll need to set the @get_transaction_info to 1 to include transaction details.</p>



<pre class="wp-block-code"><code>EXEC sp_whoisactive @get_transaction_info = 1

</code></pre>



<p>This will add columns related to transaction duration and log usage.</p>



<h3 class="wp-block-heading" id="h-ordering-by-log-writes"><strong>Ordering by log writes</strong></h3>



<p>If you&#8217;re interested in sessions consuming the most log space, order the results accordingly:</p>



<pre class="wp-block-code"><code>EXEC sp_whoisactive @get_transaction_info = 1, @sort_order = '&#91;tran_log_writes] DESC'
</code></pre>



<h3 class="wp-block-heading" id="h-automating-monitoring"><strong>Automating Monitoring</strong></h3>



<p>Schedule sp_whoisactive to run at regular intervals and log the output to a table for historical analysis or to send an alert if certain thresholds are met.  This can help you identify patterns over time (i.e., Mike usually starts a new session every Friday evening and leaves for the weekend.). The following code will create a table, <em>dbo.WhoIsActiveLog<strong>, </strong></em>with the appropriate schema.  The second statement will then execute sp_whoisactve and store the results within this table.</p>



<pre class="wp-block-code"><code>--create the dbo.WhoIsActiveLog table<br>DECLARE @schemaDefinition VARCHAR(MAX)<br>EXEC sp_WhoIsActive <br>    @find_block_leaders = 1, <br>	@get_transaction_info = 1,<br>	@get_locks = 1,<br>	@return_schema = 1,<br>	@schema = @schemaDefinition OUTPUT<br><br>SELECT @schemaDefinition =  REPLACE(@schemaDefinition,'&lt;table_name&gt;','dbo.WhoIsActiveLog')<br>EXEC (@schemaDefinition)<br>GO<br>EXEC sp_WhoIsActive <br>    @find_block_leaders = 1, <br>	@get_transaction_info = 1,<br>	@get_locks = 1,<br>	@destination_table = 'dbo.WhoIsActiveLog'<br><br></code></pre>



<p>Once you identify sessions causing excessive log growth, you can investigate the underlying queries or processes:</p>



<ul class="wp-block-list">
<li><strong>Optimize Queries: </strong>Rewrite inefficient queries to reduce transaction time.</li>



<li><strong>Adjust Recovery Models: </strong>If appropriate, and point-in-time recovery isn&#8217;t required, consider switching to the simple recovery model.  However, this won&#8217;t help if it&#8217;s a long running transaction making many changes simultaneously.</li>



<li><strong>Schedule Regular Backups: </strong>Ensure that log backups are taken frequently to prevent log file bloat.</li>



<li><strong>Kill Problematic Sessions: </strong>As a last resort, terminate sessions that are causing issues, but be cautious of potential data loss.</li>
</ul>



<h2 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h2>



<p>Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a>&nbsp;with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/prevent-sql-server-outages-by-monitoring-transaction-log-growth/">Prevent SQL Server Outages by Monitoring Transaction Log Growth</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6725</post-id>	</item>
		<item>
		<title>Basic Availability Groups: Affordable High Availability with Key Limitations</title>
		<link>https://theserogroup.com/sql-server/basic-availability-groups-affordable-high-availability-with-key-limitations/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Thu, 19 Sep 2024 19:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[Public Speaking]]></category>
		<category><![CDATA[Script Library]]></category>
		<category><![CDATA[Sero]]></category>
		<category><![CDATA[Sero Group]]></category>
		<category><![CDATA[Serogroup]]></category>
		<category><![CDATA[Shared Disks]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Assessment]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Events]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6532</guid>

					<description><![CDATA[<p>In SQL Server 2022, Basic Availability Groups provide a limited, cost-effective solution for high availability and disaster recovery in the Standard Edition. However, they have several limitations when compared to a standard Availability Group in the Enterprise Edition. Although Basic AGs were introduced before SQL Server 2022, we&#8217;ll focus strictly on the latest version. Let&#8217;s&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/basic-availability-groups-affordable-high-availability-with-key-limitations/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/basic-availability-groups-affordable-high-availability-with-key-limitations/">Basic Availability Groups: Affordable High Availability with Key Limitations</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In SQL Server 2022, Basic Availability Groups provide a limited, cost-effective solution for high availability and disaster recovery in the Standard Edition. However, they have several limitations when compared to a standard Availability Group in the Enterprise Edition.</p>



<p>Although Basic AGs were introduced before SQL Server 2022, we&#8217;ll focus strictly on the latest version.</p>



<p>Let&#8217;s review the requirements and limitations.</p>



<h2 class="wp-block-heading" id="h-requirements-and-limitations">Requirements and Limitations</h2>



<h3 class="wp-block-heading" id="h-sql-server-edition-and-version"><strong>SQL Server Edition and Version</strong>:</h3>



<ul class="wp-block-list">
<li>Standard Edition: Both the primary and secondary replicas must be running SQL Server 2022 Standard Edition. Basic Availability Groups are unavailable in the Express, Web, or Enterprise editions.</li>



<li>Same Version: Ideally, all replicas should be running the same build of SQL Server 2022.</li>
</ul>



<p>Verify the version by running <em>SELECT @@VERSION</em>. In the screenshot below, you can see which update has been applied and the SQL Server version and edition.</p>



<figure class="wp-block-image size-large is-resized"><a href="https://theserogroup.com/wp-content/uploads/2024/09/image.png"><img loading="lazy" decoding="async" width="1024" height="157" src="https://theserogroup.com/wp-content/uploads/2024/09/image-1024x157.png" alt="" class="wp-image-6534" style="width:841px;height:auto" srcset="https://theserogroup.com/wp-content/uploads/2024/09/image-1024x157.png 1024w, https://theserogroup.com/wp-content/uploads/2024/09/image-300x46.png 300w, https://theserogroup.com/wp-content/uploads/2024/09/image-768x118.png 768w, https://theserogroup.com/wp-content/uploads/2024/09/image-1536x236.png 1536w, https://theserogroup.com/wp-content/uploads/2024/09/image-2048x315.png 2048w, https://theserogroup.com/wp-content/uploads/2024/09/image-1920x295.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading" id="h-windows-server-failover-clustering-wsfc"><strong>Windows Server Failover Clustering (WSFC):</strong></h3>



<ul class="wp-block-list">
<li>Cluster Configuration: A Windows Server Failover Cluster must be configured. All nodes participating in the Basic Availability Group must be members of the same WSFC.</li>



<li>Operating System: The servers must be running a Windows Server version that supports failover clustering (e.g., Windows Server 2019 or 2022 recommended).</li>



<li>Domain Membership: All nodes must be members of the same Active Directory domain or trusted domains.</li>
</ul>



<p>In our example, we have a two-node WSFC cluster using Windows Server 2022 Standard Edition.</p>



<figure class="wp-block-image size-large"><a href="https://theserogroup.com/wp-content/uploads/2024/09/image-1.png"><img loading="lazy" decoding="async" width="1024" height="262" src="https://theserogroup.com/wp-content/uploads/2024/09/image-1-1024x262.png" alt="" class="wp-image-6536" srcset="https://theserogroup.com/wp-content/uploads/2024/09/image-1-1024x262.png 1024w, https://theserogroup.com/wp-content/uploads/2024/09/image-1-300x77.png 300w, https://theserogroup.com/wp-content/uploads/2024/09/image-1-768x197.png 768w, https://theserogroup.com/wp-content/uploads/2024/09/image-1.png 1414w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading" id="h-network-requirements"><strong>Network Requirements:</strong></h3>



<ul class="wp-block-list">
<li>Connectivity: Reliable network connections between the replicas are essential.</li>



<li>Name Resolution: A proper DNS setup for name resolution between nodes is preferred.</li>



<li>Static IPs: It&#8217;s highly recommended all replicas utilize static IP addresses vs. DHCP-assigned IPs.</li>
</ul>



<h3 class="wp-block-heading" id="h-database-requirements"><strong>Database Requirements:</strong></h3>



<ul class="wp-block-list">
<li>Full Recovery Model: The database to be included in the Basic Availability Group must use the Full recovery model.</li>



<li>Single Database Support: Basic Availability Groups support only one user database per group.</li>



<li>Initialization: The database must be initialized on the secondary replica using a full backup and transaction log backups. Automatic seeding can be used as well.</li>
</ul>



<h3 class="wp-block-heading" id="h-replica-limitations"><strong>Replica Limitations:</strong></h3>



<ul class="wp-block-list">
<li>Number of Replicas: Only two replicas are supported. One primary and one secondary.</li>



<li>Secondary Replica Limitations
<ul class="wp-block-list">
<li>Non-Readable: The secondary replica is not accessible for read operations.</li>



<li>No backups: You cannot perform backups on the secondary replica.</li>



<li>Synchronous Commit: To support automatic failover, Availability Mode must be set to synchronous commit. This is also a requirement for standard Availability Groups.</li>
</ul>
</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://theserogroup.com/wp-content/uploads/2024/09/image-2.png"><img loading="lazy" decoding="async" width="1024" height="958" src="https://theserogroup.com/wp-content/uploads/2024/09/image-2-1024x958.png" alt="" class="wp-image-6537" srcset="https://theserogroup.com/wp-content/uploads/2024/09/image-2-1024x958.png 1024w, https://theserogroup.com/wp-content/uploads/2024/09/image-2-300x281.png 300w, https://theserogroup.com/wp-content/uploads/2024/09/image-2-768x719.png 768w, https://theserogroup.com/wp-content/uploads/2024/09/image-2-1154x1080.png 1154w, https://theserogroup.com/wp-content/uploads/2024/09/image-2.png 1402w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading" id="h-licensing"><strong>Licensing:</strong></h3>



<ul class="wp-block-list">
<li>Proper Licensing: Ensure that all SQL Server instances are properly licensed under Microsoft&#8217;s licensing terms for high-availability setups. See Microsoft&#8217;s licensing documentation for full details (<a href="https://www.microsoft.com/en-us/sql-server/sql-server-2022-pricing?msockid=3982f2b2d9326c420161e11ed8526d16">SQL Server 2022—Pricing | Microsoft</a>).</li>
</ul>



<h3 class="wp-block-heading" id="h-permissions-and-roles"><strong>Permissions and Roles:</strong></h3>



<ul class="wp-block-list">
<li>Service Accounts: To reduce complexity, it&#8217;s recommended to use the same SQL Server service account on both replicas. Consider using group managed service accounts for further simplification.</li>



<li>Firewall Settings: Configure Windows Firewall to allow communication between the replicas on the required ports (default is TCP port 5022).</li>
</ul>



<h3 class="wp-block-heading" id="h-endpoint-configuration"><strong>Endpoint Configuration:</strong></h3>



<ul class="wp-block-list">
<li>Database Mirroring Endpoint: This must be configured on each replica for data synchronization. If using the wizard in SSMS, the endpoint is created and configured.</li>
</ul>



<h3 class="wp-block-heading" id="h-quorum-configuration"><strong>Quorum Configuration:</strong></h3>



<ul class="wp-block-list">
<li>Proper quorum configuration is essential to maintain cluster health and support automatic failover.  This is done within the WSFC.</li>
</ul>



<h2 class="wp-block-heading" id="h-summary-of-limitations">Summary of Limitations</h2>



<ul class="wp-block-list">
<li>Single Database Limitation: Only one database can be included in a Basic Availability Group.</li>



<li>Limited to Two Replicas: Only one primary and one secondary replica are allowed.</li>



<li>No Read-Scale Capabilities: Unlike Availability Groups in Enterprise Edition, Basic Availability Groups do not support readable secondary replicas.</li>



<li>No Backup Offloading: Backups cannot be performed on the secondary replica.</li>
</ul>



<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p>Basic Availability Groups can fill the gap if your environment doesn&#8217;t support a WSFC with the shared disk. However, due to their limitation of supporting only one database, ongoing management of multiple Basic AGs may not be ideal. For example, I&#8217;d still use a failover clustered instance if any of the following were true:</p>



<ul class="wp-block-list">
<li>SQL Server Standard Edition is used.</li>



<li>Not spanning multiple data centers.</li>



<li>The environment allows for the use of shared disks between machines.</li>
</ul>



<h2 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h2>



<p>Want to learn more about how The SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a>&nbsp;with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/basic-availability-groups-affordable-high-availability-with-key-limitations/">Basic Availability Groups: Affordable High Availability with Key Limitations</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6532</post-id>	</item>
		<item>
		<title>Streamline SQL Server Management with Contained Availability Groups</title>
		<link>https://theserogroup.com/sql-server/streamline-failovers-with-contained-availability-groups/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 14 Aug 2024 12:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[Public Speaking]]></category>
		<category><![CDATA[Script Library]]></category>
		<category><![CDATA[Sero]]></category>
		<category><![CDATA[Serogroup]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Events]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6449</guid>

					<description><![CDATA[<p>SQL Server Availability Groups can present challenges after a failover, such as missing logins, outdated passwords, or absent SQL Server Agent jobs. Some clients address these issues by requiring the primary replica to remain on the same instance. If a failover occurs due to an outage or patching, they generally request to revert the AG&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/streamline-failovers-with-contained-availability-groups/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/streamline-failovers-with-contained-availability-groups/">Streamline SQL Server Management with Contained Availability Groups</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>SQL Server Availability Groups can present challenges after a failover, such as missing logins, outdated passwords, or absent SQL Server Agent jobs. Some clients address these issues by requiring the primary replica to remain on the same instance. If a failover occurs due to an outage or patching, they generally request to revert the AG back to the original primary replica, where all the scheduled jobs and logins are located. Microsoft introduced Contained Availability Groups with the release of SQL Server 2022 Enterprise Edition to help alleviate some of these problems.</p>



<h2 class="wp-block-heading" id="h-what-are-contained-availability-groups">What are contained Availability Groups?</h2>



<p>Contained AGs enhance the traditional Availability Groups (AGs) introduced in SQL Server 2012. CAGs include user databases and the associated server objects, such as logins, permissions, and SQL Server Agent jobs. Contained AGs automatically sync these objects across replicas. This saves the DBA from having to manually make these changes.</p>



<h2 class="wp-block-heading" id="h-key-benefits-of-contained-ags">Key benefits of contained AGs</h2>



<p><strong>Ease of Management:</strong> Contained AGs bundle both databases and associated instance-level objects, simplifying management. This especially simplifies managing complex environments in which an application depends on resources outside of the database replica. Before CAGs, the synchronization of these objects required home-grown solutions using T-SQL and/or PowerShell.</p>



<p><strong>Seamless Failover: </strong>With traditional AGs, failover could sometimes result in missing instance-level objects, leading to broken applications. CAGs ensure that all necessary objects are included within the group, providing a seamless failover experience.</p>



<h2 class="wp-block-heading" id="h-getting-started">Getting started</h2>



<p>To get started, you&#8217;ll need:</p>



<ul class="wp-block-list">
<li>A Windows Server Failover Cluster (preferably Windows Server 2022) with at least two nodes.</li>



<li>SQL Server 2022 Enterprise Edition. Developer Edition works for testing purposes.</li>
</ul>



<p>Additionally, the following resources can be used as a guide for building your contained AG:</p>



<ul class="wp-block-list">
<li><a href="https://www.mssqltips.com/sqlservertip/7523/sql-server-contained-availability-groups-configuration/">SQL Server Contained Availability Groups Configuration (mssqltips.com)</a></li>



<li><a href="https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/contained-availability-groups-overview?view=sql-server-ver16">What is a contained availability group? &#8211; SQL Server Always On | Microsoft Learn</a></li>
</ul>



<h2 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h2>



<p>Learn how The SERO Group can simplify SQL Server management for your organization. <a href="https://theserogroup.com/contact-us/" target="_blank" rel="noreferrer noopener">Schedule a no-obligation discovery call</a> with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/streamline-failovers-with-contained-availability-groups/">Streamline SQL Server Management with Contained Availability Groups</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6449</post-id>	</item>
		<item>
		<title>Building an Availability Group? Involve Key Players First.</title>
		<link>https://theserogroup.com/sql-server/building-an-availability-group-involve-key-players-first/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 10 Jul 2024 12:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6167</guid>

					<description><![CDATA[<p>So, you&#8217;ve decided your organization&#8217;s data needs to remain highly available. Given the options in SQL Server, you&#8217;ve decided an Availability Group makes the most sense for your scenario. What&#8217;s next? Involve Stakeholders Early in the Process of Building a SQL Server Availability Group Before jumping into building your Availability Group, it&#8217;s crucial to identify&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/building-an-availability-group-involve-key-players-first/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/building-an-availability-group-involve-key-players-first/">Building an Availability Group? Involve Key Players First.</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>So, you&#8217;ve decided your organization&#8217;s data needs to remain highly available. Given the options in SQL Server, you&#8217;ve decided an Availability Group makes the most sense for your scenario. What&#8217;s next?</p>



<h2 class="wp-block-heading" id="h-involve-stakeholders-early-in-the-process-of-building-a-sql-server-availability-group">Involve Stakeholders Early in the Process of Building a SQL Server Availability Group</h2>



<p>Before jumping into building your Availability Group, it&#8217;s crucial to identify key players in this process.  Understanding these stakeholders&#8217; roles and responsibilities will help you to plan, execute, and maintain the AG.</p>



<h2 class="wp-block-heading" id="h-build-your-team-key-roles-in-sql-server-availability-group-setup">Build Your Team: Key Roles in SQL Server Availability Group Setup</h2>



<p>Here&#8217;s a list of common roles in this process. Your specific list will depend on your organization&#8217;s structure.</p>



<h3 class="wp-block-heading" id="h-database-administrator-dba">Database Administrator (DBA)</h3>



<p>The DBA is the primary player in setting up and managing the SQL Server AG. They&#8217;re usually responsible for:</p>



<ul class="wp-block-list">
<li>Designing the AG architecture.</li>



<li>Regularly testing failover scenarios.</li>



<li>Configuring and maintaining the AG.</li>



<li>Ensuring data consistency and availability.</li>



<li>Implementing backup and restore strategies.</li>



<li>Monitoring performance and troubleshooting issues.</li>



<li>Monitoring synchronization latency between all replicas.</li>



<li>Planning the AG setup, including replicas, failover modes, and quorum configurations.</li>



<li>Assessing the current database environment (including the recovery models of each database to be added to the AG).</li>
</ul>



<h3 class="wp-block-heading" id="h-network-administrator">Network Administrator</h3>



<p>The Network Administrator ensures that the network infrastructure supports the high availability and redundancy required for the SQL Server AG.  Common responsibilities include:</p>



<ul class="wp-block-list">
<li>Configuring and managing network components.  </li>



<li>Making sure network redundancy is built-in to the solution (replicas having multiple NICs connected to different network switches).</li>



<li>Ensuring low-latency and high-bandwidth connections between replicas.</li>



<li>Setting up network security measures, such as firewalls and VLANs.</li>



<li>Monitoring network performance and troubleshooting connectivity issues.</li>



<li>Static IP assignment for each replica, AG listener, and Cluster Network Object (CNO).</li>
</ul>



<h3 class="wp-block-heading" id="h-system-administrator">System Administrator</h3>



<p>System Administrators manage the underlying servers and operating systems that host the SQL Server instances involved in the AG.  Responsibilities include:</p>



<ul class="wp-block-list">
<li>Preparing and configuring the Windows Server environment (virtual or physical).</li>



<li>Installing necessary software and updates.</li>



<li>Ensuring proper server performance and resource allocation.</li>



<li>Implementing security policies and hardening the server configurations.</li>



<li>Building the Windows Server Failover Cluster.</li>



<li>Partitioning and formatting disks according to the correct specifications (can vary depending on the storage vendor).</li>
</ul>



<h3 class="wp-block-heading" id="h-storage-administrator">Storage Administrator</h3>



<p>Storage administrators manage the storage infrastructure that the SQL Server instances rely on.  Ensuring that each disk(s) presented to the instances are:</p>



<ul class="wp-block-list">
<li>Provisioned and configured according to performance and capacity requirements.</li>



<li>Highly available and redundant.</li>



<li>Monitored for storage performance and health.</li>



<li>Implemented in a way that meets the requirements of any established disaster recovery plan.</li>
</ul>



<h3 class="wp-block-heading" id="h-application-developers">Application Developers</h3>



<p>Developers are crucial for ensuring applications are correctly configured to connect to the AG and handle failover scenarios. If the application was created by a vendor, documentation must be reviewed to ensure AG support is available. Their responsibilities include:</p>



<ul class="wp-block-list">
<li>Modifying connection strings to use the AG listener.</li>



<li>Ensuring the application logic can handle failovers without data loss or significant downtime.</li>



<li>Testing application behavior in failover and recovery scenarios.</li>
</ul>



<h3 class="wp-block-heading" id="h-business-stakeholders">Business Stakeholders</h3>



<p>This group defines the availability requirements and success criteria for the SQL Server AG. Their responsibilities include:</p>



<ul class="wp-block-list">
<li>Setting Recovery Time Objectives (RTO) and Recovery Point Objectives (RPO).</li>



<li>Prioritizing databases and applications that require high availability.</li>



<li>Allocating budget and resources for the AG project.</li>



<li>Communicating the business impact and benefits of the AG to the organization.</li>
</ul>



<p>Many AG implementations fail not because of technical limitations, but because expectations were not set.  Ensure expectations for RTO and RPO are over-communicated, documented, and agreed upon by all groups involved.</p>



<h3 class="wp-block-heading" id="h-security-team">Security Team</h3>



<p>This team ensures that the AG implementation complies with organizational security policies and regulatory requirements. It&#8217;s normal for there to be some overlap between the security team and DBA(s). Security&#8217;s responsibilities may include:</p>



<ul class="wp-block-list">
<li>Reviewing and approving security configurations.</li>



<li>Implementing encryption for data in transit and at rest (shared responsibility with the DBA if required).</li>



<li>Monitoring and auditing access to the AG.</li>



<li>Ensuring compliance with industry standards and regulations.</li>
</ul>



<h3 class="wp-block-heading" id="h-project-manager">Project Manager</h3>



<p>The PM coordinates the overall AG implementation project, ensuring that timelines are met and resources are allocated efficiently. They keep everyone on track. Responsibilities include:</p>



<ul class="wp-block-list">
<li>Creating a project plan with clear milestones and deadlines.</li>



<li>Facilitating communication between all stakeholders.</li>



<li>Managing risks and issues that arise during the project.</li>



<li>Ensuring that all deliverables meet quality standards.</li>
</ul>



<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p>These roles may vary across organizations. A specific team may also play multiple roles. However, identifying and involving these key players early in the planning phase of your AG project is critical for success. Each stakeholder brings unique expertise and insights that are vital for building a robust, efficient, and reliable availability group. You can ensure a seamless implementation that meets both technical and business requirements by fostering collaboration and clear communication among all roles.</p>



<h3 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The SERO Group?</h3>



<p>Want to learn more about how SERO Group helps organizations take the guesswork out of managing their SQL Servers? <a href="https://theserogroup.com/meet-with-joe-webb" target="_blank" rel="noreferrer noopener">S</a><a href="https://theserogroup.com/contact-us/#schedule-a-call-1">chedule a no-obligation discovery call</a> with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/building-an-availability-group-involve-key-players-first/">Building an Availability Group? Involve Key Players First.</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6167</post-id>	</item>
		<item>
		<title>Availability Groups: What&#8217;s Right for Your Business?</title>
		<link>https://theserogroup.com/sql-server/availability-groups-whats-right-for-you/</link>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 19 Jun 2024 12:00:00 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[Sero]]></category>
		<category><![CDATA[Sero Group]]></category>
		<category><![CDATA[Serogroup]]></category>
		<category><![CDATA[Shared Disks]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Consultant]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server Consultant]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">https://theserogroup.com/?p=6008</guid>

					<description><![CDATA[<p>I&#8217;ve had several companies inquire about SQL Server&#8217;s built-in high availability options over the years. This conversation usually indicates a need to ensure that their database systems remain operational and accessible with minimal downtime. But why now? They&#8217;ve been in business for years and are just now interested in HA/DR. What changed? Reasons vary, but&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/availability-groups-whats-right-for-you/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/availability-groups-whats-right-for-you/">Availability Groups: What&#8217;s Right for Your Business?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve had several companies inquire about SQL Server&#8217;s built-in high availability options over the years.  This conversation usually indicates a need to ensure that their database systems remain operational and accessible with minimal downtime.  </p>



<p>But why now? They&#8217;ve been in business for years and are just now interested in HA/DR. What changed?</p>



<p>Reasons vary, but the following are very common:</p>



<ul class="wp-block-list">
<li>A new cyber insurance policy requiring a HA/DR or business continuity plan.</li>



<li>A need for HA/DR capability in order to create or develop a new revenue stream.</li>



<li>General curiosity due to SQL Server marketing materials.</li>



<li>A new client or business group who has asked about HA/DR.</li>



<li>Concerns raised during a recent audit.</li>



<li>Recent outage that impacted revenue.</li>
</ul>



<p>SQL Server has several options to choose from when it comes to HA/DR.  These include:</p>



<ul class="wp-block-list">
<li>Log Shipping: No automatic failover capabilities. Available on SQL Server Standard and Enterprise editions.</li>



<li>Database Mirroring: Deprecated, don&#8217;t use it in new environments.</li>



<li><a href="https://theserogroup.com/sql-server/azure-shared-disks-failover-clustered-instances/">Failover Cluster Instances</a>: Available on SQL Server Standard and Enterprise editions.
<ul class="wp-block-list">
<li><a href="https://theserogroup.com/sql-server/whats-the-difference-in-sql-server-fcis-and-ags/">What&#8217;s the Difference in SQL Server FCIs and AGs?</a></li>
</ul>
</li>



<li>Availability Groups</li>
</ul>



<p>Since you&#8217;re here to learn more about availability groups, I&#8217;ll introduce you to the two main types.</p>



<h2 class="wp-block-heading" id="h-availability-groups">Availability Groups</h2>



<p>Availability Groups were introduced in SQL Server 2012 Enterprise Edition. They provide advanced high availability and disaster recovery capabilities.</p>



<ul class="wp-block-list">
<li><strong>Edition Support: </strong>Available in SQL Server 2012 Enterprise Edition and later. FYI: Official support for SQL Server 2012 ended in 2022.</li>



<li><strong>Number of Replicas: </strong>SQL Server 2022 specs &#8211; One primary and up to 8 secondary replicas (under <a href="https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-always-on-availability-groups?view=sql-server-ver16#SupportedAvModes">asynchronous-commit mode or up to 5 can run under synchronous-commit mode</a>).</li>



<li><strong>Supports readable secondaries: </strong>Yes</li>



<li><strong>Failover: </strong>Supports automatic failover for synchronous-commit replicas and manual failover for asynchronous-commit replicas.</li>



<li><strong>Use Cases: </strong>
<ul class="wp-block-list">
<li>Ideal for mission-critical applications requiring high availability and disaster recovery across multiple databases.  </li>



<li>Suitable for enterprises needing advanced features like read-only secondary replicas for offloading read workloads.</li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading" id="h-requirements">Requirements:</h3>



<ul class="wp-block-list">
<li>Same OS version on all nodes.</li>



<li>Proper network infrastructure to support data replication with minimal latency.</li>



<li>Windows Server Failover Clustering (WSFC).  There are some exceptions to this that I&#8217;ll cover in a later post.</li>



<li>SQL Server 2019 Enterprise Edition or later. Available with earlier versions, but those are out of mainstream support. I wouldn&#8217;t want you building a new AG on unsupported versions. In fact, that would almost certainly raise flags in other areas of your cyber insurance policy.</li>
</ul>



<h2 class="wp-block-heading" id="h-basic-availability-groups">Basic Availability Groups</h2>



<p>Up until SQL Server 2016, AGs were only available in Enterprise Edition. However, in 2016, Microsoft introduced us to Basic Availability Groups. Basic AGs provide an introduction to high availability and disaster recovery solutions for a single database.</p>



<ul class="wp-block-list">
<li><strong>Edition Support: </strong>Available in SQL Server 2016 Standard Edition and later.</li>



<li><strong>Number of Replicas: </strong>Supports two replicas (one primary and one secondary).</li>



<li><strong>Supports readable secondaries: </strong>No.  See the limitations <a href="https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/basic-availability-groups-always-on-availability-groups?view=sql-server-ver16#limitations">here</a>.</li>



<li><strong>Failover: </strong>Supports automatic failover, but only in a single-database environment.</li>



<li><strong>Use Cases: </strong>
<ul class="wp-block-list">
<li>Ideal for small businesses or environments where budget constraints prevent the use of Enterprise Edition.  </li>



<li>Suitable for applications that require minimal HA/DR capabilities.  </li>
</ul>
</li>
</ul>



<h3 class="wp-block-heading" id="h-requirements-0">Requirements:</h3>



<ul class="wp-block-list">
<li>Same OS version on both nodes.</li>



<li>SQL Server 2016 Standard Edition or later.</li>



<li>Windows Server Failover Clustering (WSFC)</li>



<li>Proper network infrastructure to support data replication with minimal latency.</li>
</ul>



<h2 class="wp-block-heading" id="h-which-should-you-choose">Which should you choose?</h2>



<p>Getting AGs right takes practice. When done wrong, performance and availability can both suffer. Budgets can be destroyed by licenses. Understanding your options, including their requirements and differences, can help you choose the right solution for your environment. Whether you&#8217;re driven by audits, insurance policies, or those uncomfortable &#8220;could not open a connection to SQL Server&#8221; errors, investing in HA/DR solutions is crucial for maintaining business continuity and minimizing downtime.</p>



<p>So, which would I choose? If I had the option to use shared storage, I&#8217;d opt for building a failover clustered instance instead of using a Basic AG. FCIs support failover of multiple databases and can be used with Standard Edition. However, if shared storage isn&#8217;t an option and you need automatic failover capabilities for a single database or if you&#8217;re working in a hybrid environment (Azure and on-premises), Basic AGs may be a good choice for you.</p>



<p>Have questions about HA/DR? Here are two ways we can help.</p>



<ol class="wp-block-list">
<li><a href="https://theserogroup.com/#contact">Schedule a call with us</a> to connect with our consultants. We&#8217;ve helped numerous clients just like you meet their uptime objectives.</li>



<li>Consider <a href="https://theserogroup.com/seroshield/">SEROShield</a>, our DBA team as a service. Not only will we help build the AG, but we&#8217;ll also support it. It&#8217;ll be like driving around in a new car (you know, the one with the new car smell) that you know is covered by the best possible insurance.</li>
</ol>



<h2 class="wp-block-heading" id="h-next-in-this-series">Next in this series</h2>



<p>There are a few lesser-known availability group types that we didn&#8217;t discuss today but will in upcoming posts: Contained AGs, Distributed AGs, and Domain-independent AGs.</p>



<p><a href="https://www.linkedin.com/company/the-sero-group">Follow us on LinkedIn</a> to get notified when we release new blog posts. </p>
<p>The post <a href="https://theserogroup.com/sql-server/availability-groups-whats-right-for-you/">Availability Groups: What&#8217;s Right for Your Business?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6008</post-id>	</item>
	</channel>
</rss>
