Skip to content

Commit 1a09d89

Browse files
Merge pull request #34667 from dlevy-msft-sql/dlevy-07102025
Remove leading * on .env file names
2 parents 11ba79a + 751bb6e commit 1a09d89

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

docs/connect/python/mssql-python/python-sql-driver-mssql-python-quickstart.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This quickstart describes installing Python, and mssql-python then
44
author: dlevy-msft-sql
55
ms.author: dlevy
66
ms.reviewer: vanto, randolphwest
7-
ms.date: 07/09/2025
7+
ms.date: 07/10/2025
88
ms.service: sql
99
ms.subservice: connectivity
1010
ms.topic: quickstart-sdk
@@ -56,6 +56,7 @@ Get the [`mssql-python` package](https://pypi.org/project/mssql-python/) from Py
5656
### [Linux](#tab/linux)
5757

5858
```bash
59+
sudo apt-get -y install libltdl7
5960
pip install mssql-python
6061
```
6162

@@ -139,9 +140,9 @@ This quickstart requires the *[!INCLUDE [sssampledbnormal-md](../../../includes/
139140
conn = connect(getenv("SQL_CONNECTION_STRING"))
140141
```
141142

142-
1. In the current directory, create a new file named `*.env`.
143+
1. In the current directory, create a new file named `.env`.
143144

144-
1. Within the `*.env` file, add an entry for your connection string named `SQL_CONNECTION_STRING`. Replace the example here with your actual connection string value.
145+
1. Within the `.env` file, add an entry for your connection string named `SQL_CONNECTION_STRING`. Replace the example here with your actual connection string value.
145146

146147
```text
147148
SQL_CONNECTION_STRING="Server=<server_name>;Database={<database_name>};Encrypt=yes;TrustServerCertificate=no;Authentication=ActiveDirectoryInteractive"

docs/connect/python/pymssql/python-sql-driver-pymssql-quickstart.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This quickstart describes installing Python, and pymssql then shows
44
author: dlevy-msft-sql
55
ms.author: dlevy
66
ms.reviewer: vanto, randolphwest
7-
ms.date: 06/18/2025
7+
ms.date: 07/10/2025
88
ms.service: sql
99
ms.subservice: connectivity
1010
ms.topic: quickstart-sdk
@@ -14,7 +14,7 @@ ms.custom:
1414

1515
# Quickstart: Connect with the pymssql driver for Python
1616

17-
In this quickstart, you connect a Python script to a database that you have created and loaded with sample data. You use the `pymssql` driver for Python to connect to your database and perform basic operations, like reading and writing data.
17+
In this quickstart, you connect a Python script to a database that you created and loaded with sample data. You use the `pymssql` driver for Python to connect to your database and perform basic operations, like reading and writing data.
1818

1919
[pymssql documentation](https://pymssql.readthedocs.io/en/stable/) | [pymssql source code](https://github.com/pymssql/pymssql) | [Package (PyPi)](https://pypi.org/project/pymssql/)
2020

@@ -37,7 +37,7 @@ In this quickstart, you connect a Python script to a database that you have crea
3737
Follow these steps to configure your development environment to develop an application using the `pymssql` Python driver.
3838

3939
> [!NOTE]
40-
> This driver uses the [TDS](/openspecs/windows_protocols/ms-tds/b46a581a-39de-4745-b076-ec4dbb7d13ec) protocol, which is enabled by default in SQL Server, SQL database in Fabric and Azure SQL Database. No extra configuration is required.
40+
> This driver uses the [Tabular Data Stream (TDS)](/openspecs/windows_protocols/ms-tds/b46a581a-39de-4745-b076-ec4dbb7d13ec) protocol, which is enabled by default in SQL Server, SQL database in Fabric and Azure SQL Database. No extra configuration is required.
4141
4242
### Install the pymssql package
4343

@@ -51,6 +51,16 @@ Get the [`pymssql` package](https://pypi.org/project/pymssql/) from PyPI.
5151
pip install pymssql
5252
```
5353

54+
### Install python-dotenv package
55+
56+
Get the [`python-dotenv`](https://pypi.org/project/python-dotenv/) from PyPI.
57+
58+
1. In the same directory, install the `python-dotenv` package.
59+
60+
```bash
61+
pip install python-dotenv
62+
```
63+
5464
### Check installed packages
5565

5666
You can use the PyPI command-line tool to verify that your intended packages are installed.
@@ -112,9 +122,9 @@ This quickstart requires the *[!INCLUDE [sssampledbnormal-md](../../../includes/
112122
conn = connect(getenv("SQL_SERVER"),getenv("SQL_USER"),getenv("SQL_PASSWORD"),getenv("SQL_DATABASE"))
113123
```
114124

115-
1. In the current directory, create a new file named `*.env`.
125+
1. In the current directory, create a new file named `.env`.
116126

117-
1. Within the `*.env` file, add entries for your connection string values named `SQL_SERVER`, `SQL_USER`, `SQL_PASSWORD`, `SQL_DATABASE`. Replace the placeholders here with your actual connection string values.
127+
1. Within the `.env` file, add entries for your connection string values named `SQL_SERVER`, `SQL_USER`, `SQL_PASSWORD`, `SQL_DATABASE`. Replace the placeholders here with your actual connection string values.
118128

119129
```text
120130
SQL_SERVER="<server_name>"
@@ -124,7 +134,7 @@ This quickstart requires the *[!INCLUDE [sssampledbnormal-md](../../../includes/
124134
```
125135

126136
> [!TIP]
127-
> The connection string used here largely depends on the type of SQL database you're connecting to. For more information on connection strings and their syntax, see [connection string syntax reference](../../ado-net/connection-string-syntax.md).
137+
> The connection string used here largely depends on the type of SQL database you're connecting to. For more information on connection strings and their syntax, see [FreeTDS connection attributes](https://www.freetds.org/userguide/OdbcConnAttr.html).
128138
129139
### Execute a query
130140
@@ -241,7 +251,7 @@ Execute an [INSERT](../../../t-sql/statements/insert-transact-sql.md) statement
241251
```
242252
243253
> [!TIP]
244-
> Optionally, you can use [`connection.rollback`](https://pymssql.readthedocs.io/en/latest/ref/pymssql.html#pymssql.Connection.rollback) to rollback the transaction.
254+
> Optionally, you can use [`connection.rollback`](https://pymssql.readthedocs.io/en/latest/ref/pymssql.html#pymssql.Connection.rollback) to roll back the transaction.
245255
246256
1. Close the cursor and connection using [`cursor.close`](https://pymssql.readthedocs.io/en/latest/ref/pymssql.html#pymssql.Cursor.close) and [`connection.close`](https://pymssql.readthedocs.io/en/latest/ref/pymssql.html#pymssql.Connection.close).
247257

docs/connect/python/pyodbc/python-sql-driver-pyodbc-quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This quickstart describes installing Python, and pyodbc then shows
44
author: dlevy-msft-sql
55
ms.author: dlevy
66
ms.reviewer: vanto, randolphwest
7-
ms.date: 07/09/2025
7+
ms.date: 07/10/2025
88
ms.service: sql
99
ms.subservice: connectivity
1010
ms.topic: quickstart-sdk
@@ -126,9 +126,9 @@ Copy the `ODBC` connection string from the *Settings* tab.
126126
conn = connect(getenv("SQL_CONNECTION_STRING"))
127127
```
128128

129-
1. In the current directory, create a new file named `*.env`.
129+
1. In the current directory, create a new file named `.env`.
130130

131-
1. Within the `*.env` file, add an entry for your connection string named `SQL_CONNECTION_STRING`. Replace the example here with your actual connection string value.
131+
1. Within the `.env` file, add an entry for your connection string named `SQL_CONNECTION_STRING`. Replace the example here with your actual connection string value.
132132

133133
```text
134134
SQL_CONNECTION_STRING="Driver={ODBC Driver 18 for SQL Server};Server=<server_name>;Database={<database_name>};Encrypt=yes;TrustServerCertificate=no;Authentication=ActiveDirectoryInteractive"

0 commit comments

Comments
 (0)