You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Active Directory (Azure AD) authentication is a mechanism for connecting to [Azure SQL Database](sql-database-paas-overview.md), [Azure SQL Managed Instance](../managed-instance/sql-managed-instance-paas-overview.md), and [Synapse SQL in Azure Synapse Analytics](/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-overview-what-is) by using identities in Azure AD.
20
+
This article provides an overview of using Azure Active Directory to authenticate to [Azure SQL Database](sql-database-paas-overview.md), [Azure SQL Managed Instance](../managed-instance/sql-managed-instance-paas-overview.md), [SQL Server on Windows Azure VMs](../virtual-machines/windows/sql-server-on-azure-vm-iaas-what-is-overview.md), [Synapse SQL in Azure Synapse Analytics](/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-overview-what-is) and [SQL Server for Windows and Linux](/sql/relational-databases/security/authentication-access/azure-ad-authentication-sql-server-overview) by using identities in Azure AD.
22
21
23
-
> [!NOTE]
24
-
> This article applies to Azure SQL Database, SQL Managed Instance, and Azure Synapse Analytics.
22
+
To learn how to create and populate Azure AD, and then configure Azure AD with Azure SQL Database, Azure SQL Managed Instance, and Synapse SQL in Azure Synapse Analytics, review [Configure Azure AD](authentication-aad-configure.md) and [Azure AD with SQL Server on Azure VMs](../virtual-machines/windows/security-considerations-best-practices.md#azure-ad-authentication-preview).
23
+
24
+
## Overview
25
+
26
+
Azure Active Directory (Azure AD) authentication is a mechanism to connect to your SQL resource by using identities in Azure AD.
25
27
26
28
With Azure AD authentication, you can centrally manage the identities of database users and other Microsoft services in one central location. Central ID management provides a single place to manage database users and simplifies permission management. Benefits include the following:
27
29
@@ -44,9 +46,6 @@ With Azure AD authentication, you can centrally manage the identities of databas
44
46
45
47
- Azure AD supports similar connections from SQL Server Data Tools (SSDT) that use Active Directory Interactive Authentication. For more information, see [Azure Active Directory support in SQL Server Data Tools (SSDT)](/sql/ssdt/azure-active-directory)
46
48
47
-
> [!NOTE]
48
-
> Connecting to a SQL Server instance that's running on an Azure virtual machine (VM) is not supported using Azure Active Directory or Azure Active Directory Domain Services. Use an Active Directory domain account instead.
49
-
50
49
The configuration steps include the following procedures to configure and use Azure Active Directory authentication.
51
50
52
51
1. Create and populate Azure AD.
@@ -57,11 +56,11 @@ The configuration steps include the following procedures to configure and use Az
57
56
6. Connect to your database by using Azure AD identities.
58
57
59
58
> [!NOTE]
60
-
> To learn how to create and populate Azure AD, and then configure Azure AD with Azure SQL Database, SQL Managed Instance, and Synapse SQL in Azure Synapse Analytics, see [Configure Azure AD with Azure SQL Database](authentication-aad-configure.md).
59
+
> For Azure SQL, Azure VMs and SQL Server 2022, Azure AD authentication only supports access tokens which originate from Azure AD and doesn't support third-party access tokens. Azure AD also doesn't support redirecting Azure AD queries to third-party endpoints. This applies to all SQL platforms and all operating systems that support Azure AD authentication.
61
60
62
61
## Trust architecture
63
62
64
-
- Only the cloud portion of Azure AD, SQL Database, SQL Managed Instance, and Azure Synapse is considered to support Azure AD native user passwords.
63
+
- Only the cloud portion of Azure AD, SQL Database, SQL Managed Instance, [SQL Server on Windows Azure VMs], and Azure Synapse is considered to support Azure AD native user passwords.
65
64
- To support Windows single sign-on credentials (or user/password for Windows credential), use Azure Active Directory credentials from a federated or managed domain that is configured for seamless single sign-on for pass-through and password hash authentication. For more information, see [Azure Active Directory Seamless Single Sign-On](/azure/active-directory/hybrid/how-to-connect-sso).
66
65
- To support Federated authentication (or user/password for Windows credentials), the communication with ADFS block is required.
This feature allows Azure administrators to prevent Azure SQL Databases using geo-redundant storage options (RA-GRS, RA-GZRS) as preferred backup storage redundancy via T-SQL, Azure portal, PowerShell, Azure CLI and API. This is enforced at the subscription level to block geo-replication of Azure SQL database backups.
20
+
21
+
## Overview
22
+
23
+
This feature prevents geo replication of Azure SQL Database backups by blocking all create, update database workflows that use read-access geo-redundant storage (RA-GRS) as the [backup storage redundancy](/azure-sql/database/automated-backups-overview.md#backup-storage-redundancy) option. Azure SQL Database uses read-access geo-redundant storage (RA-GRS) as default backup storage redundancy when you create a new database, which automatically replicates the database backups to [paired region](/azure/availability-zones/cross-region-replication-azure). This feature blocks all the create and update database workflows that set backup storage redundancy to geo-redundant backup storage options like RA-GRS, RA-GZRS via T-SQL, Azure portal, PowerShell, Azure CLI and API. To create or update database successfully, users will have to manually select the backup storage redundancy based on data residency requirements.
24
+
25
+
You can register your subscription to this feature via Azure portal, [PowerShell](/powershell/module/az.resources/register-azproviderfeature), or [Azure CLI](/cli/azure/feature#az-feature-register).
26
+
27
+
## Permissions
28
+
29
+
In order to register or remove this feature, the Azure user must be a member of the Owner or Contributor role of the subscription.
30
+
31
+
## Examples
32
+
33
+
The following section describes how you can register or unregister a preview feature with Microsoft.Sql resource provider in Azure portal:
34
+
35
+
### Register Block Geo-replication of Azure SQL Database Backups
4. After you select **Azure SQL Database Block Geo-Redundant Backup Storage**, a new window will open, select **Register**, to register this block with Microsoft.Sql resource provider.
41
+
42
+
:::image type="content" source="./media/block-backup-geo-replication/block-backup-geo-replication.png" alt-text="Screenshot of Block Geo-replication of Azure SQL Database Backups in the list of Preview features.":::
43
+
44
+
:::image type="content" source="./media/block-backup-geo-replication/block-backup-geo-replication-register.png" alt-text="Screenshot of Register Block Geo-replication of Azure SQL Database Backups feature.":::
45
+
46
+
47
+
### Removing Block Geo-replication of Azure SQL Database Backups
48
+
To remove the block on geo-redundant backup storage from your subscription, unregister the previously registered Azure SQL Database Block Geo-Redundant Backup Storage feature.
49
+
50
+
51
+
## Next steps
52
+
53
+
-[An overview of Azure SQL Database Backup storage redundancy](/azure-sql/database/automated-backups-overview.md#backup-storage-redundancy)
description: This topic 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.
4
+
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.
5
5
author: dzsquared
6
6
ms.author: drskwier
7
7
ms.reviewer: wiassaf, mathoma
8
-
ms.date: 12/19/2020
8
+
ms.date: 11/11/2022
9
9
ms.service: sql-database
10
10
ms.subservice: connect
11
11
ms.topic: quickstart
@@ -29,29 +29,26 @@ To complete this quickstart, you need:
29
29
30
30
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
-[Python](https://python.org/downloads) 3 and related software
37
-
38
37
39
38
|**Action**|**macOS**|**Ubuntu**|**Windows**|
40
39
|----------|-----------|------------|---------|
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/). This will also install 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).|
40
+
|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
41
|Install Python and other required packages||Use `sudo apt-get install python python-pip gcc g++ build-essential`.||
43
42
|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)|
44
43
45
-
46
-
47
44
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).
48
45
49
46
## Create code to query your database
50
47
51
-
1. In a text editor, create a new file named *sqltest.py*.
52
-
48
+
1. In a text editor, create a new file named *sqltest.py*.
49
+
53
50
1. Add the following code. Get the connection information from the prerequisites section and substitute your own values for \<server>, \<database>, \<username>, and \<password>.
54
-
51
+
55
52
```python
56
53
import pyodbc
57
54
server ='<server>.database.windows.net'
@@ -68,7 +65,6 @@ To further explore Python and the database in Azure SQL Database, see [Azure SQL
68
65
print (str(row[0]) +""+str(row[1]))
69
66
row = cursor.fetchone()
70
67
```
71
-
72
68
73
69
## Run the code
74
70
@@ -80,6 +76,11 @@ To further explore Python and the database in Azure SQL Database, see [Azure SQL
80
76
81
77
1. Verify that the databases and their collations are returned, and then close the command window.
82
78
79
+
If you receive an error:
80
+
- Verify that the server name, database name, username, and password you're using are correct.
81
+
- Verify that the ODBC driver you installed is the same version as the `driver` variable in the code above. For example, the code shows 17, but you may have installed a different version.
82
+
- If you're running the code from a local environment, verify that the firewall of the Azure resource you're trying to access is configured to allow access from your environment's IP address.
83
+
83
84
## Next steps
84
85
85
86
-[Design your first database in Azure SQL Database](design-first-database-tutorial.md)
Copy file name to clipboardExpand all lines: azure-sql/database/database-import-export-hang.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ The Azure SQL Database Import/Export service provides a limited number of comput
31
31
32
32
Additionally, as the Import/Export service performs a logical backup of the database the time to complete is more dependent on the number of objects in the database than a traditional physical database backup.
33
33
34
+
> [!NOTE]
35
+
> After resources are assigned and a request starts to process, the service automatically cancels the request after two days.
34
36
35
37
## Recommended solutions
36
38
@@ -45,7 +47,7 @@ If your database exports are used only for recovery from accidental data deletio
45
47
46
48
## Things to consider when you export or import a database
47
49
48
-
* All the methods discussed in this article use up the Database Transaction Unit (DTU) quota, which causes throttling by the Azure SQL Database service. You can [view the DTU stats for the database on the Azure portal](./monitor-tune-overview.md#azure-sql-database-and-azure-sql-managed-instance-resource-monitoring). If the database has reached its resource limits, [upgrade the service tier](./scale-resources.md) to add more resources.
50
+
* All the methods discussed in this article consume Database Transaction Units (DTUs) or CPU quota, which causes throttling by the Azure SQL Database service. You can [view the DTU stats for the database on the Azure portal](./monitor-tune-overview.md#azure-sql-database-and-azure-sql-managed-instance-resource-monitoring). If the database has reached its resource limits, [upgrade the service tier](./scale-resources.md) to add more resources.
49
51
* Ideally, you should run client applications (like the sqlpackage utility or your custom DAC application) from a VM in the same region as your database. Otherwise, you might experience performance issues related to network latency.
50
52
* Exporting large tables without clustered indexes can be very slow or even cause failure. This behavior occurs because the table can't be split up and exported in parallel. Instead, it must be exported in a single transaction, and that causes slow performance and potential failure during export, especially for large tables.
0 commit comments