I have a 4GB sql data script of my database. I want to execute it but SQL Server Management Studio does allow me to do it because it’s a very big file.
So I want to split this file into smaller files so that I can execute it. I have googled it but didn’t get any good solutions. I have also used HJSplit to split the files but only first split file is in correct format but others are not in correct format due to which can not be execute in SQL query Interface.
Please help me guys how can I execute this .sql file with data with or without splitting?
use the sqlcmd tool to execute the file..
or
Just replace with the location of your SQL box and with the name of your script. Don’t forget if you’re using a SQL instance the syntax is:
sqlcmd -S \instance.
Here is the list of all arguments you can pass sqlcmd: