How to run sql script file from Command prompt

  By Junaid A   Posted on February-03-2019 

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 Views  1197



Comments


Your Comments

You may also read following recent articles