2
votes
1answer
120 views

FOR XML is generating a empty first line

I'm parsing with flash a XML file generated by this code: :XML ON USE MyDatabaseName GO SET NOCOUNT ON SELECT * FROM ProgramacionDia as programa order by hora FOR XML AUTO, ROOT ('toflash'), ...
2
votes
1answer
582 views

Sql Server 2005 - sqlcmd with output to shell and file

I do some command line batch (.bat) with sqlcmd as this way: sqlcmd -i Scripts\STEP01.sql -o PROCESS.log -S MYSERVER -E -d MYDATABASE and i need an output file (it's works currently) and also the ...
4
votes
1answer
1k views

sqlcmd to run large SQL file causes high CPU usage

I am using sqlcmd.exe to run a large SQL script, and the server CPU usage has been at 100% for the past 5 hours. The SQL script file has a size of 156 MB. I am running the script on SQL Server 2005. ...
2
votes
1answer
131 views

SQLCMDMODE from SSMS. Can I set -b mode when using :r to include files?

As far as I read msdn there is no variable that corresponds to the -b flag of the command (on error batch abort). I found no to enable this mode inside a script when running in sqlcmd mode. Is there ...
10
votes
6answers
680 views

Did anybody use sqlcmd mode in practice? [closed]

SQLServer 2005 introduced something called SQLCMD Mode msdn link. At first glance this mode adds variable subsitution from command line batch files, and some escaping to OS commands. Is this ...