Search code examples
sqlt-sqlsql-server-2012

Cannot execute script: Insufficient memory to continue the execution of the program


I have a 123MB sql file which I need to execute in my local PC. But I am getting

Cannot execute script: Insufficient memory to continue the execution of the program

enter image description here

How to solve this issue?


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

    Taken from here.