Giulio Petrucci (sisisi (AT) nonono (DOT) boh) writes:
Quote:
I have to execute some .sql script files against a SQL Server 2008.
If I type in my command line:
sqlcmd -U ... -P ... -i my_script.sql -v var1=value1 ecc ecc
the script is executed. If I put this statement in a .bat file, the
statement isn't executed AND (and this is the weirdest part) the SQL
Servere Management Studio opens (!!) and the script code is shown inside
the query editor.
Could anyone help me? |
So how does the BAT file look like? From you description of what is
happening, it sounds as you have induced a line break in the command.
--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx