Skip to content

Commit 62fb062

Browse files
committed
Merge branch 'main' into release-sqlmi-aad-rebrand
2 parents 61def8b + d7a5f5a commit 62fb062

File tree

114 files changed

+388
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+388
-385
lines changed

azure-sql/database/connect-query-content-reference-guide.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ titleSuffix: Azure SQL Database & SQL Managed Instance
44
description: Links to Azure SQL Database quickstarts showing how to connect to and query Azure SQL Database, and Azure SQL Managed Instance.
55
author: dzsquared
66
ms.author: drskwier
7-
ms.reviewer: wiassaf, mathoma
8-
ms.date: 07/19/2023
7+
ms.reviewer: wiassaf, mathoma, randolphwest
8+
ms.date: 09/15/2023
99
ms.service: sql-database
1010
ms.subservice: connect
1111
ms.topic: conceptual
1212
ms.custom: sqldbrb=1
13-
monikerRange: "= azuresql || = azuresql-db || = azuresql-mi"
13+
monikerRange: "=azuresql || =azuresql-db || =azuresql-mi"
1414
---
1515
# Azure SQL Database and Azure SQL Managed Instance connect and query articles
1616

17-
[!INCLUDE[appliesto-sqldb-sqlmi](../includes/appliesto-sqldb-sqlmi.md)]
17+
[!INCLUDE [appliesto-sqldb-sqlmi](../includes/appliesto-sqldb-sqlmi.md)]
1818

