April 1, 2020 at 4:19 pm
Hi
Please excuse me if this is a basic question,
I have been given a .sql file which has a script to create and insert data into a table. The script around 100,000 records in it.
Most of the content is in the form
'Insert into table ....'
'insert into table ...'
GO
Insert into table ....'
'insert into table ...'
I am using the SQLCmd utility to execute this script , and it seems to be giving errors at different stages trying to insert data.
It does appear the data size and number of rows is impacting how things work, as the same works fine for smaller amount of data ( in size and number of rows)
1 ) Is there a better way to do this, by supplying some kind of parameter to SQLCmd ?
2) Any other way to execute a giant SQL script, with Lot of data , without erroring out ?
Thanks for any pointers
Best Regards
April 1, 2020 at 6:19 pm
What are the exact errors that you're seeing? (Copy'n'Paste, please)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 1, 2020 at 6:19 pm
What are the errors you receive with the large script?
April 6, 2020 at 2:08 pm
The table contains error message numbers and the description, which is the text of the error message from the sys.messages catalog view. Where applicable, the error number is a link to further information DGCustomerFirst
April 6, 2020 at 2:14 pm
The table contains error message numbers and the description, which is the text of the error message from the sys.messages catalog view. Where applicable, the error number is a link to further information.
Even if that did apply here (pretty sure it doesn't because SQLCmd writes errors to the screen unless directed to write them to a table or file), we're asking the OP to copy'n'paste the errors they're getting so we can actually help the OP figure out what's going wrong.
Based on the over-generalized nature of your post, I'm thinking that a SPAM test was just completed.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply