SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


insert statements - multiple


insert statements - multiple

Author
Message
sqlfriends
sqlfriends
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13484 Visits: 4222
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
demonfox
demonfox
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2397 Visits: 1192
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
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)

Group: General Forum Members
Points: 116888 Visits: 39107
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.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (263K reputation)SSC Guru (263K reputation)SSC Guru (263K reputation)SSC Guru (263K reputation)SSC Guru (263K reputation)SSC Guru (263K reputation)SSC Guru (263K reputation)SSC Guru (263K reputation)

Group: General Forum Members
Points: 263307 Visits: 42183
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
sqlfriends
sqlfriends
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13484 Visits: 4222
This reminds me, now I try to use:

Insert into...
Select * from another table

This makes it run very fast.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search