I'm working with a client who is using Azure Hybrid Benefit licensing for Windows and SQL on Microsoft Azure. We're trying to ensure that the licenses they've purchased are being used correctly. We've gathered the CPU core counts for all their machines, but we're finding it difficult to differentiate between Windows Standard and Datacenter licenses, as well as SQL Standard and Enterprise licenses for our calculations. I haven't found a straightforward article from Microsoft that details how to accurately calculate the required hybrid licenses in this situation. Has anyone dealt with this before?
2 Answers
For SQL Server, you can check out this script for guidance: [GitHub SQL Server Samples](https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/azure-hybrid-benefit). The basic rules are: 1 core for SQL Server Enterprise Edition equals 1 core for business critical environments or 4 cores for general purpose. For SQL Server Standard Edition, it's 1/4 core for business critical or 1 core for general purpose.
You can also implement an Azure policy that verifies your license usage. This could help keep track of compliance!
Thanks for the tip! Could you share a link or resource that explains how to set up that policy?

Thanks for the script! Can you share where this logic comes from? I’d like to see the official Microsoft documentation backing it up.