Skip to content

Commit 8f9388c

Browse files
authored
Merge branch 'live' into patch-2
2 parents 213b196 + 506c2eb commit 8f9388c

File tree

58 files changed

+1477
-181
lines changed

Some content is hidden

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

58 files changed

+1477
-181
lines changed

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

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
items:
88
- name: Supported customizations
99
href: supported-customizations.md
10+
- name: Security and data access
11+
href: security-model.md
12+
items:
13+
- name: Security concepts
14+
href: security-concepts.md
15+
- name: Data operations and access rights
16+
href: security-access-rights.md
17+
- name: Sharing and assigning
18+
href: security-sharing-assigning.md
19+
- name: Verifying access in code
20+
href: security-access-coding.md
1021
- name: Work with data using code
1122
href: work-with-data-cds.md
1223
items:
@@ -47,8 +58,10 @@
4758
href: quick-find-limit.md
4859
- name: Improve FetchXML request performance
4960
href: fetchxml-performance.md
50-
- name: "Use SQL to query data (Preview)"
61+
- name: "Use SQL to query data"
5162
href: cds-sql-query.md
63+
- name: "Dataverse SQL"
64+
href: how-cds-sql-differs-from-transact-sql.md
5265
- name: Saved Queries
5366
href: saved-queries.md
5467
- name: Query Hierarchical data
@@ -251,22 +264,19 @@
251264
href: use-category-entity.md
252265
- name: Feedback entity
253266
href: use-feedback-entity-manage-feedback-ratings-records.md
254-
- name: Security entities
255-
href: security-model.md
267+
- name: User and team entities
268+
href: user-team-entities.md
256269
items:
257-
- name: User and team entities
258-
href: user-team-entities.md
259-
items:
260-
- name: Specify time zone settings for a user
261-
href: specify-time-zone-settings-user.md
262-
- name: Time zone entities
263-
href: time-zone-entities.md
264-
- name: BusinessUnit entity
265-
href: businessunit-entity.md
266-
- name: Field security entities
267-
href: field-security-entities.md
268-
- name: Use access teams and owner teams to collaborate and share information
269-
href: use-access-teams-owner-teams-collaborate-share-information.md
270+
- name: Specify time zone settings for a user
271+
href: specify-time-zone-settings-user.md
272+
- name: Time zone entities
273+
href: time-zone-entities.md
274+
- name: BusinessUnit entity
275+
href: businessunit-entity.md
276+
- name: Field security entities
277+
href: field-security-entities.md
278+
- name: Use access teams and owner teams to collaborate and share information
279+
href: use-access-teams-owner-teams-collaborate-share-information.md
270280
- name: Template entities
271281
href: upload-manage-document-templates.md
272282
- name: Work with metadata using code

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)