• jcasement (5/31/2013)


    While it offers a very brief sample to get going fast it should at least list other alternatives since some of them are quite nice. Readers need to be aware of as many alternatives as possible since some technologies have size and performance limitations.

    I load massive XML files with SQLXMLBulkload:

    Just supply a connection string, a XSD and the XML file and you can load directly into any table.

    and it even supports an error log should anything go wrong and you can control it from a client whether it be C# or just a simple VBS like below:

    Dim objBL

    set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0")

    objBL.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=dbo_Dfrndis;Password=abc1234;Initial Catalog=frndis;Data Source=sqldev"

    objBL.ErrorLogFile = "C:\MSSQL\clients\INTLdist\CRD\XLT\error.xml"

    objBL.Execute "CRD.xsd", "CRD20130429122127010074ToCRD-2013-05-01_02-59-43-PM.xml"

    set objBL=Nothing

    Sid

    What's the largest file you've loaded with it? And I hope the connection string you just posted doesn't actually contain valid login info.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)