SMO and Bulk copying

  • I've been given the task of converting our sql 2000 db/vb 6 project to .net 2/sql 2005. we have a few utilities that bulk copy tables into sql. in the old app, we were using DMO to bulk using the .ImportData method. with SMO being the new DMO, there is no .ImportData method nor seem to be any supprt for bcp objects. i've been looking to find the best solution. sqlBulkCopy is not feasible as these are huge files - ones that i would not want to read into a dataread/dataset before bulking in. the files to be imported are .txt files. if these .txt files were converted to xml, do you still need to "read these in" or can the sqlbulkcopy pull the xml file directly into sql? (from what i see this can't be done). BCP is an option, as well as the Bulk Insert (this is a little tricky because the .txt files must be placed on a shared area where in the vb 6/DMO model, they could be on a user's hard drive). so i'm researching the best scenario. can anyone comment on their experience with these options?

  • it is entirely you choice. If it is feasible for you to move test files to common shared area, load with bcp or bulk insert and then move it to archive, then i'll go for this approach rather than converting the text files to xml and then loading it into db.

  • Bulk Insert can see the files on the user desktops if the server is logged into the domain with the correct privs.

    --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)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply