insert statements - multiple

  • I have build database script, and one part of them is to insert data, so I have multiple insert statements 300000 records, it runs on and on,

    and later gives an error:

    HResult 0xE9, Level 16, State 1

    Shared Memory Provider: No process is on the other end of the pipe.

    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Communication link failure.

    Is there a limitation of records? what does this message mean?

    If I run it directly in SSMS, just a few records, it is OK, but if all of them,

    it gives an error

    insufficient memory to continue the execution of the program sql server 2008

    Is there another option to insert these records, I know SSIS, but for this, because it is using a build script, so SSIS will not work.

    Thanks

    Thanks

  • Ya i faced the same issue while creating a one time script . Since it was meant for another team , so I just had it executed in 5000 records batch..

    it could be a workaround..

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm:

  • Try running the script using sqlcmd. I have had this same issue with a few rather large scripts. Wouldn't run in SSMS but ran fine when I ran it from the command line using sqlcmd.

  • I don't know what the data looks like in the file but why not just use BULK INSERT?

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

  • This reminds me, now I try to use:

    Insert into...

    Select * from another table

    This makes it run very fast.

Viewing 5 posts - 1 through 4 (of 4 total)

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