Skip to content

Commit 593dafc

Browse files
authored
Merge branch 'live' into patch-1
2 parents 1c23fb8 + b661175 commit 593dafc

25 files changed

+780
-101
lines changed

powerapps-docs/developer/common-data-service/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@
4747
href: quick-find-limit.md
4848
- name: Improve FetchXML request performance
4949
href: fetchxml-performance.md
50-
- name: "Use SQL to query data (Preview)"
50+
- name: "Use SQL to query data"
5151
href: cds-sql-query.md
52+
- name: "Dataverse SQL"
53+
href: how-cds-sql-differs-from-transact-sql.md
5254
- name: Saved Queries
5355
href: saved-queries.md
5456
- name: Query Hierarchical data

powerapps-docs/developer/common-data-service/cds-sql-query.md

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use SQL to query data (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Learn how to query Microsoft Dataverse entity data using SQL." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 11/09/2020
5+
ms.date: 12/16/2020
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -23,26 +23,23 @@ search.app:
2323
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
2424

2525
> [!IMPORTANT]
26-
> This feature has been re-enabled in the majority of regions. Please resume testing, and provide feedback. We thank you for your patience and feedback.
27-
28-
29-
A SQL data connection is available on the Microsoft Dataverse endpoint. The SQL connection provides read-only access to the entity data of the target Dataverse environment. This allows you to write and execute SQL queries against the entity data table. Table columns provide the attribute data of the entity. No custom views of the data have been provided.
26+
> This feature has been re-enabled in the majority of regions. Please resume testing, and provide feedback. We thank you for your patience and feedback.<p/>
27+
> [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
3028
29+
A SQL data connection is available on the Microsoft Dataverse endpoint. The SQL connection provides read-only access to the entity data of the target Dataverse environment. This allows you to execute SQL queries against the entity data table. Table columns provide the attribute data of the entity. No custom views of the data have been provided.
3130

31+
## Applications support
3232

33-
> [!IMPORTANT]
34-
> - This is a preview feature, and isn't available in all regions.
35-
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
36-
> - Instructions to enable the feature can be found here: [View entity data in Power BI Desktop](/powerapps/maker/common-data-service/view-entity-data-power-bi), and [Manage feature settings](/power-platform/admin/settings-features) (see TDS endpoint setting).
33+
TDS (SQL) endpoint applications support for Power Apps and SQL Server Management Studio is described below.
3734

38-
## Applications support
35+
### Power Apps
3936

40-
You can use the **Analyze in Power BI** option (**Data** > **Entities** > **Analyze in Power BI**) in Power Apps (https://make.powerapps.com) to use the SQL connection feature to analyze data in Power BI Desktop. More information: [View entity data in Power BI Desktop](/powerapps/maker/common-data-service/view-entity-data-power-bi)
37+
You can use the **Analyze in Power BI** option (**Data** > **Entities** > **Analyze in Power BI**) in Power Apps (https://make.powerapps.com) to use the Dataverse connector to analyze data in Power BI Desktop. More information: [View entity data in Power BI Desktop](/powerapps/maker/common-data-service/view-entity-data-power-bi)
4138

4239
> [!NOTE]
43-
> To verify if your target environment has the Dataverse SQL connection feature enabled, do the following:
44-
> 1. Sign into Power Apps, on the left navigation pane expand **Data**, and then select **Entities**.
45-
> 2. On the command bar, you should see a button **Analyze in Power BI**. If you do not see this button, your environment does not yet have the feature.
40+
> To enable this feature, see the TDS endpoint setting in [Manage feature settings](/power-platform/admin/settings-features). Once enabled you should see a button **Analyze in Power BI** in the command bar of Power Apps.
41+
42+
### SQL Server Management Studio
4643

4744
You can also use [SQL Server Management Studio](/sql/ssms/download-sql-server-management-studio-ssms) (SSMS) version 18.4 or later with the Dataverse endpoint SQL connection. Examples of using SSMS with the SQL data connection are provided below.
4845

@@ -52,10 +49,13 @@ You can also use [SQL Server Management Studio](/sql/ssms/download-sql-server-ma
5249

5350
The Dataverse endpoint SQL connection uses the Dataverse security model for data access. Data can be obtained for all entities to which a user has access to in Dataverse.
5451

55-
Only Azure Active Directory authentication is supported. SQL authentication and Windows authentication are not supported. Below is an example of how to logon to the SQL connection in SSMS. Notice the server name is the organization address URL followed by a comma and the port value of 5558.
52+
Only Azure Active Directory authentication is supported. SQL authentication and Windows authentication are not supported. Below is an example of how to logon to the SQL connection in SSMS. Notice the server name is the organization address URL.
5653

5754
![Connec dialog](media/ssms-connect-dialog.PNG)
5855

56+
> [!NOTE]
57+
> The requirement to specify a port number after the service URL has been removed.
58+
5959
## Example entity data queries
6060

6161
Below are a couple of example queries composed in SSMS. The first image shows a simple query using aliases and result ordering.
@@ -76,13 +76,7 @@ select name, fullname from account a inner join contact c on a.primarycontactid
7676

7777
## Supported operations and data types
7878

79-
The list of supported SQL operations includes:
80-
81-
- Batch operations
82-
- SELECT
83-
- Aggregation functions (i.e., Count() and Max() functions)
84-
- UNIONs and JOINs
85-
- Filtering
79+
For a detailed list of supported SQL operations on the Dataverse endpoint see [How Dataverse SQL differs from Transact-SQL](how-cds-sql-differs-from-transact-sql.md).
8680

8781
Any operation that attempts to modify data (i.e., INSERT, UPDATE) will not work as this is a read-only SQL data connection. Dataverse option sets are represented as \<OptionSet\>Name and \<OptionSet\>Label in a result set.
8882

@@ -99,10 +93,42 @@ The following Dataverse datatypes are not supported with the SQL connection: `bi
9993
> group by act.activityid, act.subject
10094
> ```
10195
102-
## Plug-ins
96+
## Limitations
97+
98+
There is an 80MB maximum size limit for query results returned from the Dataverse endpoint. Consider using data integration tools such as [Data Export Service](https://docs.microsoft.com/powerapps/developer/common-data-service/data-export-service) and [dataflows](https://docs.microsoft.com/power-bi/transform-model/dataflows/dataflows-introduction-self-service) for large data queries that return over 80MB of data. More information: [Importing and exporting data](/powerapps/maker/common-data-service/why-cds-import-export)
99+
100+
Dates returned in query results are formatted as Universal Time Coordinated (UTC). Previously, dates were returned in local time.
101+
102+
> [!NOTE]
103+
> Until a service update planned for January 2021 has deployed, using date filters will be slow.
103104
104105
Querying data using SQL does not trigger any plug-ins registered on the <xref:Microsoft.Xrm.Sdk.Messages.RetrieveMultipleRequest> or <xref:Microsoft.Xrm.Sdk.Messages.RetrieveRequest> messages. Any re-writing of the query or results that would normally be performed by such a plug-in will therefore not take effect for a SQL query.
105106
107+
Queries using the TDS endpoint execute under the service protection API limits.
108+
109+
## Troubleshooting authentication problems
110+
111+
Only Azure Active Directory authentication is supported on the Dataverse endpoint SQL connection. The preferred authentication mechanism is "Azure Active Directory – Universal" with multi-factor authentication (MFA). However, "Azure Active Directory – Password" will work if MFA is not configured. If you try to use other forms of authentication, you will see errors like the following.
112+
113+
- Error returned when using **Azure Active Directory – Integrated** authentication.
114+
115+
“Login failed: The HTTP request was forbidden with client authentication scheme 'Anonymous'.
116+
RequestId: TDS;81d8a4f7-0d49-4d21-8f50-04364bddd370;2
117+
Time: 2020-12-17T01:10:59.8628578Z (.Net SqlClient Data Provider)”
118+
119+
- Error returned when using **SQL Server** authentication.
120+
121+
“Login failed: Request is not authenticated.
122+
RequestId: TDS;918aa372-ccc4-438a-813e-91b086355343;1
123+
Time: 2020-12-17T01:13:14.4986739Z (.Net SqlClient Data Provider)”
124+
125+
- Error returned when using **Windows** authentication.
126+
127+
“Login failed: Request is not authenticated.
128+
RequestId: TDS;fda17c60-93f7-4d5a-ad79-7ddfbb917979;1
129+
Time: 2020-12-17T01:15:01.0497703Z (.Net SqlClient Data Provider)”
130+
106131
### See also
107132
108-
[Use FetchXML to construct a query](use-fetchxml-construct-query.md)
133+
[Use FetchXML to construct a query](cds-sql-query.md)
134+
[Service Protection API Limits](api-limits.md)

0 commit comments

Comments
 (0)