Optimize SQL Server licensing by using Compute Optimizer
Guidance on how to optimize licenses for SQL Server by using AWS Compute Optimizer.
Overview
AWS Compute Optimizer can recommend licensing optimization opportunities for Microsoft SQL Server workloads on Amazon Elastic Compute Cloud (Amazon EC2). Compute Optimizer can provide automated recommendations to reduce licensing costs. The recommendations from Compute Optimizer are listed next to each of your EC2 instances with Microsoft SQL Server licenses. The information that's provided includes recommended saving opportunities, EC2 instance On-Demand prices, and hourly bring your own license (BYOL) prices. This information can help you decide if you should downgrade your license edition.
Compute Optimizer automatically discovers your SQL Server instances on Amazon EC2 by inferred workload type. To view the licensing recommendations, you can select the SQL Server instances in Compute Optimizer and then authenticate with Amazon CloudWatch Application Insights by using your read-only database credentials. Compute Optimizer analyzes if you are using any SQL Server Enterprise edition features. If no Enterprise edition features are being used, Compute Optimizer recommends that you downgrade to Standard edition to reduce licensing costs.
You can also use Compute Optimizer to make sizing recommendations for your Amazon EC2 instances that run SQL Server workloads. For more information, see Optimize SQL Server sizing by using Compute Optimizer in this guide.
Cost optimization recommendations
The license recommendations in Compute Optimizer can help you evaluate the features you are
using in Microsoft SQL Server and choose the most cost-effective edition for your
workloads. SQL Server Enterprise edition is significantly more expensive than
Standard edition. For more information, see Compare SQL Server editions in this guide and see SQL
Server 2022 pricing
The License details page provides the following information:
-
Use the table to compare your current license settings (such as edition, model, and number of instance cores) with Compute Optimizer recommendations.
-
Use the utilization graphs to review the number of Enterprise edition features that were used during the analysis period.
For more information, see Viewing details of a commercial software license recommendation in the Compute Optimizer documentation.
Configure Compute Optimizer
Compute Optimizer analyzes commercial software licenses by using the
mssql_enterprise_features_used
metric. For more information about
this metric, see Metrics
for commercial software licenses.
-
Make sure that you have the appropriate permissions to opt in to Compute Optimizer. For more information, see the following:
-
Attach the required instance roles and policy for CloudWatch Application Insights. For instructions, see Policies to enable commercial software license recommendations.
-
Enable CloudWatch Application Insights by using your Microsoft SQL Server database credentials. For instructions, see Set up application for monitoring in the CloudWatch documentation.
Note
To generate recommendations for commercial software licenses, at least 30 consecutive hours of CloudWatch metric data is required. For more information, see CloudWatch metric requirements.
-
Use the following SQL query to configure least-privilege access for CloudWatch Application Insights.
GRANT VIEW SERVER STATE TO [LOGIN]; GRANT VIEW ANY DEFINITION TO [LOGIN];
This enables a new service, PrometheusSqlExporterSQL.
-
From the target AWS account or organization management account, opt in to Compute Optimizer. For instructions, see Opting in your account.
Note
After you opt in, findings and optimization recommendations can take up to 24 hours to be generated.
-
In the Compute Optimizer console
, choose Licenses in the navigation pane. -
In the Findings column, search for any instances that have the Insufficient metrics finding. Compute Optimizer returns this finding if it detects that CloudWatch Application Insights isn't enabled or has insufficient permissions. For more information, see Finding reasons. Do the following to resolve these findings:
-
Choose the instance.
-
Add a secret.
-
Confirm the instance role and policy are attached.
-
Choose Enable license recommendations.
-
-
In the Findings column, search for any instances that have the Not optimized finding. Compute Optimizer returns this finding if it detects that your Amazon EC2 infrastructure isn't using any of the Microsoft SQL Server license features that you're paying for. For more information, see Finding reasons. Do the following to resolve these findings:
-
Choose the instance.
-
Compare the current license edition with the recommended edition.
-
Review the current license utilization graph.
-
If you want to downgrade the license, choose Implement recommendation.
-
Review the requirements and follow the instructions to downgrade the license. If you want to automate the process, see Downgrade SQL Server Enterprise edition using AWS Systems Manager Document to reduce cost
(AWS Blog).
-
Additional resources
-
Reduce Microsoft SQL Server licensing costs with AWS Compute Optimizer
(AWS Blog) -
What is AWS Compute Optimizer? (AWS documentation)
-
Viewing commercial software license recommendations (AWS documentation)
-
Downgrade your Microsoft SQL Server edition (AWS documentation)
-
Microsoft SQL Server 2019 Pricing
(Microsoft) -
Microsoft SQL Server 2022 Pricing
(Microsoft)