none
Exporting records from database to xml RRS feed

  • Question

  • Hi Frens,

    I have a huge data like 2,00,000 records in my sql server database i need to export all the data to my xml file in a single shot...with using data table and it should be splited in to equal parts of xml files( for example if there is 15000 records it should be splited into 5000*3 records in 3 xml files )please help me out of this problem....

     

    Thanks in advance


    Sarath Sannadi Sharepoint Dev at Saksoft
    • Moved by SamAgain Monday, October 11, 2010 3:23 AM better fit (From:.NET Base Class Library)
    Friday, October 8, 2010 12:33 PM

Answers

All replies

  • Hi.

    My suggestion:

    1. Paging records with Row_Number() example

    2. Next select records with FOR XML Clause definition

    Other solution is to use BCP utility 

     

    Regards Grzegorz

    • Marked as answer by sarath sannadi Wednesday, October 13, 2010 11:28 AM
    Monday, October 11, 2010 1:55 PM
  • One more solution would be to use DataReader instead of DataAdapter and construct XML on the fly after each record is fetched. It is more work, but you will avoid loading all the records into DataSet and may work much faster due to the fact that it does not require same amount of memory as DataSet


    Val Mazur (MVP) http://www.xporttools.net
    Tuesday, October 12, 2010 10:03 AM
    Moderator