Re: PRINT command

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 12/10/04


Date: Fri, 10 Dec 2004 12:02:42 +0100

Use RAISERROR with the NOWAIT option instead of PRINT. It will generally flush the output buffer.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"CB" <craig.bryden@derivco.com> wrote in message news:e2HyFgp3EHA.3000@TK2MSFTNGP15.phx.gbl...
> Hi
>
> I am using the PRINT command in a script. My problem is that the messages
> are only being displayed when the entire script is complete. Is there a way
> to get it to display immediately when the command has been processed?
>
> This seems to work with a lot of the system stored procedures (e.g.
> sp_UpdateStats)
>
> Any help will be appreciated
>
> Thanks
>
> Craig
>
>


Relevant Pages

  • Re: Fragmentation percentage not dropping
    ... Tibor Karaszi, SQL Server MVP ... If I run a rebuild statement, percentage's dropping. ... The script I developed uses a similar approach as this one: http://sqlfool.com/2008/11/updated-index-defrag-script-2005-2008/. ...
    (microsoft.public.sqlserver.server)
  • Re: osql :r filename
    ... An inner script called by OSQL using:r cannot contain GO, ... Tibor Karaszi, SQL Server MVP ... It will create an inner script file as sell as an outer script file and ... >> Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Wildcard in restore script
    ... >Tibor Karaszi, SQL Server MVP ... >> You can script out a routine to search the directory ... >> most recent backup file. ...
    (microsoft.public.sqlserver.programming)
  • Re: Break line inside print statement
    ... Tibor Karaszi, SQL Server MVP ... I need to break one line that im printing inside one ... script. ...
    (microsoft.public.sqlserver.server)
  • Re: Elementary T-SQL Question
    ... which makes OSQL to exit ... > the script. ... > Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)