Skip to content

Latest commit

 

History

History
129 lines (79 loc) · 6.08 KB

File metadata and controls

129 lines (79 loc) · 6.08 KB
title Connect to Synapse SQL with SQL Server Management Studio
description Use SQL Server Management Studio (SSMS) to connect to and query Synapse SQL in Azure Synapse Analytics.
author azaricstefan
ms.service azure-synapse-analytics
ms.topic overview
ms.subservice sql
ms.date 02/04/2026
ms.author stefanazaric
ms.custom sfi-image-nochange

Connect to Synapse SQL with SQL Server Management Studio

[!div class="op_single_selector"]

You can use SQL Server Management Studio (SSMS) to connect to and query Synapse SQL in Azure Synapse Analytics through either serverless SQL pool or dedicated SQL pool resources.

Note

Supported tools for serverless SQL pool:

Prerequisites

Connect to Synapse SQL

To connect to Synapse SQL using dedicated SQL pool, follow these steps:

  1. Open SQL Server Management Studio (SSMS).

  2. In the Connect to Server dialog box, fill in the fields, and then select Connect:

    :::image type="content" source="../sql-data-warehouse/media/sql-data-warehouse-query-ssms/connect-object-explorer1.png" alt-text="Screenshot that shows the Connect to Server dialog box.":::

    • Server name: Enter the server name previously identified.
    • Authentication: Choose an authentication type, such as SQL Server Authentication or Active Directory Integrated Authentication.
    • Login and Password: Enter your user name and password if SQL Server Authentication was selected.
  3. Expand your Azure SQL Server in Object Explorer. You can view the databases associated with the server, such as the sample AdventureWorksDW database. You can expand the database to see the tables:

    :::image type="content" source="../sql-data-warehouse/media/sql-data-warehouse-query-ssms/explore-tables.png" alt-text="Screenshot that shows the Object Explorer window.":::

To connect to Synapse SQL using serverless SQL pool, follow these steps:

  1. Open SQL Server Management Studio (SSMS).

  2. In the Connect to Server dialog box, fill in the fields, and then select Connect:

    :::image type="content" source="media/get-started-ssms/connect-object-explorer1.png" alt-text="Screenshot that shows the Connect to Server dialog box for serverless SQL pool.":::

    • Server name: Enter the server name previously identified.
    • Authentication: Choose an authentication type, such as SQL Server Authentication or Microsoft Entra Authentication.
    • Login and Password: Enter your user name and password if SQL Server Authentication was selected.
  3. To explore, expand your Azure SQL server. You can view the databases associated with the server. Expand demo to see the content in your sample database.

    :::image type="content" source="media/get-started-ssms/explore-tables.png" alt-text="Screenshot that shows the Object Explorer window for serverless SQL pool.":::


Run a sample query

After you establish a database connection, you can query the data.

  1. Right-click your database in SQL Server Object Explorer.

  2. Select New Query. A new query window opens.

    :::image type="content" source="../sql-data-warehouse/media/sql-data-warehouse-query-ssms/new-query.png" alt-text="Screenshot of the New Query window.":::

  3. Copy the following Transact-SQL (T-SQL) query into the query window:

    SELECT COUNT(*) FROM dbo.FactInternetSales;
  4. Run the query by selecting Execute or use the following shortcut: F5.

    :::image type="content" source="../sql-data-warehouse/media/sql-data-warehouse-query-ssms/execute-query.png" alt-text="Screenshot of the Execute button to run the query.":::

  5. Look at the query results. In the following example, the FactInternetSales table has 60,398 rows.

    :::image type="content" source="../sql-data-warehouse/media/sql-data-warehouse-query-ssms/results.png" alt-text="Screenshot of the query results.":::

After you establish a database connection, you can query the data.

  1. Right-click your database in SQL Server Object Explorer.

  2. Select New Query. A new query window opens.

    :::image type="content" source="media/get-started-ssms/new-query.png" alt-text="Screenshot of the New Query window for serverless SQL pool.":::

  3. Copy the following Transact-SQL (T-SQL) query into the query window:

    SELECT COUNT(*) FROM demo.dbo.usPopulationView;
  4. Run the query by selecting Execute or use the following shortcut: F5.

    :::image type="content" source="media/get-started-ssms/execute-query.png" alt-text="Screenshot of the Execute button to run the query for serverless SQL pool.":::

  5. Look at the query results. In this example, the usPopulationView view has 3,664,512 rows.

    :::image type="content" source="media/get-started-ssms/results.png" alt-text="Screenshot of the query results for serverless SQL pool.":::


Related content