locked
Best way to fetch data from CRM RRS feed

  • Question

  • i am writing a service in C# which needs to fetch data from CRM and then store that data on another DB for some purpose. currently I am making use of CRmService.Fetch method which returns data in XMl format, but I would like to know is there any better was to fetch data from CRM as I am expecting no of records to be in millions in future.
    KV
    Friday, August 21, 2009 5:46 AM

Answers

  • Hey

    If you are fetching millions of records from CRM, I would recommend that you look at fetching the records directly from the CRM SQL Server database.

    The database schema is quite simple to navigate, and offers quite good views.

    As an example, a query to extract all the Account records from your CRM database can be as simple as :-

    SELECT * --insert desired columns here
    FROM Account
    WHERE DeletionStateCode = 0.

    I would imagine a direct extract from the database for > 1000000 records is going to be a lot faster than extracting that many records via the crm web service.

    Of course, it depends on your requirements. But it's worth looking at a direct database extract for that many records one would think.

    The CRM entities in almost every case, have an associated view in the database that you can extract directly from, with no complex joins or code required.

    Regards

    Josh
    Friday, August 21, 2009 6:01 AM

All replies

  • Hey

    If you are fetching millions of records from CRM, I would recommend that you look at fetching the records directly from the CRM SQL Server database.

    The database schema is quite simple to navigate, and offers quite good views.

    As an example, a query to extract all the Account records from your CRM database can be as simple as :-

    SELECT * --insert desired columns here
    FROM Account
    WHERE DeletionStateCode = 0.

    I would imagine a direct extract from the database for > 1000000 records is going to be a lot faster than extracting that many records via the crm web service.

    Of course, it depends on your requirements. But it's worth looking at a direct database extract for that many records one would think.

    The CRM entities in almost every case, have an associated view in the database that you can extract directly from, with no complex joins or code required.

    Regards

    Josh
    Friday, August 21, 2009 6:01 AM
  • You can use Data Migration Manager too.

    Friday, August 21, 2009 6:37 AM
  • There are the filtered views.

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog
    http://leontribe.blogspot.com/
    or hear me tweet @leontribe

    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
    • Proposed as answer by Leon TribeMVP Friday, August 21, 2009 1:40 PM
    Friday, August 21, 2009 1:40 PM