How do you run an SQL script file that is located on the disk, using T-SQL?
SQL Script in SQLSERVER
hi friends,
How do you run an SQL script file that is located on the disk, using T-SQL?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Javeed M ShaikhPosted Nov 9, 2011, 7:35 PM
you can use the following command to run the script file on disk:
sqlcmd -S myServer\instanceName -i C:\myScript.sql