Recently we were trying out the preview feature of using SQL to query CDS data.
Below are the steps à
To get started,
Download or open SQL Server Management Studio (18.4 or later)
Use Azure Active Directory authentication to connect.
Specify the organization address URL followed by port 5558 in the server name.
If you get the error “TDS protocol endpoint is disabled for this organization”, follow the below steps to enable the TDS i.e. Tabular Data Stream.
Enable the TDS endpoint (preview)
Download the OrgDBOrgSettingsTool i.e. CRM2016-Tools-KB4046795-ENU-amd64
Make the following changes in the configuration file of the tool
Highlighted in green
Run the below command (& enter the password for the admin account specified)
Microsoft.Crm.SE.OrgDBOrgSettingsTool Update /u <org-unique-name> EnableTDSEndpoint true
Get the organization unique name from Customization à Developer Resources
After making the above changes, we were able to connect successfully.
This is a definitely one of the most pleasing additions to the product !
Also check out the wonderful XrmToolBox plugin SQL 4 CDS
for running SQL query against Dynamics 365.
Hope it helps..