There are several methods you are use. The easiest and most common would be to open the SQL Server Management Studio on the server or your workstation and open the file in that. This is the native editor for editing SQL Server scripts. Then click on the Execute button at the top, or press the F5 key, <CTRL> X, or <CTRL> E. This will run the script against what ever SQL Server you are connected to.
You can also run scripts from the command line by using the sqlcmd command line utility and passing it either the script via the -Q or -q switches (they are different) or the -i switch to give it a file to get the script from.
Last Wiki Answer Submitted: January 7, 2009 8:28 pm by Denny Cherry64,520 pts.
All Answer Wiki Contributors: Denny Cherry64,520 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Can you explain the last paragraph clearly. Thanks!
Kavi
This should help:
sqlcmd Utility Tutorial