SQL (NEW) Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/category/microsoft-dynamics-365/sql-new/ Microsoft Dynamics CRM . Microsoft Power Platform Sat, 06 Jun 2020 18:00:21 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32&ssl=1 SQL (NEW) Archives - Microsoft Dynamics 365 Blog https://microsoftdynamics.in/category/microsoft-dynamics-365/sql-new/ 32 32 176351444 Get Data using SQL Server o Microsoft dynamics 365 Online in Power BI and Embed the Power BI report as Dashboard in Dynamis 365 https://microsoftdynamics.in/2020/06/06/get-data-using-sql-server-o-microsoft-dynamics-365-online-in-power-bi-and-embed-the-power-bi-report-as-dashboard-in-dynamis-365/ Sat, 06 Jun 2020 18:00:21 +0000 http://microsoftdynamics.in/?p=3498 The post Get Data using SQL Server o Microsoft dynamics 365 Online in Power BI and Embed the Power BI report as Dashboard in Dynamis 365 appeared first on Microsoft Dynamics 365 Blog.

]]>

Check3: Create a Report in Power Bi with SQL Server Connection and Embed the Power BI report as Dashboard in Dynamis 365

One of the best parts which we check above is Relationships are correctly shown as it is in CDS

  • 2nd is adding lookup, Options field, regarding field all will give Name /Label and values both as separate Fields , for which we need to do some extra work when getting data from Odata.
  • Below I have selected Lookup and Options fields as Name and ID
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb6726ab9cd.png?fit=1832%2C784&ssl=1

Check4: Publish Report in Power BI Destop Client

  • We will use the above report itself to embed in Microsoft dynamics 365
  • We have added only account and contact entity with some field to demonstrate how Relationship are pre-build and we get Lookup name and Id
  • Now we will publish the report, select the workplace
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb81d545c56.png?fit=1747%2C863&ssl=1

Check5: Pin Report as Dashboard in Power BI Portal

  • Once published, we will edit credentials as OAuth
  • Navigate to My Workspace -> DataSets and edit credentials
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb8397d89e8.png?fit=1925%2C909&ssl=1
  • Selecting Authentication Method as “OAUTH”
  • Remember to enable Below.
    End users use their own OAuth2 credentials when accessing this data source via DirectQuery.
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb85a1c3a8c.png?fit=1628%2C860&ssl=1
  • Now we will ping Report as live so it can be used in dynamics 365
  • Navigating to report from workspace
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb8661ecd4c.png?fit=1918%2C579&ssl=1
  • Once pinned, we can see a pinned item in DashBoard, and will also be available as a dashboard in D365
  • I have changed name while pinning it as a dashboard
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb86fe3d722.png?fit=1916%2C489&ssl=1

Check5: Embed the Power Bi Dashboard in Dynamics 365

  • Navigating to D365 Dashboard
  • Clicking NEW, Either select Microsoft dynamics 365 or Power Bi Dashboard.
  • Select Layout

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb8815399a8.png?fit=1715%2C782&ssl=1
  • Select Power BI Tile
  • All our Dashboard in Selected workspace will be available
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb88cde6f4d.png?fit=1897%2C918&ssl=1

TESTING: Power BI Dashboard is added to D365

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb898a7dd33.png?fit=1919%2C886&ssl=1

The post Get Data using SQL Server o Microsoft dynamics 365 Online in Power BI and Embed the Power BI report as Dashboard in Dynamis 365 appeared first on Microsoft Dynamics 365 Blog.

]]>
3498
Get Data using SQL Server Connection of Microsoft dynamics 365 CDS online within Power BI and embedding in dynamics 365 https://microsoftdynamics.in/2020/06/06/get-data-using-sql-server-connection-of-microsoft-dynamics-365-cds-online-within-power-bi-and-embedding-in-dynamics-365/ Sat, 06 Jun 2020 17:47:35 +0000 http://microsoftdynamics.in/?p=3484 The post Get Data using SQL Server Connection of Microsoft dynamics 365 CDS online within Power BI and embedding in dynamics 365 appeared first on Microsoft Dynamics 365 Blog.

]]>

In This Post, we will Get Data in Power Bi using DataQuery on SQL Server Connection with Microsoft Dynamics 365 CRM

In the previous post, we enabled TDS Endpoint using a utility  Microsoft.Crm.SE.OrgDBOrgSettingsTool .  But now we have an option to enable the TDS endpoint from http://admin.powerplatform.microsoft.com/ .

  • Navigate to http://admin.powerplatform.microsoft.com/ -> Select Environment -> In Features, we will find en checkbox for enabling the TDS endpoint. That will make a connection to the SQL server possible.
  • Also, enable Power Bi Visualization embedding
  • Verify that your environment has at least version 9.1.0.17437.
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb5a87d2a96.png?fit=1638%2C829&ssl=1

Check1: Connect to SQL Server database in Power Bi

Once Prerequisites are completed we are ready to Get data using SQL Server

  • Click on Get Data -> select SQL Server and enter Details
    i.e ORGNAME.crm.dynamics.com,5558 (replace CRM as regions ) , Optional Database (ORGNAME)
  • Select DirectQuery as an option and Click OK
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb5f5ba4c68.png?fit=1919%2C813&ssl=1
  • Now we will do authentication using Microsoft account and connect
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb60a56f29a.png?fit=1709%2C807&ssl=1

