July 24, 2007 at 10:22 am
I know this question has been asked but I cannot find an answer. I need to provide feedback in my script running in QA. I am using the print to show status as the script progresses thru a long loop.
The problem is that the output does not immediately show up in the messages. It seems that the output is buffered to a point and then flushed to the messages tab.
Depending on how often I request feedback and the length of the process, the feedback can come after the job is complete!
Is there a way to control this functionality?
Thanks in advance.
July 24, 2007 at 11:35 am
Use Raiserror
RAISERROR('Your message goes here',16,1) WITH NOWAIT
July 24, 2007 at 11:46 am
Thanks for the reply, 'Junkie. However, this still has the same problem of delayed feedback.
I replaced my print with raiserror ('...PROCESSED RECORD COUNT=%u', 16, 1, @counter). When I ran, it waited the entire 16 seconds while it processed the records then displayed the feedback to the messages tab.
Processing...
Server: Msg 50000, Level 16, State 1, Line 60
...PROCESSED RECORD COUNT=1000
Server: Msg 50000, Level 16, State 1, Line 60
...PROCESSED RECORD COUNT=2000
STOPPING AT MAX RECORDS=2500
DONE.
Total records processed=2500
Count successful=2500
Count failed=0
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy