How can I determine if my environment is PDW (APS) or Azure Synapse Dedicated SQL Pool?

Saish Paradkar 20 Reputation points
2025-08-05T11:36:55.5666667+00:00

I'm working on a script that needs to programmatically detect whether the connected environment is:

  • PDW / Analytics Platform System (on-premise) or
  • Azure Synapse Analytics Dedicated SQL Pool (cloud)

I’ve already tried checking:

  • SERVERPROPERTY('EngineEdition') = 6
  • Edition via SERVERPROPERTY('Edition')

Engine Edition is 6 for both, we can identify by server name but there are migrated instances which are causing issue to identify.
But these return ambiguous results in some environments — especially since the Edition string can vary or change over time.

But would like a clear and supported way (ideally Microsoft-recommended) to distinguish between the two platforms using T-SQL alone.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 35,766 Reputation points Volunteer Moderator
    2025-08-06T19:14:27.9833333+00:00

    Hello Saish !

    Thank you for posting on Microsoft Learn.

    You can use @@VERSION to check for Synapse-specific identifiers

    SELECT @@VERSION AS VersionInfo;
    

    Azure Synapse Dedicated SQL Pool will return something like:

    Microsoft SQL Azure (RTM) - ...

    PDW (APS) returns something closer to:

    Microsoft SQL Server 2016 (SP2) (Analytics Platform System) ...

    You can parse this result with a LIKE condition:

    SELECT 
        CASE 
            WHEN @@VERSION LIKE '%Azure%' THEN 'Azure Synapse Dedicated SQL Pool'
            WHEN @@VERSION LIKE '%Analytics Platform System%' THEN 'PDW / APS'
            ELSE 'Unknown'
        END AS EnvironmentType;
    

    The availability or behavior of certain DMVs may differ. For example:

    SELECT TOP 1 type FROM sys.dm_pdw_nodes;
    

    This DMV exists on both, but in Azure Synapse, the type column usually shows 'COMPUTE', 'CONTROL' so you could do a combination of such checks.

    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.