Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
insert statements - multiple
insert statements - multiple
Rate Topic
Display Mode
Topic Options
Author
Message
sqlfriends
sqlfriends
Posted Friday, October 05, 2012 5:34 PM
SSCommitted
Group: General Forum Members
Last Login: Yesterday @ 4:36 PM
Points: 1,599,
Visits: 2,773
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
Post #1369349
demonfox
demonfox
Posted Friday, October 05, 2012 10:25 PM
Ten Centuries
Group: General Forum Members
Last Login: Saturday, May 18, 2013 6:46 PM
Points: 1,074,
Visits: 1,076
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
Post #1369383
Lynn Pettis
Lynn Pettis
Posted Friday, October 05, 2012 11:43 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 8:06 AM
Points: 21,596,
Visits: 27,416
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.
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)
Post #1369385
Jeff Moden
Jeff Moden
Posted Saturday, October 06, 2012 1:43 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 6:23 AM
Points: 32,903,
Visits: 26,784
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 "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1369458
sqlfriends
sqlfriends
Posted Monday, October 08, 2012 4:10 PM
SSCommitted
Group: General Forum Members
Last Login: Yesterday @ 4:36 PM
Points: 1,599,
Visits: 2,773
This reminds me, now I try to use:
Insert into...
Select * from another table
This makes it run very fast.
Post #1370096
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.