Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

SQL Query for creating a sync query between two server.

Posted on by 340

Hi All,

I have two server (A and B). I have a CRM database on Server A. but i want to use the database on Server B. I can use database by Sql import/Export but i need a problem. When i import/Export the database on that time the database on both server are equal. But after some time if write any sql query on Server A for that databse then its value is increasing as it is a production database so all the entry done into it. But i need that, there have to be a sql query that i change into procedure and further into a job for the syncing purpose that only checks what are the new values come in Server A that need to be sync with server B.

I need the sql query for mscrm tables for checking the difference of data between two server and update the dissimilar values into Server B.

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SQL Query for creating a sync query between two server.

    To do it using SQL, I think you will have to use SSIS packages and schedule a job which will run every day, check for the differences and then update the same in server B. I don't think you will be able to do it using just the sql queries.

    Also, as I suggested earlier, you can enable change tracking on entities you want to integrate with server B, create a console application (schedule this app to run daily) and use change tracking feature of CRM to get only that data which has been updated and save it on server B.

  • RE: SQL Query for creating a sync query between two server.

    I have to sync data from server A to Server B. Kinndly provide me with some example of how i write a sql query.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SQL Query for creating a sync query between two server.

    You can use change tracking feature in MS CRM.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans