Using SQL to Query CDS Data – Login failed: TDS protocol endpoint is disabled for this organization

Hi Everyone,

I was exploring on preview feature on how can we connect SQL to Dynamics Data and while connecting to CDS received below error.

“Login failed: TDS protocol endpoint is disabled for this organization.”

Follow below steps to solve it.

1) Download the OrgDBOrgSettingsTool i.e. CRM2016-Tools-KB4046795-ENU-amd64 from here and run it.

2) Change CRM URL’s and Connections in the Configuration File.

Line 17 – Discovery Service URL
Line 21 – Version like Online or OnPrem.
Line 25 – Username
Line 31 – CRM Service URL

Add below runtime tag after ApplicationSettings.

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


3) Run the below command by replacing OrgName.

Microsoft.Crm.SE.OrgDBOrgSettingsTool Update /u <OrgaName> EnableTDSEndpoint true

Hope this helps.


Happy 365’ing
Gopinath

Autogenerate GUID in SQL Table

Hi,
Today I was working on SQL Table creation and I had a requirement to generate a UniqueIdentifier automatically whenever a record is inserted into the table.

We can achieve this requirement by having Column datatype as ‘UniqueIdentifier’ and Default Value or Binding of the column property should be set to ‘newid()’

Hope this helps.

Happy Coding

Gopinath