Microsoft SQL Server Enterprise 2-core compliance (System)¶
OctoSAM system query
This query is an integral part of the OctoSAM application. OctoSAM starts the query to display tabular data within the application. The query can only be started from within the intended application system context.
SQL Server Enterprise 2-Core compliance
Metric scope and calculation logic
This query calculates license requirements for SQL Server Enterprise using 2-core license packs for Windows machines that have the corresponding Software Item assigned.
Since SQL Server 2012, Enterprise is licensed exclusively per core; the Server+CAL model was discontinued for the Enterprise edition with that release. The per-core rules and the 2-core license pack structure apply to SQL Server 2012 and all subsequent versions, and are uniform across Microsoft's acquisition programs (Volume Licensing with or without SA, Microsoft Customer Agreement / CSP perpetual and subscription, and SPLA). Only the commercial mechanics differ per program; see the "Software Assurance and SoftwareItem naming" admonition below for details.
The query automatically detects the licensing scenario for every assigned machine and applies the corresponding Microsoft rule:
-
Host (unlimited virtualization): machines flagged as VirtualizationHost AND running a Server operating system (OperatingSystemServer = 1) are treated as hypervisor hosts licensed at the physical layer. Licensing core count = MAX(NumberOfCores, NumberOfProcessors * 4, 4). Under Enterprise with active Software Assurance, a subscription license, or SPLA, this covers an unlimited number of virtual machines on that host. Client-OS hypervisors (for example Windows 10 or 11 with the Hyper-V role enabled for WSL2, Docker Desktop, or dev VMs) are NOT treated as host mode; they fall through to physical or VM licensing. This matches Microsoft licensing intent - the unlimited virtualization benefit is a Server-OS-hypervisor privilege.
-
Virtual machine: machines flagged as VirtualMachine are licensed per allocated virtual core, minimum 4 virtual cores per VM. The Enterprise core calculation is identical to the Standard rule; only the assigned Software Item and its cost differ.
-
Physical server: neither host nor VM. Licensing core count follows the bare-metal rule MAX(NumberOfCores, NumberOfProcessors * 4, 4).
Required 2-core licenses per machine = CEILING(licensing cores / 2). The LicensingScenario column documents which rule was applied. For host-mode rows, SqlGuestVmsOnHost reports the number of guest VMs on that host with a scanned SQL Server signature.
Excluded scenarios and limitations
This query assumes that SQL Server instances are inventoried using the Octo_SqlServerInstance WMI class in the OctoSAM Inventory agent. It also assumes that the SoftwareItem for SQL Server Enterprise is properly configured with the correct costs and units. Please review the query and adjust as necessary for your specific environment and inventory data.
The host-mode calculation is scoped to the current host reported at scan time. When guest VMs migrate between hosts (for example via vMotion or Live Migration), each destination host must also be licensed. The query does not currently expand licensing to all cluster member hosts; the MachineCluster and VirtualMachineMobilityHistory tables can be used for supplementary reporting on migration exposure.
The query does not implement sub-capacity licensing scenarios where only a subset of a host's physical cores is dedicated to SQL Server. All physical cores of an assigned host are included in the license calculation.
Hyperthreading does not reduce the core count. The calculation uses NumberOfCores (physical cores) rather than NumberOfLogicalProcessors, in line with Microsoft's per-core licensing rules.
Double-assignment risk
The query flags cases where the same SoftwareItem is assigned to both a hypervisor host and one or more of its guest VMs. Under host-mode licensing (SA-covered, subscription, or SPLA Enterprise), the host license already covers unlimited virtualization on that host - any additional assignment to a guest represents likely over-licensing.
Detection is limited to the SAME SoftwareItemID. Assignments across different SoftwareItems (for example "(with SA)" on the host and "(without SA)" on the guest) are not correlated by this query, because they may represent legitimate licensing choices under different acquisition programs.
Result columns: - DoubleAssignmentRisk (0/1) flags every affected row. - DoubleAssignmentDetails names the counterpart machine(s).
Rows with DoubleAssignmentRisk = 1 should be reviewed by the SAM team to remove redundant assignments and reclaim the corresponding license consumption.
Software Assurance and SoftwareItem naming
The compliance behaviour depends on the acquisition program and, within Volume Licensing, on the Software Assurance (SA) status of the assigned license - contractual attributes that are not present in the OctoSAM inventory. This information must therefore be reflected in the naming and cost structure of the SoftwareItem.
Recommended naming convention (German / English suffix): - SQL Server Enterprise 2-Core Pack (mit SA) / (with SA) Volume Licensing with active Software Assurance. Host, VM, or physical assignment. - SQL Server Enterprise 2-Core Pack (ohne SA) / (without SA) Volume Licensing or CSP perpetual without SA. VM or physical only; must NOT be assigned to a host. - SQL Server Enterprise 2-Core Pack (Subscription) / (subscription) CSP subscription or Enterprise subscription under a Commercial Agreement; SA-equivalent rights included by default. Host, VM, or physical assignment. - SQL Server Enterprise 2-Core Pack (SPLA) Services Provider License Agreement; reported monthly by the hoster under Services Provider Use Rights (SPUR). Host, VM, or physical assignment; hoster is customer-of-record.
Compliance implications: - Unlimited virtualization (host mode) is only available with SA-covered Enterprise licenses, Enterprise subscription licenses, or Enterprise SPLA where the hoster fully licenses the physical host. Assigning a "(ohne SA)" / "(without SA)" SoftwareItem to a hypervisor host is a documented compliance violation, even if the query produces a numerical result. - License Mobility (reassignment more often than every 90 days) requires SA or subscription rights for both Enterprise and Standard under Volume Licensing / CSP perpetual. Without SA, a SQL Server license is technically bound to a specific physical server and may only move every 90 days. In clustered environments with vMotion or Live Migration this makes per-VM licensing without SA effectively non-compliant. - Subscription licenses (CSP subscription, Enterprise subscription under Commercial Agreement) include SA-equivalent rights by default. Since 1 April 2026, CSP subscription licenses under MCA automatically include License Mobility rights. - SPLA applies to service providers hosting SQL Server for their customers. Calculation and 2-core-pack structure are identical, but commercial mechanics differ: monthly reporting under SPUR, hoster is customer-of-record, and license reassignment between server farms is restricted to different calendar months (rather than the 90-day rule).
The choice of suffix is not enforced by the query - it is a naming discipline. A supplementary query can be built to detect inconsistent assignments (for example, "(ohne SA)" / "(without SA)" SoftwareItems assigned to machines with VirtualizationHost = 1).
Fields¶
| Name | Type | Visible | Description |
|---|---|---|---|
| Software Item ID | numeric | false | OctoSAM internal ID of this SoftwareItem entity |
| Software Item Guid | guid | false | OctoSAM internal Guid of this SoftwareItem entity |
| Software Item | string | false | Name of the software item |
| Units | numeric | false | |
| Initial Cost | numeric | false | |
| Recurring Cost | numeric | false | |
| Organization ID | numeric | false | Internal ID that references the Organization entity (Foreign Key) |
| Organization Guid | guid | false | Internal unique identifier for this organization that can be used for links from external systems |
| Organization | string | true | Name of the organization |
| Organization Description | string | false | Description |
| Environment ID | numeric | false | Internal ID that references the Environment entity (Foreign Key) |
| Environment | string | false | Name of the Environment |
| Organization Custom Field1 | string | false | Available for custom data, not used by OctoSAM Inventory |
| Organization Custom Field2 | string | false | Available for custom data, not used by OctoSAM Inventory |
| Organization Custom Field3 | string | false | Available for custom data, not used by OctoSAM Inventory |
| Organization Custom Field4 | string | false | Available for custom data, not used by OctoSAM Inventory |
| Object State ID | numeric | false | Internal ID that references the ObjectState entity (Foreign Key) |
| Object State | string | false | Object state name |
| Object State Octopus Id | string | false | OctoSAM internal name for programmatic access to the object state (e.g. in queries) |
| Machine Guid | guid | false | A unique ID that can be used to link to this machine object by external applications |
| Machine ID | numeric | false | Internal ID for the Machine entity (Primary Key) |
| Machine Name | string | false | Machine name (computer name) |
| Machine | string | true | Use this name in reports for consistency and to avoid having to build the printable name from its parts |
| Alternate Name | string | false | Contains the computer name for systems that may have different host and computer names, such as macOS |
| Fully Qualified Domain Name | string | false | Fully qualified domain name as seen by the scanner through reverse lookup of the network address |
| Machine Description | string | false | Description attribute of the directory service or manually entered during offline scan |
| Alternate Description | string | false | Alternate description field specific to the scanned machine type. For example locally entered description in macOS. |
| Domain Name | string | false | Windows NETBIOS Domain Name |
| Sid | string | false | Computer SID |
| Last Scan Guid | guid | false | GUID of the last imported .scan file for this entity. |
| First Scan | date | false | Date/Time of first scan of this machine |
| Manufacturer ID | numeric | false | Internal ID that references the Manufacturer entity (Foreign Key) |
| Manufacturer | string | false | Normalized hardware manufacturer name |
| Raw Manufacturer | string | false | Manufacturer of the machine as scanned from the hardware. This is not normalized and may contain different spellings of the same manufacturer. |
| Model | string | true | Model of the Machine |
| Bios Serial Number | string | false | BIOS Serial Number |
| Processor | string | false | Processor Name |
| Processor Speed | numeric | false | Max speed of the processor in MHz |
| Number Of Processors | numeric | false | Number of processors |
| Number Of Cores | numeric | true | Number of cores |
| Number Of Logical Processors | numeric | false | Number of logical processors |
| Oracle Core Factor | object | false | Oracle Core Factor to use for Oracle pricing. Queries should always use this field. |
| Physical Memory | numeric | false | Amount of physical memory (in bytes) in the system |
| Chassis Types | string | false | ChassisTypes in clear text, comma separated |
| Directory Last Logon Last Scan Diff | numeric | false | |
| Custom Field1 | string | false | Available for custom data for this machine, not used by OctoSAM Inventory |
| Custom Field2 | string | false | Available for custom data for this machine, not used by OctoSAM Inventory |
| Custom Field3 | string | false | Available for custom data for this Machine, not used by OctoSAM Inventory |
| Custom Field4 | string | false | Available for custom data for this Machine, not used by OctoSAM Inventory |
| Virtual Machine | bool | true | True if this is a virtual machine |
| Virtualization Host | bool | true | True if this machine hosts virtual machines |
| Last Scan | date | true | Date/Time of the last imported scan for this machine as reported by the machine (may be out of sync) |
| Licensing Scenario | string | true | |
| Consumed Units | numeric | true | |
| Machine Initial Cost | numeric | true | |
| Machine Recurring Cost | numeric | true | |
| Instance Names | string | false | |
| Instances | numeric | false | |
| Sql Guest Vms On Host | numeric | true | |
| Double Assignment Risk | numeric | true | |
| Double Assignment Details | string | true | |
| Current Date Time | date | false | Date and time the query was run. For reference if you use and save query results. |
Query information¶
| Property | Value | Description |
|---|---|---|
| Query Guid | ba0f132c-dcd2-4208-bde5-d7e9ff3ac988 | The internal id of the query. Must be unique |
| SupportsDesktop | true | If true, the query can be started from the OctoSAM Windows GUI |
| SupportsWeb | true | If true, the query can be started from the OctoSAM Web UI |
| LastUpdate | 2026-08-04 13:59:32 | Last change to this document |
| Build | 1.12.5.57 | OctoSAM build that last changed this document |