> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Consolidate EC2 SQL Server Below 4 vCPUs

> Stop paying the SQL Server license minimum of 4 vCPUs on EC2 instances that have fewer.

EC2 instances with SQL Server license included are billed for the SQL Server license on at least 4 vCPUs, even when the instance has only 1 or 2. nOps finds on-demand SQL Server instances with fewer than 4 vCPUs and estimates the license cost spent on vCPUs that do not exist.

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | Compute |
| **Service** | Amazon EC2 (SQL Server) |
| **Action** | Modify |
| **Effort** | Medium |
| **Restart needed** | Yes |
| **Can be rolled back** | Yes |
| **Analysis window** | Last 7 days |
| **Source** | nOps |

## Why it matters

Small SQL Server instances are common in test and departmental workloads. Consolidating them, or using an edition with no license charge where allowed, removes a cost that buys nothing.

## How nOps finds it

nOps reads the last 7 days of on-demand EC2 billing for instances running SQL Server Web, Standard or Enterprise with license included, on Windows, Linux or Red Hat. An instance is flagged when it has fewer than 4 vCPUs. The SQL Server share of its price is the difference between its list price and the same instance type without SQL Server. The saving is the instance's on-demand cost times that share times the unused part of the 4-vCPU minimum (for a 2-vCPU instance, half). Hours covered by Reserved Instances or Savings Plans are left out, and so are savings under \$5 a month.

## Before you start

Know which databases run on each instance and the SQL Server edition and features they need.

## How to implement

1. List the SQL Server instances with fewer than 4 vCPUs and the databases on each.
2. Choose one of:
   * Consolidate databases from several small instances onto one instance with at least 4 vCPUs.
   * For development and test, use SQL Server Developer Edition (free, not for production) on an instance without license included.
   * For small databases within its limits, use SQL Server Express, which has no license charge.
3. Move the databases (backup and restore, or log shipping), test the application, then terminate the old instances.
4. Update your AMIs and Terraform or CloudFormation templates so new small instances are not created with license included.

## Risks and considerations

* Consolidating puts several databases on one server, so check CPU, memory and maintenance windows still fit.
* Developer Edition is licensed for development and test only. Express has database size and CPU limits.
* The license-included edition is set by the AMI, so changing it means moving to a new instance.

## FAQs

> [accordion] Why is my 2-vCPU instance charged for 4?
>
> AWS bills license-included SQL Server on a minimum of 4 vCPUs per instance, matching Microsoft's minimum of 4 core licenses.

## Related

* [Downgrade EC2 SQL Server Enterprise to Standard Edition](https://help.nops.io/inform/supported-recommendations/downgrade-ec2-sql-server-enterprise-to-standard-edition)
* [Switch Non-Production RDS SQL Server to Developer Edition](https://help.nops.io/inform/supported-recommendations/switch-non-production-rds-sql-server-to-developer-edition)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.