web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Rob B Profile Picture
    155 on at
    RE: Querying DYNAMIC with SQL

    Thanks for the help.

  • Verified answer
    Mithilesh Kumar Profile Picture
    10,047 on at
    RE: Querying DYNAMIC with SQL

    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

  • Verified answer
    Wayne Walton Profile Picture
    13,728 on at
    RE: Querying DYNAMIC with SQL

    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.

  • Rob B Profile Picture
    155 on at
    RE: Querying DYNAMIC with SQL

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

  • Suggested answer
    Mithilesh Kumar Profile Picture
    10,047 on at
    RE: Querying DYNAMIC with SQL

    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

  • Suggested answer
    Wayne Walton Profile Picture
    13,728 on at
    RE: Querying DYNAMIC with SQL

    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.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans