To be able to run big sql files you can use sqlcmd.exe
which is located on:
C:\Program Files\Microsoft SQL Server\100\Tools\Binn
Example
SQLCMD -S SERVERNAME\INSTANCE -P Password -U Username -i C:\sample.sql -o C:\output.txt
For SQL 2014 the directory of sqlcmd.exe has changed:
<INSTALL DIRECTORY> \Client SDK\ODBC\110\Tools\Binn
which is located on:
C:\Program Files\Microsoft SQL Server\100\Tools\Binn
Example
SQLCMD -S SERVERNAME\INSTANCE -P Password -U Username -i C:\sample.sql -o C:\output.txt
For SQL 2014 the directory of sqlcmd.exe has changed:
<INSTALL DIRECTORY> \Client SDK\ODBC\110\Tools\Binn