This is a historical inventory note. SQL Server 2000 and the Microsoft Data Access Components (MDAC) era are obsolete and unsupported. Do not expose product keys by querying the Windows registry from inside SQL Server.
Inventory a current SQL Server instance
SELECT
SERVERPROPERTY('ServerName') AS server_name,
SERVERPROPERTY('ProductVersion') AS product_version,
SERVERPROPERTY('ProductLevel') AS product_level,
SERVERPROPERTY('Edition') AS edition,
SERVERPROPERTY('ProductUpdateLevel') AS update_level,
SERVERPROPERTY('ProductUpdateReference') AS update_reference;
Use the returned version and edition with Microsoft’s SQL Server build documentation to determine the installed release and servicing level.
Handle licensing separately
A database administrator normally does not need the product key to operate or patch an instance. For an audit or migration, use your organization’s software-asset records, volume-licensing portal, original installation media, or an approved endpoint inventory product. Treat license keys as secrets and do not store them in query output, tickets, or shared scripts.
Drivers and data access
Modern applications should use a currently supported SQL Server driver, such as the Microsoft OLE DB Driver for SQL Server or Microsoft ODBC Driver for SQL Server. Inventory installed drivers through the operating system or endpoint-management tooling, then compare them with the application’s requirements.
Why the old method was removed
The previous example used undocumented registry-reading extended procedures to retrieve a SQL Server 2000 CD key and MDAC version. That approach expanded database privileges into the operating-system registry and could disclose a secret to anyone able to run or capture the query. It is not appropriate for current systems.
If a SQL Server 2000 instance still exists, isolate it, document its dependencies, verify recoverable backups, and prioritize a supported migration plan.

Leave a Reply