Wednesday, January 15, 2020

SQL Server - Running large Sql files

When we try to open a large Sql file in SQl Server, it's gives the error
"The operation could not be completed. not enough storage is available to complete this operation
The template specified cannot be found. Please check that the full path is correct"

Solution:

use the sqlcmd tool to execute the file.

To execute a SQL script:
  1. Start the Command Prompt
  2. Run the below command  

sqlcmd -S DatabaseServer -d Database -i C:\Users\Administrator\Downloads\script.sql -x


No comments: