How to uniquely Identify a SQL Instance for licensing purposes

Robert Davidian 61 Reputation points
2022-11-30T22:54:58.957+00:00

Our company has a software product and would like to include a unique ID for the SQL Instance as part of our licensing validation process (combination of different items, drive id, server ID, etc). We're trying to avoid unsupported master..XP_RegRead to the registry.

There's a dmv called sys.dm_server_registry which returns back SQL related registry including an InstallID GUID in HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL14.SQL2017\CPE

Will this GUID change under any conditions except in the case of a major upgrade of SQL such as SQL 2017 to 2019? We want an ID we can use that won't change.

265799-image.png

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Seeya Xi-MSFT 16,586 Reputation points
    2022-12-01T03:12:24.17+00:00

    Hi @Robert Davidian ,

    The Instance ID is used to identify installation directories and registry keys for your instance of SQL Server. It just so happens that my environment's SQL instance is the 2019 RTM edition. I can do a version upgrade test for you.
    First, I installed the latest cumulative update(CU 18) and there is no change in my installID. I haven't post screenshots as they may involve sensitive information.
    SQL Server 2022 has just been officially released. Next, I downloaded SQL Server 2022.
    265899-image.png
    After installation, installID remains the same installID.
    By the way, I have other machines with the same version of SQL Server instances installed on them. None of the same versions of installID have anything in common. So, as you can see, installID does not change with upgrades. It does not change as long as it is the same instance.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Robert Davidian 61 Reputation points
    2022-12-05T15:10:26.723+00:00

    This is good - Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.