Skip to content

Commit d76205f

Browse files
authored
Update sql-database-connectivity-architecture.md
1 parent 134e1d4 commit d76205f

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

articles/sql-database/sql-database-connectivity-architecture.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ author: srdan-bozovic-msft
1111
ms.author: srbozovi
1212
ms.reviewer: carlrab
1313
manager: craigg
14-
ms.date: 06/25/2019
14+
ms.date: 06/26/2019
1515
---
1616
# Azure SQL Connectivity Architecture
1717

@@ -147,6 +147,24 @@ az resource show --ids $id
147147
az resource update --ids $id --set properties.connectionType=Proxy
148148
```
149149

150+
## Script to change connection settings via Azure CLI from a Windows command prompt (with Azure CLI installed)
151+
152+
> [!IMPORTANT]
153+
> This script requires the [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
154+
155+
The following CLI script shows how to change the connection policy in a bash shell.
156+
157+
```azurecli
158+
# Get SQL Server ID and set URI
159+
FOR /F "tokens=*" %g IN ('az sql server show --resource-group myResourceGroup-571418053 --name server-538465606 --query "id" -o tsv') do (SET id=%g/connectionPolicies/Default)
160+
161+
# Get current connection policy
162+
az resource show --ids $id
163+
164+
# Update connection policy
165+
az resource update --ids $id --set properties.connectionType=Proxy
166+
```
167+
150168
## Next steps
151169

152170
- For information on how to change the Azure SQL Database connection policy for an Azure SQL Database server, see [conn-policy](https://docs.microsoft.com/cli/azure/sql/server/conn-policy).

0 commit comments

Comments
 (0)