Επεξεργασία

Κοινή χρήση μέσω


Connect to Synapse SQL with SQL Server Management Studio

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:

    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:

    Screenshot that shows the Object Explorer window.

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.

    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.

    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.

    Screenshot of the query results.