I have SQL Server installed, but I’m not sure what license was installed. Is there an easy way to find this out?
You can using SSMS SQL Management Studio to find it.
SELECT SERVERPROPERTY('LicenseType') as Licensetype,
SERVERPROPERTY('NumLicenses') as LicenseNumber,
SERVERPROPERTY('productversion') as Productverion,
SERVERPROPERTY ('productlevel')as ProductLevel,
SERVERPROPERTY ('edition') as SQLEdition,@@VERSION as SQLversion
You would get Licensetype and LicenseNumber are unknown, let visit this site to get more information https://docs.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql?view=sql-server-2017.
As you can see, these properties are not preserved or maintained by the SQL Server products. So you can ignore them.
Another way, you can extract SQL Server Licensing information from the SQL Server Error Log, granted it may not be formatted the way you want, but the information is there and can be parsed.
exec sp_readerrorlog @p1 = 0
,@p2 = 1
,@p3 = N'licensing'
Server Microsoft SQL Server 2019 (RTM) – 15.0.2000.5 (X64) | Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)
Server SQL Server detected 1 sockets with 1 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.