Getting error while running 50 MB script on SQL Server 2008 R2
sql-server-2008, sql-server-2008-r2
Solution
use the command-line tool SQLCMD which is much leaner on memory. It is as simple as:
SQLCMD -d <database-name> -i filename.sql
You need valid credentials to access your SQL Server instance or even to access a database
Problem
I am using SQL Server 2008 R2, I have a script to update the DB, that script is approx 50 MB in size and contains some about 800,000 lines. Error: TITLE: Microsoft SQL Server Management Studio Cannot execute script. ADDITIONAL INFORMATION: Insufficient memory to continue the execution of the program. (mscorlib) Can somebody please help me to run this script without getting this error?