How do I flush the PRINT buffer in TSQL?

I have a very long-running stored procedure in SQL Server 2005 that I’m trying to debug, and I’m using the ‘print’ command to do it. The problem is, I’m only getting the messages back from SQL Server at the very end of my sproc – I’d like to be able to flush the message buffer and see these messages immediately during the sproc’s runtime, rather than at the very end.

6 Answers
6

Leave a Comment