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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Query CRM database with SQL syntaxis

(0) ShareShare
ReportReport
Posted on by 8,270

Hi guys,

I'm adding a lot of customization and records to the system and every time I need to check if everything is ok, I have to request for a database backup, mount it locally and then use SQL Server to check all information.

Is there a way I can query the CRM database with the real data? If I can connect to the CRM using visual studio (SSRS) maybe I can query the database?

I can't do it using SDK because there I can query only using fetchXML or LinQ, but I need "grouping" and "having" to do my checklist.... any ideas please?

Regards,

Raul

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi Raul,

    Unfortunately there is no way of querying the Dynamics CRM Online database using SQL because of security restrictions. You might look to use SSIS to copy your database to a local database (www.kingswaysoft.com/.../ssis-integration-toolkit-for-microsoft-dynamics-crm) or using Power Query to query the data.

    Hope this helps,

    Scott

  • RaulOcana Profile Picture
    8,270 on at

    Hi Scott,

    How could I copy my CRM database please? It is possible to only get a couple of entities, I don't need the whole database.

    Thanks,

    Raúl

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    Hi Raul,

    Refer the following links:

    survivingcrm.com/.../creating-a-copy-of-your-production-crm-database

    stackoverflow.com/.../how-to-copy-the-entire-db-in-crm-dynamics

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • RaulOcana Profile Picture
    8,270 on at

    Hi Raj,

    I have an Online CRM Server

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    I would use Kingswaysoft's SSIS Toolkit to extract the data into a local SQL Server.

    www.kingswaysoft.com/.../ssis-integration-toolkit-for-microsoft-dynamics-crm

    Hope this helps

    Scott

  • RaulOcana Profile Picture
    8,270 on at

    That's it, thanks Scott.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans