Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
You can use Azure Data Studio to connect to and query Synapse SQL in Azure Synapse Analytics.
Ansluta
To connect to Synapse SQL, open Azure Data Studio and select New Connection.
Choose Microsoft SQL Server as the Connection type.
The connection requires the following parameters:
-
Server: Server in the form
<Azure Synapse workspace name>-ondemand.sql.azuresynapse.net - Database: Database name
Anmärkning
If you would like to use serverless SQL pool the URL should look like:
-
<Azure Synapse workspace name>-ondemand.sql.azuresynapse.net.
If you would like to use dedicated SQL pool the URL should look like:
-
<Azure Synapse workspace name>.sql.azuresynapse.net
Choose Windows Authentication, Microsoft Entra ID, or SQL Login as the Authentication Type.
To use SQL Login as the authentication type, add the username/password parameters:
-
User: Server user in the form
<User> - Password: Password associated with the user
To use Microsoft Entra ID, you need to choose the needed authentication type.
The following screenshot shows the Connection Details for Windows Authentication:
The following screenshot shows the Connection Details using SQL Login:
After successful login, you should see a dashboard like this: 
Sökfråga
Once connected, you can query Synapse SQL using supported Transact-SQL (T-SQL) statements against the instance. Select New query from the dashboard view to get started.
For example, you can use the following Transact-SQL statement to query Parquet files using serverless SQL pool:
SELECT COUNT(*)
FROM
OPENROWSET(
BULK 'https://azureopendatastorage.blob.core.windows.net/censusdatacontainer/release/us_population_county/year=20*/*.parquet',
FORMAT='PARQUET'
)
Nästa steg
Explore other ways to connect to Synapse SQL:
Visit Use Azure Data Studio to connect and query data using a dedicated SQL pool in Azure Synapse Analytics, for more information.