question

EmmanuelRajuVeramati-6933 avatar image
0 Votes"
EmmanuelRajuVeramati-6933 asked CarrinWu-MSFT commented

How to run .sql files (more than 8GB) in SQL SERVER 2018 ?

Hi I am new to SQL SERVER , I used to run .sql file that is having insert statements (Size 8GB) and tried to run on SQLCMD and having syntax issues.. Kindly help me to come out from it

Tried to run below command from SQLCMD but getting syntax errors:
sqlcmd -S DESKTOP-05PQF4Q -d B2BLeadforce -i F:\Spondias\B2B_Callcenterproject\B2B Database\TransactionType -a 32767


Msg 102, Level 15, State 1, Server DESKTOP-05PQF4Q, Line 1
Incorrect syntax near 'S'.


How to run large sql file in sql server 2018..

Kindly help me

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @EmmanuelRajuVeramati-6933, we have not get a reply from you. Any update for this thread?

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

The problem seem familiar. I think I've seen people to run into this before. I don't have any 8GB file myself to try with.

I know that it is common in the MySQL world with exporting data as INSERT files, but that is not really what we do in the SQL Server world.

I think you will have to cut the file into several files, but I don't know what size you will need to keep SQLCMD from choking. You will have to experiment.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CarrinWu-MSFT avatar image
0 Votes"
CarrinWu-MSFT answered CarrinWu-MSFT edited

Hi @EmmanuelRajuVeramati-6933,

Welcome to Microsoft Q&A!

You could try to add -o that can output a file to help you debug them. Please refer to this thread.


Best regards,
Carrin


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.