1919
The following document includes links to Azure examples showing how to connect and query Azure SQL Database and Azure SQL Managed Instance. For some related recommendations for Transport Level Security, see [TLS considerations for database connectivity](#tls-considerations-for-database-connectivity).
2020

@@ -54,7 +54,7 @@ Get the connection information you need to connect to the database in Azure SQL
5454

5555
1. Review the complete **ADO.NET** connection string.
5656

57-
:::image type="content" source="./media/connect-query-dotnet-core/adonet-connection-string2.png" alt-text="Screenshot showing the ADO.NET connection string.":::
57+
:::image type="content" source="media/connect-query-dotnet-core/adonet-connection-string2.png" alt-text="Screenshot showing the ADO.NET connection string.":::
5858

5959
1. Copy the **ADO.NET** connection string if you intend to use it.
6060

@@ -76,20 +76,20 @@ Non-Microsoft drivers might not use TLS by default. This can be a factor when co
7676

7777
## Libraries
7878

79-
You can use various libraries and frameworks to connect to Azure SQL Database or Azure SQL Managed Instance. Check out our [Get started tutorials](https://aka.ms/sqldev) to quickly get started with programming languages such as C#, Java, Node.js, PHP, and Python. Then build an app by using SQL Server on Linux or Windows, or a SQL Server container on Linux.
79+
You can use various libraries and frameworks to connect to Azure SQL Database or Azure SQL Managed Instance. You can then build an app by using SQL Server on Linux or Windows, or a SQL Server container on Linux.
8080

8181
The following table lists connectivity libraries or *drivers* that client applications can use from a variety of languages to connect to and use SQL Server running on-premises or in the cloud. You can use them on Linux, Windows, or in containers, and use them to connect to Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics.
8282

8383
| Language | Platform | Additional resources | Download | Get started |
8484
| :-- | :-- | :-- | :-- | :-- |
85-
| C# | Windows, Linux, macOS | [Microsoft ADO.NET for SQL Server](/sql/connect/ado-net/microsoft-ado-net-sql-server) | [Download](https://dotnet.microsoft.com/download) | [Get started](https://www.microsoft.com/sql-server/developer-get-started/csharp/ubuntu)
85+
| C# | Windows, Linux, macOS | [Microsoft ADO.NET for SQL Server](/sql/connect/ado-net/microsoft-ado-net-sql-server) | [Download](https://dotnet.microsoft.com/download) |
8686
| C++ | Windows, Linux, macOS | [Microsoft ODBC driver for SQL Server](/sql/connect/odbc/microsoft-odbc-driver-for-sql-server/) | [Download](/sql/connect/odbc/microsoft-odbc-driver-for-sql-server/) |
8787
| Go | Windows, Linux, macOS | [Microsoft Go driver for SQL Server](https://github.com/microsoft/go-mssqldb#readme) | [Install](https://github.com/microsoft/go-mssqldb#install) | [Get started](connect-query-go.md)
88-
| Java | Windows, Linux, macOS | [Microsoft JDBC driver for SQL Server](/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server/) | [Download](/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server) | [Get started](https://www.microsoft.com/sql-server/developer-get-started/java/ubuntu)
89-
| Node.js | Windows, Linux, macOS | [Node.js driver for SQL Server](/sql/connect/node-js/node-js-driver-for-sql-server/) | [Install](/sql/connect/node-js/step-1-configure-development-environment-for-node-js-development/) | [Get started](https://www.microsoft.com/sql-server/developer-get-started/node/ubuntu)
90-
| PHP | Windows, Linux, macOS| [PHP SQL driver for SQL Server](/sql/connect/php/microsoft-php-driver-for-sql-server) | [Download](/sql/connect/php/download-drivers-php-sql-server) | [Get started](https://www.microsoft.com/sql-server/developer-get-started/php/ubuntu/)
91-
| Python | Windows, Linux, macOS | [Python SQL driver](/sql/connect/python/python-driver-for-sql-server/) | Install choices: <br/> \* [pymssql](/sql/connect/python/pymssql/step-1-configure-development-environment-for-pymssql-python-development/) <br/> \* [pyodbc](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development/) | [Get started](https://www.microsoft.com/sql-server/developer-get-started/python/ubuntu)
92-
| Ruby | Windows, Linux, macOS | [Ruby driver for SQL Server](/sql/connect/ruby/ruby-driver-for-sql-server/) | [Install](/sql/connect/ruby/step-1-configure-development-environment-for-ruby-development/) | [Get started](https://www.microsoft.com/sql-server/developer-get-started/ruby/ubuntu)
88+
| Java | Windows, Linux, macOS | [Microsoft JDBC driver for SQL Server](/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server/) | [Download](/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server) |
89+
| Node.js | Windows, Linux, macOS | [Node.js driver for SQL Server](/sql/connect/node-js/node-js-driver-for-sql-server/) | [Install](/sql/connect/node-js/step-1-configure-development-environment-for-node-js-development/) |
90+
| PHP | Windows, Linux, macOS | [PHP SQL driver for SQL Server](/sql/connect/php/microsoft-php-driver-for-sql-server) | [Download](/sql/connect/php/download-drivers-php-sql-server) |
91+
| Python | Windows, Linux, macOS | [Python SQL driver](/sql/connect/python/python-driver-for-sql-server/) | Install choices:<br />\* [pymssql](/sql/connect/python/pymssql/step-1-configure-development-environment-for-pymssql-python-development/)<br />\* [pyodbc](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development/) |
92+
| Ruby | Windows, Linux, macOS | [Ruby driver for SQL Server](/sql/connect/ruby/ruby-driver-for-sql-server/) | [Install](/sql/connect/ruby/step-1-configure-development-environment-for-ruby-development/) |
9393

9494
### Data-access frameworks
9595

azure-sql/database/connect-query-php.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ titleSuffix: Azure SQL Database & SQL Managed Instance
44
description: How to use PHP to create a program that connects to a database in Azure SQL Database or Azure SQL Managed Instance, and query it using T-SQL statements.
55
author: dzsquared
66
ms.author: drskwier
7-
ms.reviewer: wiassaf, mathoma, v-masebo
8-
ms.date: 05/29/2020
7+
ms.reviewer: wiassaf, mathoma, v-masebo, randolphwest
8+
ms.date: 09/15/2023
99
ms.service: sql-database
1010
ms.subservice: connect
1111
ms.topic: quickstart
1212
ms.custom:
1313
- sqldbrb=2
1414
- mode-other
1515
ms.devlang: php
16-
monikerRange: "= azuresql || = azuresql-db || = azuresql-mi"
16+
monikerRange: "=azuresql || =azuresql-db || =azuresql-mi"
1717
---
1818
# Quickstart: Use PHP to query a database in Azure SQL Database
19-
[!INCLUDE[appliesto-sqldb-sqlmi](../includes/appliesto-sqldb-sqlmi.md)]
19+
20+
[!INCLUDE [appliesto-sqldb-sqlmi](../includes/appliesto-sqldb-sqlmi.md)]
2021

2122
This article demonstrates how to use [PHP](https://php.net/manual/en/intro-whatis.php) to connect to a database in Azure SQL Database or Azure SQL Managed Instance. You can then use T-SQL statements to query data.
2223

@@ -28,20 +29,16 @@ To complete this quickstart, you need:
2829
- A database in Azure SQL Database or Azure SQL Managed Instance. You can use one of these quickstarts to create and then configure a database:
2930

3031
| Action | SQL Database | SQL Managed Instance | SQL Server on Azure VM |
31-
|:--- |:--- |:---|:---|
32+
| :--- | :--- | :--- | :--- |
3233
| Create| [Portal](single-database-create-quickstart.md) | [Portal](../managed-instance/instance-create-quickstart.md) | [Portal](../virtual-machines/windows/sql-vm-create-portal-quickstart.md)
33-
|| [CLI](scripts/create-and-configure-database-cli.md) | [CLI](https://medium.com/azure-sqldb-managed-instance/working-with-sql-managed-instance-using-azure-cli-611795fe0b44) |
34+
| | [CLI](scripts/create-and-configure-database-cli.md) | [CLI](https://medium.com/azure-sqldb-managed-instance/working-with-sql-managed-instance-using-azure-cli-611795fe0b44) |
3435
|| [PowerShell](scripts/create-and-configure-database-powershell.md) | [PowerShell](../managed-instance/scripts/create-configure-managed-instance-powershell.md) | [PowerShell](../virtual-machines/windows/sql-vm-create-powershell-quickstart.md)
35-
| Configure | [Server-level IP firewall rule](firewall-create-server-level-portal-quickstart.md)| [Connectivity from a VM](../managed-instance/connect-vm-instance-configure.md)|
36+
| Configure | [Server-level IP firewall rule](firewall-create-server-level-portal-quickstart.md) | [Connectivity from a VM](../managed-instance/connect-vm-instance-configure.md) |
3637
|||[Connectivity from on-premises](../managed-instance/point-to-site-p2s-configure.md) | [Connect to a SQL Server instance](../virtual-machines/windows/sql-vm-create-portal-quickstart.md)
37-
|Load data|Wide World Importers loaded per quickstart|[Restore Wide World Importers](../managed-instance/restore-sample-database-quickstart.md) | [Restore Wide World Importers](../managed-instance/restore-sample-database-quickstart.md) |
38-
|||Restore or import Adventure Works from a [BACPAC](database-import.md) file from [GitHub](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/adventure-works)| Restore or import Adventure Works from a [BACPAC](database-import.md) file from [GitHub](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/adventure-works)|
39-
40-
38+
| Load data | Wide World Importers loaded per quickstart | [Restore Wide World Importers](../managed-instance/restore-sample-database-quickstart.md) | [Restore Wide World Importers](../managed-instance/restore-sample-database-quickstart.md) |
39+
| | | Restore or import Adventure Works from a [BACPAC](database-import.md) file from [GitHub](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/adventure-works) | Restore or import Adventure Works from a [BACPAC](database-import.md) file from [GitHub](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/adventure-works) |
4140

42-
43-
44-
> [!IMPORTANT]
41+
> [!IMPORTANT]
4542
> The scripts in this article are written to use the `AdventureWorks2022` database. With a SQL Managed Instance, you must either import the `AdventureWorks2022` database into an instance database or modify the scripts in this article to use the Wide World Importers database.
4643
4744
- PHP-related software installed for your operating system:
@@ -50,24 +47,22 @@ To complete this quickstart, you need:
5047

5148
- **Linux**, install PHP, the ODBC driver, then install the PHP Driver for SQL Server. See [Step 1, 2, and 3](/sql/connect/php/installation-tutorial-linux-mac).
5249

53-
- **Windows**, install PHP and PHP Drivers, then install the ODBC driver and SQLCMD. See [Step 1.2 and 1.3](https://www.microsoft.com/sql-server/developer-get-started/php/windows/).
54-
5550
## Get server connection information
5651

5752
Get the connection information you need to connect to the database in Azure SQL Database. You'll need the fully qualified server name or host name, database name, and login information for the upcoming procedures.
5853

5954
1. Sign in to the [Azure portal](https://portal.azure.com/).
6055

61-
2. Navigate to the **SQL Databases** or **SQL Managed Instances** page.
56+
1. Navigate to the **SQL Databases** or **SQL Managed Instances** page.
6257

63-
3. On the **Overview** page, review the fully qualified server name next to **Server name** for a database in Azure SQL Database or the fully qualified server name (or IP address) next to **Host** for an Azure SQL Managed Instance or SQL Server in an Azure VM. To copy the server name or host name, hover over it and select the **Copy** icon.
58+
1. On the **Overview** page, review the fully qualified server name next to **Server name** for a database in Azure SQL Database or the fully qualified server name (or IP address) next to **Host** for an Azure SQL Managed Instance or SQL Server in an Azure VM. To copy the server name or host name, hover over it and select the **Copy** icon.
6459

65-
> [!NOTE]
60+
> [!NOTE]
6661
> For connection information for SQL Server on Azure VM, see [Connect to a SQL Server instance](../virtual-machines/windows/sql-vm-create-portal-quickstart.md#connect-to-sql-server).
6762
6863
## Add code to query the database
6964

70-
1. In your favorite text editor, create a new file, *sqltest.php*.
65+
1. In your favorite text editor, create a new file, *sqltest.php*.
7166

7267
1. Replace its contents with the following code. Then add the appropriate values for your server, database, user, and password.
7368

azure-sql/database/connect-query-python.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ titleSuffix: Azure SQL Database & SQL Managed Instance
44
description: This article shows you how to use Python to create a program that connects to a database in Azure SQL Database and query it using Transact-SQL statements.
55
author: dzsquared
66
ms.author: drskwier
7-
ms.reviewer: wiassaf, mathoma
8-
ms.date: 11/11/2022
7+
ms.reviewer: wiassaf, mathoma, randolphwest
8+
ms.date: 09/15/2023
99
ms.service: sql-database
1010
ms.subservice: connect
1111
ms.topic: quickstart
@@ -16,11 +16,11 @@ ms.custom:
1616
- mode-api
1717
- py-fresh-zinc
1818
ms.devlang: python
19-
monikerRange: "= azuresql || = azuresql-db || = azuresql-mi"
19+
monikerRange: "=azuresql || =azuresql-db || =azuresql-mi"
2020
---
2121
# Quickstart: Use Python to query a database
2222

23-
[!INCLUDE[appliesto-sqldb-sqlmi](../includes/appliesto-sqldb-sqlmi-asa.md)]
23+
[!INCLUDE [appliesto-sqldb-sqlmi](../includes/appliesto-sqldb-sqlmi-asa.md)]
2424

2525
In this quickstart, you use Python to connect to Azure SQL Database, Azure SQL Managed Instance, or Synapse SQL database and use T-SQL statements to query data.
2626

@@ -32,19 +32,19 @@ To complete this quickstart, you need:
3232

3333
- A database where you'll run a query.
3434

35-
[!INCLUDE[create-configure-database](../includes/create-configure-database.md)]
35+
[!INCLUDE [create-configure-database](../includes/create-configure-database.md)]
3636

3737
- [Python](https://python.org/downloads) 3 and related software
3838

39-
|**Action**|**macOS**|**Ubuntu**|**Windows**|
40-
|----------|-----------|------------|---------|
41-
|Install the ODBC driver, SQLCMD, and the Python driver for SQL Server|Use steps **1.2**, **1.3**, and **2.1** in [create Python apps using SQL Server on macOS](https://www.microsoft.com/sql-server/developer-get-started/python/mac/). These steps will also install Homebrew and Python.<br/><br/>Although the linked article references SQL Server, these steps are also applicable to Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics. |[Configure an environment for pyodbc Python development](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development#linux)|[Configure an environment for pyodbc Python development](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development#windows).|
42-
|Install Python and other required packages| |Use `sudo apt-get install python python-pip gcc g++ build-essential`.| |
43-
|Further information|[Microsoft ODBC driver on macOS](/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server) |[Microsoft ODBC driver on Linux](/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server)|[Microsoft ODBC driver on Linux](/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server)|
39+
| **Action** | **macOS** | **Linux** | **Windows** |
40+
| --- | --- | --- | --- |
41+
| Install the ODBC driver, **sqlcmd**, and the Python driver for SQL Server | [Configure an environment for pyodbc Python development](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development?tabs=macos) | [Configure an environment for pyodbc Python development](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development?tabs=linux) | [Configure an environment for pyodbc Python development](/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development?tabs=windows). |
42+
| Install Python and other required packages | | Use `sudo apt-get install python python-pip gcc g++ build-essential`. | |
43+
| Further information | [Microsoft ODBC driver on macOS](/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server) | [Microsoft ODBC driver on Linux](/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server) | [Microsoft ODBC driver on Windows](/sql/connect/odbc/download-odbc-driver-for-sql-server) |
4444

4545
To further explore Python and the database in Azure SQL Database, see [Azure SQL Database libraries for Python](/python/api/overview/azure/sql), the [pyodbc repository](https://github.com/mkleehammer/pyodbc/wiki/), and a [pyodbc sample](https://github.com/mkleehammer/pyodbc/wiki/Getting-started).
4646

47-
## Create code to query your database
47+
## Create code to query your database
4848

4949
1. In a text editor, create a new file named *sqltest.py*.
5050

@@ -55,9 +55,9 @@ To further explore Python and the database in Azure SQL Database, see [Azure SQL
5555
server = '<server>.database.windows.net'
5656
database = '<database>'
5757
username = '<username>'
58-
password = '{<password>}'
58+
password = '{<password>}'
5959
driver= '{ODBC Driver 17 for SQL Server}'
60-
60+
6161
with pyodbc.connect('DRIVER='+driver+';SERVER=tcp:'+server+';PORT=1433;DATABASE='+database+';UID='+username+';PWD='+ password) as conn:
6262
with conn.cursor() as cursor:
6363
cursor.execute("SELECT TOP 3 name, collation_name FROM sys.databases")

0 commit comments

Comments
 (0)