Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL script too large can not open in SQL Server

Tags:

sql

sql-server

I have a SQL script file that has size of 3.55 GB. When I try to open it in SQL Server, I get an error

System.outOfMemoryException

I have only script option to import data because in my local PC I have SQL Server 2012 and in my live domain I have SQL Server 2008 R2 so I generated SQL Server 2008 R2 scripts with data.

Can any one help me with this?

like image 361
raja atif Avatar asked Dec 12 '25 16:12

raja atif


1 Answers

To run this large script file, you should look at the SQLCMD command-line utility provided with SQL Server.

It should be able to handle even very large scripts indeed.

If that doesn't work, then you'd need to make sure to create multiple, smaller scripts to handle the work

like image 109
marc_s Avatar answered Dec 15 '25 07:12

marc_s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!