web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Querying DYNAMIC with SQL

(0) ShareShare
ReportReport
Posted on by 155

Good morning,

 I'm trying to figure out a way to link Microsoft Dynamic 2013 online to SQL Server 2008 R2 so that I can query it using SQL.  I was wondering what methods the community has tried. I'm not looking at reinventing the wheel, I'm looking for a way to query data as it comes in an easy fashion. Does anybody have any recommendations? 

Thanks for the help, I'm new to Microsoft Dynamics.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Wayne Walton Profile Picture
    13,730 on at

    This is explicitly not supported with Dynamics CRM.  Don't use direct SQL queries, use the API.  It ensures you don't have to deal with things like entities with multiple tables, and it also ensures that all queries and reports adhere to the correct data structure.

    Now if you're looking to pull a subset of CRM data into a database for other purposes, such a data warehousing and cubing, then you'd still want to use the API to pull the data to the warehouse, but then you can do SQL queries against that.

  • Suggested answer
    Mithilesh Kumar Profile Picture
    10,047 on at

    Hi Rob,

    I don't think it is possible to link a SQL Server on premise to Microsoft Dynamics CRM Online.

    Dynamics CRM installs on top of SQL Server, hence for existing CRM instance which is online you cannot change the database which is on premise.

    Hope that helps

    Thanks

  • Rob B Profile Picture
    155 on at

    How would I use the API? Could you please send me a link to what you are talking about Wayne?

  • Verified answer
    Wayne Walton Profile Picture
    13,730 on at

    So here's a link to the SDK:  www.microsoft.com/.../details.aspx

    That has a good help file in it that will walk you through how to connect to a CRM instance via the API, and how to structure queries to get data out of CRM.  Fundamentally it's going to work a lot like a SQL query, but you're (most likely) going to use C# or JavaScript instead.

  • Verified answer
    Mithilesh Kumar Profile Picture
    10,047 on at

    Rob,

    The API's are available under the Developers Resource under Settings >> Customizations >> Developers Resource.

    As already mentioned by Wayne, direct access / modifications to records, table properties, writing Stored Procedures to SQL Database in MS CRM is considered as unsupported customizations.

    Hope that helps

    Thanks

  • Rob B Profile Picture
    155 on at

    Thanks for the help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans