SQLCMD.exe in SQL Server 2012 does not give real-time output logging - by Zerocool18

Status : 

 


4
0
Sign in
to vote
ID 1002565 Comments
Status Active Workarounds
Type Bug Repros 2
Opened 10/16/2014 1:30:27 AM
Access Restriction Public

Description

I'm running a long-running stored procedure using sqlcmd.exe for automation purposes. However, I observed that in SQL Server 2012, sqlcmd.exe does not produce real-time logging. It displays only when all the SP is completed OR after I stop execution using CTRL+C.

I get real-time output(on screen/log) in sqlcmd.exe of SQL Server 2008.

Working :

SQLCMD.EXE -S "RemoteSQL2012Server" -d test -b -E -Q "EXEC dbo.LongRunningSP"


Not Working :

 & "E:\SQLServer2012\110\Tools\Binn\SQLCMD.EXE" -S "RemoteSQL2012Server" -d test-b -E -Q "EXEC dbo.LongRunningSP"

By "Not working", I mean that output is not real-time. Is this an issue in SQL 2008 post-versions ? Any workarounds ?

I've verified that the same issue is there in SQL2014 also.

I'm running the commands from powershell.exe. Also, tried from cmd.exe. (Running both as Admin)

Another thing, OSQL.exe does not give this problem.
Sign in to post a comment.