I have a generated script of a database which is 477 mb. When I try to run it on SSMS I have an "insufficient memory to continue the execution of the program" error. After searching around the web I found that I can use sqlcmd to run the script.
When I type
1>SQLCMD -S "FHMDEV1 -d UndNetTest - E -i D:\Script.sql
2>GO
I get a Incorrect Syntax near 'S' error. I can't understand what I'm doing wrong. Can anyone help me?
Your SqlCmd is trying to connect to the database UndnetTest, yet you are creating the database in the script. The error message does not appear to be related to that, even if you fix the current error, you will get another error message. If the UndnetTest database already exists, connection will succeed, but then it will fail on your create statement. If that database does not exist, your connection attempt would fail.