Check2: Slect Entities and check Model for relationship testing

  • After Successful connection, let us select some entities and select load

  • I would be selecting Account and Contact and Load

  • previously when we use to get data using Odata, we needed to transform data instead of load, we can still transform data but it has reduced a lot of work after getting entities we will see that next
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb617d639ff.png?fit=1099%2C874&ssl=1

Once the connection is created, In the model we will see relationship connection pre-created. we don’t have to do much work regarding relationships.

As previously we use to create relationship again in Power BI.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb62230a517.png?fit=1509%2C676&ssl=1

Check3: Create a Report in Power Bi with SQL Server Connection and Embed the Power BI report as Dashboard in Dynamis 365

One of the best parts which we check above is Relationships are correctly shown as it is in CDS

  • 2nd is adding lookup, Options field, regarding field all will give Name /Label and values both as separate Fields, for which we need to do some extra work when getting data from Odata.
  • Below I have selected Lookup and Options fields as Name and ID
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5edb6726ab9cd.png?fit=1832%2C784&ssl=1

The post Get Data using SQL Server Connection of Microsoft dynamics 365 CDS online within Power BI and embedding in dynamics 365 appeared first on Microsoft Dynamics 365 Blog.

]]>
3484
Connecting SSMS to use SQL Query in Dynamics 365 CRM Online – Login failed: TDS protocol endpoint is disabled for this organization https://microsoftdynamics.in/2020/05/22/connecting-ssms-to-use-sql-query-in-dynamics-365-crm-online-login-failed-tds-protocol-endpoint-is-disabled-for-this-organization/ Thu, 21 May 2020 19:12:41 +0000 http://microsoftdynamics.in/?p=3044 You can also use SQL Server Management Studio (SSMS) version 18.4 or later with the Common Data Service endpoint SQL connection to connect with Microsoft dynamics 365 CRM online. Examples of using SSMS with the SQL data connection are provided below.
Supported operations and data types

The post Connecting SSMS to use SQL Query in Dynamics 365 CRM Online – Login failed: TDS protocol endpoint is disabled for this organization appeared first on Microsoft Dynamics 365 Blog.

]]>

You can also use SQL Server Management Studio (SSMS) version 18.4 or later with the Common Data Service endpoint SQL connection to connect with Microsoft dynamics 365 CRM online. Examples of using SSMS with the SQL data connection are provided below.

Supported operations and data types when querying data from Dynamics 365 CRM online or CDS

The list of supported SQL operations includes:

  • Batch operations
  • SELECT
  • Aggregation functions (i.e., Count() and Max() functions)
  • UNIONs and JOINs
  • Filtering

STEP 1: : https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/cds-sql-queryThe following document by Microsoft and entering Credentials

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/05/img_5ec6cd66f006e.png?fit=711%2C406&ssl=1

But Not all org Connect successfully, we need to attend some prerequisites. i.e Download the OrgDBOrgSettingsTool and configure Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe.config file.

Step 2Getting Error when clicking connect Error :

——————————
ADDITIONAL INFORMATION:

Login failed: TDS protocol endpoint is disabled for this organization. For more information, please visit http://aka.ms/EnableSQLForCDS
RequestId: TDS;6d3b31e8-d260-410c-9a23-cca78cbd1795;2
Time: 2020-05-21T07:17:56.0358439Z (Microsoft SQL Server, Error: 18456)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

STEP 3:Configuring Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe.config

Follow instruction from here: https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/view-entity-data-power-bi

  1. Sign into Power Apps, and then select the appropriate environment from the top-right corner.
  2. Verify that your enviroment has version 9.1.0.17437. To do this, select the Settings gear on the toolbar, and then select Advanced Settings. Then, on the new browser tab that opens select the Settings gear on the toolbar, and then select About.
  3. Download the OrgDBOrgSettingsTool. During the download, select CRM2016-Tools-KB4046795-ENU-amd64.exe. After the download is completed, install the tool.
  4. Open the Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe.config file and make the following changes. For example, if your advanced settings environment URL is https://orgbb33fb45f.crm3.dynamics.com/main.aspx the OrgDBOrgSettingsTool_CrmDiscoveryService_CrmDiscoveryService value will be https://disco.crm3.dynamics.com/XRMServices/2011/Discovery.svc and the OrgDBOrgSettingsTool_OrgServiceUri value will be https://orgbb33fb45f.crm3.dynamics.com/XrmServices/2011/Organization.svc.
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/05/img_5ec6cd66f006e.png?fit=711%2C406&ssl=1

5. Add the following node within the <configuration> node in the Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe.config file:

  <runtime>
      <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false"/>
  </runtime>

6. Open a command window, move to the folder where the OrgDBOrgSettingsTool contents are located, and run the following command:

    • Microsoft.Crm.SE.OrgDBOrgSettingsTool Update /u <org-unique-name> EnableTDSEndpoint true
    • Replacing <org-unique-name> with Org unique name

STEP 4: ONCE ABOVE CONFIGURATION IS DONE, ITS A SUCCESSFUL CONNECTION.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/05/img_5ec6d00536c39.png?fit=1315%2C735&ssl=1

The post Connecting SSMS to use SQL Query in Dynamics 365 CRM Online – Login failed: TDS protocol endpoint is disabled for this organization appeared first on Microsoft Dynamics 365 Blog.

]]>
3044