Comments
 
posted on August 9th 2017, at 12:20
by lunarg

You can easily run Transact-SQL (T-SQL) script files (with extension .sql) via the commandline utility sqlcmd:

sqlcmd -S Server\Instance -i C:\path\to\SomeScript.sql

By default, the output is written to the command prompt. You can also save the output to a file:

sqlcmd -S Server\Instance -i C:\path\to\SomeScript.sql -o C:\path\to\TheOutput.txt

Note that when using this, no output is written in the command prompt window.

 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« I needed a password with eight characters so I picked Snow White and the Seven Dwarves. »