Skip to content

Commit b29b617

Browse files
authored
Merge pull request #287220 from WilliamDAssafMSFT/20240923-ropc
20240923 ropc
2 parents e27fd87 + e817266 commit b29b617

File tree

7 files changed

+81
-40
lines changed

7 files changed

+81
-40
lines changed

articles/storage/blobs/data-lake-storage-use-sql.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ title: 'Tutorial: Azure Data Lake Storage, Azure Synapse'
33
titleSuffix: Azure Storage
44
description: This tutorial shows how to run SQL queries on an Azure Synapse serverless SQL endpoint to access data in an Azure Data Lake Storage enabled storage account.
55
author: jovanpop-msft
6-
76
ms.service: azure-data-lake-storage
87
ms.topic: tutorial
98
ms.date: 03/07/2022
109
ms.author: normesta
1110
ms.custom: devx-track-sql
12-
#Customer intent: As an data engineer, I want to connect my data in Azure Storage so that I can easily run analytics on it.
1311
---
1412

1513
# Tutorial: Query Azure Data Lake Storage using SQL language in Synapse Analytics
@@ -43,18 +41,18 @@ This tutorial uses flight data from the Bureau of Transportation Statistics. You
4341

4442
1. Download the [On_Time_Reporting_Carrier_On_Time_Performance_1987_present_2016_1.zip](https://github.com/Azure-Samples/AzureStorageSnippets/blob/master/blobs/tutorials/On_Time_Reporting_Carrier_On_Time_Performance_1987_present_2016_1.zip) file. This file contains the flight data.
4543

46-
2. Unzip the contents of the zipped file and make a note of the file name and the path of the file. You need this information in a later step.
44+
1. Unzip the contents of the zipped file and make a note of the file name and the path of the file. You need this information in a later step.
4745

4846
### Copy source data into the storage account
4947

5048
1. Navigate to your new storage account in the Azure portal.
5149

52-
2. Select **Storage browser**->**Blob containers**->**Add container** and create a new container named **data**.
50+
1. Select **Storage browser**->**Blob containers**->**Add container** and create a new container named **data**.
5351

5452
> [!div class="mx-imgBorder"]
5553
> ![Screenshot of creating a folder in storage browser](./media/data-lake-storage-events/data-container.png)
5654
57-
6. In storage browser, upload the `On_Time_Reporting_Carrier_On_Time_Performance_1987_present_2016_1.csv` file to the **data** folder.
55+
1. In storage browser, upload the `On_Time_Reporting_Carrier_On_Time_Performance_1987_present_2016_1.csv` file to the **data** folder.
5856

5957
## Create an Azure Synapse workspace
6058

@@ -78,8 +76,8 @@ To find the fully qualified server name:
7876
1. Select on the workspace you want to connect to.
7977
2. Go to overview.
8078
3. Locate the full server name.
81-
82-
![Full server name serverless SQL pool](../../synapse-analytics/sql/media/connect-overview/server-connect-example-sqlod.png)
79+
- For a dedicated SQL pool, use **SQL Endpoint**.
80+
- For the serverless SQL pool, use **SQL on-demand endpoint**.
8381

8482
In this tutorial, you use Synapse Studio to query data from the CSV file that you uploaded to the storage account.
8583

@@ -106,7 +104,7 @@ In this tutorial, you use Synapse Studio to query data from the CSV file that yo
106104

107105
When they're no longer needed, delete the resource group and all related resources. To do so, select the resource group for the storage account and workspace, and then and select **Delete**.
108106

109-
## Next steps
107+
## Next step
110108

111109
> [!div class="nextstepaction"]
112110
> [Azure Data Lake Storage, Azure Databricks & Spark](data-lake-storage-use-databricks-spark.md)

articles/synapse-analytics/sql-data-warehouse/sql-data-warehouse-connect-overview.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Connect to a SQL pool in Azure Synapse
33
description: Learn how to connect to an SQL pool in Azure Synapse.
4-
author: joannapea
5-
ms.author: joanpo
6-
ms.reviewer: wiassaf
7-
ms.date: 06/13/2022
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: joanpo
7+
ms.date: 09/23/2024
88
ms.service: azure-synapse-analytics
99
ms.subservice: sql-dw
1010
ms.topic: conceptual
@@ -18,6 +18,9 @@ ms.custom:
1818

1919
Get connected to a SQL pool in Azure Synapse.
2020

21+
> [!IMPORTANT]
22+
> Use Microsoft Entra authentication when possible. For more information, see [Use Microsoft Entra authentication for authentication with Synapse SQL](../sql/active-directory-authentication.md).
23+
2124
## Find your server name
2225

2326
The server name in the following example is `sqlpoolservername.database.windows.net`. To find the fully qualified server name:
@@ -42,24 +45,32 @@ Here are examples of connection strings for popular drivers:
4245

4346
### ADO.NET connection string example
4447

48+
This simple example uses SQL authentication, but [Microsoft Entra authentication with ADO.NET is more secure and recommended](/sql/connect/ado-net/sql/azure-active-directory-authentication?view=azure-sqldw-latest&preserve-view=true).
49+
4550
```csharp
4651
Server=tcp:{your_server}.database.windows.net,1433;Database={your_database};User ID={your_user_name};Password={your_password_here};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
4752
```
4853

4954
### ODBC connection string example
5055

56+
This simple example uses SQL authentication, but [Microsoft Entra authentication with ODBC is more secure and recommended](/sql/connect/odbc/using-azure-active-directory?view=azure-sqldw-latest&preserve-view=true).
57+
5158
```csharp
5259
Driver={SQL Server Native Client 11.0};Server=tcp:{your_server}.database.windows.net,1433;Database={your_database};Uid={your_user_name};Pwd={your_password_here};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
5360
```
5461

5562
### PHP connection string example
5663

64+
This simple example uses SQL authentication, but [Microsoft Entra authentication with PHP is more secure and recommended](/sql/connect/php/azure-active-directory?view=azure-sqldw-latest&preserve-view=true).
65+
5766
```PHP
5867
Server: {your_server}.database.windows.net,1433 \r\nSQL Database: {your_database}\r\nUser Name: {your_user_name}\r\n\r\nPHP Data Objects(PDO) Sample Code:\r\n\r\ntry {\r\n $conn = new PDO ( \"sqlsrv:server = tcp:{your_server}.database.windows.net,1433; Database = {your_database}\", \"{your_user_name}\", \"{your_password_here}\");\r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n}\r\ncatch ( PDOException $e ) {\r\n print( \"Error connecting to SQL Server.\" );\r\n die(print_r($e));\r\n}\r\n\rSQL Server Extension Sample Code:\r\n\r\n$connectionInfo = array(\"UID\" => \"{your_user_name}\", \"pwd\" => \"{your_password_here}\", \"Database\" => \"{your_database}\", \"LoginTimeout\" => 30, \"Encrypt\" => 1, \"TrustServerCertificate\" => 0);\r\n$serverName = \"tcp:{your_server}.database.windows.net,1433\";\r\n$conn = sqlsrv_connect($serverName, $connectionInfo);
5968
```
6069

6170
### JDBC connection string example
6271

72+
This simple example uses SQL authentication, but [Microsoft Entra authentication with JDBC is more secure and recommended](/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=azure-sqldw-latest&preserve-view=true).
73+
6374
```Java
6475
jdbc:sqlserver://yourserver.database.windows.net:1433;database=yourdatabase;user={your_user_name};password={your_password_here};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
6576
```
@@ -75,6 +86,6 @@ SQL pool standardizes certain settings during connection and object creation. Th
7586
| [DATEFORMAT](/sql/t-sql/statements/set-dateformat-transact-sql?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true) |mdy |
7687
| [DATEFIRST](/sql/t-sql/statements/set-datefirst-transact-sql?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true) |7 |
7788

78-
## Next steps
89+
## Related content
7990

8091
To connect and query with Visual Studio, see [Query with Visual Studio](sql-data-warehouse-query-visual-studio.md). To learn more about authentication options, see [Authentication to Azure Synapse Analytics](sql-data-warehouse-authentication.md).
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Connection strings
33
description: Connection strings for Synapse SQL pool
4-
author: joannapea
5-
ms.author: joanpo
6-
ms.reviewer: wiassaf
7-
ms.date: 04/17/2018
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: joanpo
7+
ms.date: 09/23/2024
88
ms.service: azure-synapse-analytics
99
ms.subservice: sql-dw
1010
ms.topic: conceptual
@@ -17,35 +17,46 @@ ms.custom:
1717

1818
You can connect to a SQL pool in Azure Synapse with several different application protocols such as, [ADO.NET](/dotnet/framework/data/adonet?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json), [ODBC](/sql/connect/odbc/windows/microsoft-odbc-driver-for-sql-server-on-windows?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true), [PHP](/sql/connect/php/overview-of-the-php-sql-driver?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true), and [JDBC](/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json&view=azure-sqldw-latest&preserve-view=true). Below are some examples of connections strings for each protocol. You can also use the Azure portal to build your connection string.
1919

20-
To build your connection string using the Azure portal, navigate to your SQL pool blade, under *Essentials* click on *Show database connection strings*.
20+
> [!IMPORTANT]
21+
> Use Microsoft Entra authentication when possible. For more information, see [Use Microsoft Entra authentication for authentication with Synapse SQL](../sql/active-directory-authentication.md).
22+
23+
To build your connection string using the Azure portal, navigate to your SQL pool blade, under **Essentials** select **Show database connection strings**.
2124

2225
## Sample ADO.NET connection string
2326

27+
This simple example uses SQL authentication, but [Microsoft Entra authentication with ADO.NET is more secure and recommended](/sql/connect/ado-net/sql/azure-active-directory-authentication?view=azure-sqldw-latest&preserve-view=true).
28+
2429
```csharp
2530
Server=tcp:{your_server}.database.windows.net,1433;Database={your_database};User ID={your_user_name};Password={your_password_here};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
2631
```
2732

2833
## Sample ODBC connection string
2934

35+
This simple example uses SQL authentication, but [Microsoft Entra authentication with ODBC is more secure and recommended](/sql/connect/odbc/using-azure-active-directory?view=azure-sqldw-latest&preserve-view=true).
36+
3037
```csharp
3138
Driver={SQL Server Native Client 11.0};Server=tcp:{your_server}.database.windows.net,1433;Database={your_database};Uid={your_user_name};Pwd={your_password_here};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
3239
```
3340

3441
## Sample PHP connection string
3542

43+
This simple example uses SQL authentication, but [Microsoft Entra authentication with PHP is more secure and recommended](/sql/connect/php/azure-active-directory?view=azure-sqldw-latest&preserve-view=true).
44+
3645
```PHP
3746
Server: {your_server}.database.windows.net,1433 \r\nSQL Database: {your_database}\r\nUser Name: {your_user_name}\r\n\r\nPHP Data Objects(PDO) Sample Code:\r\n\r\ntry {\r\n $conn = new PDO ( \"sqlsrv:server = tcp:{your_server}.database.windows.net,1433; Database = {your_database}\", \"{your_user_name}\", \"{your_password_here}\");\r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n}\r\ncatch ( PDOException $e ) {\r\n print( \"Error connecting to SQL Server.\" );\r\n die(print_r($e));\r\n}\r\n\rSQL Server Extension Sample Code:\r\n\r\n$connectionInfo = array(\"UID\" => \"{your_user_name}\", \"pwd\" => \"{your_password_here}\", \"Database\" => \"{your_database}\", \"LoginTimeout\" => 30, \"Encrypt\" => 1, \"TrustServerCertificate\" => 0);\r\n$serverName = \"tcp:{your_server}.database.windows.net,1433\";\r\n$conn = sqlsrv_connect($serverName, $connectionInfo);
3847
```
3948

4049
## Sample JDBC connection string
4150

51+
This simple example uses SQL authentication, but [Microsoft Entra authentication with JDBC is more secure and recommended](/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=azure-sqldw-latest&preserve-view=true).
52+
4253
```Java
4354
jdbc:sqlserver://yourserver.database.windows.net:1433;database=yourdatabase;user={your_user_name};password={your_password_here};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
4455
```
4556

4657
> [!NOTE]
4758
> Consider setting the connection timeout to 300 seconds in order to allow the connection to survive short periods of unavailability.
4859
49-
## Next steps
60+
## Related content
5061

5162
To start querying your SQL pool with Visual Studio and other applications, see [Query with Visual Studio](sql-data-warehouse-query-visual-studio.md).
Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
---
22
title: Connect to Synapse SQL
33
description: Get connected to Synapse SQL.
4-
author: azaricstefan
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
56
ms.service: azure-synapse-analytics
67
ms.topic: overview
78
ms.subservice: sql
8-
ms.date: 04/15/2020
9-
ms.author: stefanazaric
10-
ms.reviewer: whhender
9+
ms.date: 09/23/2024
10+
ms.reviewer: whhender, stefanazaric
1111
ms.custom: devx-track-csharp
1212
---
13-
1413
# Connect to Synapse SQL
15-
Get connected to the Synapse SQL capability in Azure Synapse Analytics.
1614

17-
## Supported tools for serverless SQL pool
15+
Get connected to the Synapse SQL capability in Azure Synapse Analytics.
1816

19-
[Azure Data Studio](/azure-data-studio/download-azure-data-studio) is fully supported starting from version 1.18.0. SSMS is partially supported starting from version 18.5, you can use it to connect and query only.
17+
> [!IMPORTANT]
18+
> Use Microsoft Entra authentication when possible. For more information, see [Use Microsoft Entra authentication for authentication with Synapse SQL](active-directory-authentication.md).
2019
2120
## Find your server name
2221

23-
The server name for the dedicated SQL pool in the following example is: showdemoweu.sql.azuresynapse.net.
24-
The server name for the serverless SQL pool in the following example is: showdemoweu-ondemand.sql.azuresynapse.net.
22+
The server name for the dedicated SQL pool in the following example is: `<server-name>.sql.azuresynapse.net`.
23+
The server name for the serverless SQL pool in the following example is: `<server-name>-ondemand.sql.azuresynapse.net`.
2524

2625
To find the fully qualified server name:
2726

@@ -30,14 +29,16 @@ To find the fully qualified server name:
3029
3. Select on the workspace you want to connect to.
3130
4. Go to overview.
3231
5. Locate the full server name.
32+
- For a dedicated SQL pool, use **SQL Endpoint**.
33+
- For the serverless SQL pool, use **SQL on-demand endpoint**.
3334

34-
## **SQL pool**
35+
## Supported tools
3536

36-
![Full server name](./media/connect-overview/server-connect-example.png)
37+
Use [Azure Data Studio](/azure-data-studio/download-azure-data-studio) or [SQL Server Management Studio (SSMS)](https://aka.ms/ssms).
3738

38-
## **serverless SQL pool**
39-
40-
![Full server name serverless SQL pool](./media/connect-overview/server-connect-example-sqlod.png)
39+
For serverless SQL pools:
40+
- [Azure Data Studio](/azure-data-studio/download-azure-data-studio) is fully supported starting from version 1.18.0.
41+
- [SQL Server Management Studio](https://aka.ms/ssms) is partially supported starting from version 18.5, you can use it to connect and query only.
4142

4243
## Supported drivers and connection strings
4344
Synapse SQL supports [ADO.NET](/dotnet/framework/data/adonet/), [ODBC](/sql/connect/odbc/windows/microsoft-odbc-driver-for-sql-server-on-windows), [PHP](/sql/connect/php/overview-of-the-php-sql-driver?f=255&MSPPError=-2147217396), and [JDBC](/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server). To find the latest version and documentation, select one of the preceding drivers. To automatically generate the connection string for the driver that you're using from the Azure portal, select **Show database connection strings** from the preceding example. Following are also some examples of what a connection string looks like for each driver.
@@ -47,24 +48,32 @@ Synapse SQL supports [ADO.NET](/dotnet/framework/data/adonet/), [ODBC](/sql/conn
4748
4849
### ADO.NET connection string example
4950

51+
This simple example uses SQL authentication, but [Microsoft Entra authentication with ADO.NET is more secure and recommended](/sql/connect/ado-net/sql/azure-active-directory-authentication?view=azure-sqldw-latest&preserve-view=true).
52+
5053
```csharp
5154
Server=tcp:{your_server}.sql.azuresynapse.net,1433;Database={your_database};User ID={your_user_name};Password={your_password_here};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
5255
```
5356

5457
### ODBC connection string example
5558

59+
This simple example uses SQL authentication, but [Microsoft Entra authentication with ODBC is more secure and recommended](/sql/connect/odbc/using-azure-active-directory?view=azure-sqldw-latest&preserve-view=true).
60+
5661
```csharp
5762
Driver={SQL Server Native Client 11.0};Server=tcp:{your_server}.sql.azuresynapse.net,1433;Database={your_database};Uid={your_user_name};Pwd={your_password_here};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
5863
```
5964

6065
### PHP connection string example
6166

67+
This simple example uses SQL authentication, but [Microsoft Entra authentication with PHP is more secure and recommended](/sql/connect/php/azure-active-directory?view=azure-sqldw-latest&preserve-view=true).
68+
6269
```PHP
6370
Server: {your_server}.sql.azuresynapse.net,1433 \r\nSQL Database: {your_database}\r\nUser Name: {your_user_name}\r\n\r\nPHP Data Objects(PDO) Sample Code:\r\n\r\ntry {\r\n $conn = new PDO ( \"sqlsrv:server = tcp:{your_server}.sql.azuresynapse.net,1433; Database = {your_database}\", \"{your_user_name}\", \"{your_password_here}\");\r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n}\r\ncatch ( PDOException $e ) {\r\n print( \"Error connecting to SQL Server.\" );\r\n die(print_r($e));\r\n}\r\n\rSQL Server Extension Sample Code:\r\n\r\n$connectionInfo = array(\"UID\" => \"{your_user_name}\", \"pwd\" => \"{your_password_here}\", \"Database\" => \"{your_database}\", \"LoginTimeout\" => 30, \"Encrypt\" => 1, \"TrustServerCertificate\" => 0);\r\n$serverName = \"tcp:{your_server}.sql.azuresynapse.net,1433\";\r\n$conn = sqlsrv_connect($serverName, $connectionInfo);
6471
```
6572

6673
### JDBC connection string example
6774

75+
This simple example uses SQL authentication, but [Microsoft Entra authentication with JDBC is more secure and recommended](/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=azure-sqldw-latest&preserve-view=true).
76+
6877
```Java
6978
jdbc:sqlserver://yourserver.sql.azuresynapse.net:1433;database=yourdatabase;user={your_user_name};password={your_password_here};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=30;
7079
```
@@ -83,5 +92,6 @@ Synapse SQL standardizes some settings during connection and object creation. Th
8392

8493
For executing **serverless SQL pool** queries, recommended tools are [Azure Data Studio](get-started-azure-data-studio.md) and Azure Synapse Studio.
8594

86-
## Next steps
95+
## Related content
96+
8797
To connect and query with Visual Studio, see [Query with Visual Studio](../sql-data-warehouse/sql-data-warehouse-query-visual-studio.md?context=/azure/synapse-analytics/context/context). To learn more about authentication options, see [Authentication to Synapse SQL](sql-authentication.md?tabs=provisioned).

0 commit comments

Comments
 (0)