Sql query to know the lincese expiration for servers

chandu neeli 61 Reputation points
2022-09-03T03:31:25.513+00:00

Hi All,

Could you please help me to get a sql query to know whose server licenses are expiring.

In default reports we have that query but we have created a subscription in the excel it is not showing hostnames of the server hyperlink it's generating.

So if anyone have query please share it so i will create a custom query

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,366 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,570 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 102.8K Reputation points
    2022-09-03T22:13:07.673+00:00

    What licenses? If you are talking about licenses for SQL Server, they are not tracked in SQL Server, as that is only a piece of paper. (And as far as I know, they don't expire.)

    If you mean the licenses of something else that is tracked in a license database, you need to give us information about the tables of that database.

    0 comments No comments

  2. chandu neeli 61 Reputation points
    2022-09-04T01:57:24.75+00:00

    It's not sql license windows Server license 2012 and 2016 and 2019 server licenses


  3. Limitless Technology 39,441 Reputation points
    2022-09-06T07:40:51.447+00:00

    Hello there,

    If you are using Microsoft SQL Server’s evaluation edition and need to find its Expiration Date , you can try the below steps.

    -Open and connect to Microsoft SQL Server.
    -Click on new query button on your left hand side.

    Type following command in new query window of Microsoft SQL Server -> Click on execute.

    SELECT
    create_date AS 'SQL Server Install Date',
    DATEADD(DD, 180, create_date) AS 'SQL Server Expiry Date'
    FROM sys.server_principals
    WHERE name = 'NT AUTHORITY\SYSTEM'

    I hope this information helps. If you have any questions please let me know and I will be glad to help you out.

    -------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments