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)

SQL Query for creating a sync query between two server.

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    You can use change tracking feature in MS CRM.

  • NILANKA SEKHAR PAUL Profile Picture
    340 on at

    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
    on at

    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.

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