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

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

Hello everyone, I am going to share an interesting and very challenging task.

Today's I execute a SQL Script in my SQL Server 2012. This SQL script have data around 5GB. Actually, script contain the schema and data both. When I executing this script in the Transact-SQL, I getting an error. 



I tried so may type of mechanism to resolve and now, I finally resolved this issue.

Steps are as given below.

1.       Open the cmd.exe as Administrator.
2.       Create the Documents directory.
3.       Put your SQL Script  file in the documents folder.
4.       Type the query with sqlcmd, server name, database name and script file name as like below T-SQL query.

Transact-SQL command Query

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

My Transact-SQL command Query


              server-name = > VIASERVER
              database-name  => Test
              script-file-name => xyz.sql


The SQLCMD used Utility as given below.

1.       The sqlcmd is use to provide the connectivity with MSSQL Server and sqlcmd commands must be the first statement on a line.
2.       The (-S) identifies the instance of MSSQL Server.
3.       The (-d) identifies the database name.
4.       The (-i) identifies the sql script file.

The solution of this issues  as given below steps and video.

The reference video for the same as given below.





For more reference links.



I think It might help you! Thank you!

ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

Cannot execute script. Insufficient memory to continue the execution of the program. Cannot execute script. Insufficient memory to continue the execution of the program. Reviewed by Anil Singh on 2:05 AM Rating: (5)
www.code-sample.com/. Powered by Blogger.
^