How can I connect to MS Dynamics 365 CRM with SSMS

3.2k Views Asked by At

I'm trying to connect to MS Dynamics 365 CRM with SQL Server Management Studio. After lots of researching I can't find any solution that how can I connect database.

2

There are 2 best solutions below

0
marc_s On BEST ANSWER

You can connect to Dynamics365 (at least when it's "in the cloud") using SSMS following this recipe here:

https://markcarrington.dev/2020/05/13/cds-t-sql-endpoint-pt-1-connecting/

Basically, you need to explicitly enable the TDS endpoint in the Power Platform admin area and then use yourcrm.crm.dynamics.com,5558 as the server/instance name, and some Azure Active Directory authentication scheme to connect.

0
jasonscript On

Depending on what you're trying to do with SQL, you can also use the SQL 4 CDS plugin for the XRM Toolbox

More information on the SQL 4 CDS plugin is available here

SQL 4 CDS allows you to use standard SQL syntax to query and manipulate your data and metadata in CDS / D365.

Supports

  • SELECT
  • INSERT
  • UPDATE
  • DELETE

Where possible the queries are converted to FetchXML, allowing you to generate FetchXML queries for plugins or integrations by writing familiar SQL and converting it.

Using the preview T-SQL endpoint, SELECT queries can also be run that aren't convertible to FetchXML.


EDIT I just realised that the author of this plugin is the same as the author of the article in the other answer