How to run sql script file from Command prompt

How to run sql script file from Command prompt

How to run sql script file from Command prompt

 

if we run big  file of sql script in query window it gives error of time out or short of memory.

 

Solution

Run the script file

  • a) Open a command prompt window.
  • b) In the Command Prompt window, type: sqlcmd -S myServer\instanceName -i C:\myScript.sql.
  • c) Press ENTER.

Open command prompte

copy below lines and job done

sqlcmd -S WIN-RK94DR962EH -i C:\nesdb2019.sql

 

 

By  asifjans    03-Feb-2019

Solutions and sugestions


Your Answer