How do you run an SQL script file that is located on the disk, using T-SQL?
SQL Script in SQLSERVER
hi friends,
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 9, 2011, 2:35 PM EST
you can use the following command to run the script file on disk:
sqlcmd -S myServer\instanceName -i C:\myScript.sql