Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 846
Imran Qadir Baksh - Baloch Avatar asked Jul 29 '13 07:07

Imran Qadir Baksh - Baloch


People also ask

How do I run a script in SQL Server Management Studio?

Click Query > Connection > Connect to connect to the server that contains the database you want to access. Select the appropriate StarTeam Server database. Open the tuning script, by choosing File > Open > foldername\scriptname. Execute the script, by clicking the Execute button on the toolbar or by pressing F5.


2 Answers

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.

like image 98
Thangamani Palanisamy Avatar answered Oct 17 '22 06:10

Thangamani Palanisamy


It might help you! Please see below steps.

sqlcmd -S server-name -d database-name -i script.sql

  • Open cmd.exe as Administrator.
  • Create Documents directory.
  • Put your SQL Script file(script.sql) in the documents folder.
  • Type query with sqlcmd, server-name, database-name and script-file-name as like above highlighted query or below command line screen.

enter image description here

like image 41
Anil Singh Avatar answered Oct 17 '22 06:10

Anil Singh