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:
- The mssql extension for Visual Studio Code.
- SSMS is partially supported starting from version 18.5. You can use it to connect and query only.
Prerequisites
- SQL Server Management Studio (SSMS).
- A data warehouse. To create a data warehouse for dedicated SQL pool, see Create a dedicated SQL pool. For serverless SQL pool, a data warehouse named Built-in is already provisioned in your workspace at creation time.
- The fully qualified SQL Server name. To find this name, see Connect to Synapse SQL.
Connect to Synapse SQL
To connect to Synapse SQL using dedicated SQL pool, follow these steps:
Open SQL Server Management Studio (SSMS).
In the Connect to Server dialog box, fill in the fields, and then select Connect:
- 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.
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:
Run a sample query
After you establish a database connection, you can query the data.
Right-click your database in SQL Server Object Explorer.
Select New Query. A new query window opens.
Copy the following Transact-SQL (T-SQL) query into the query window:
SELECT COUNT(*) FROM dbo.FactInternetSales;
Run the query by selecting
Execute
or use the following shortcut:F5
.Look at the query results. In the following example, the
FactInternetSales
table has 60,398 rows.