Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 PRINT ?

Author  Topic 

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2005-06-08 : 16:07:02
I have the following SPROC...

CREATE PROCEDURE [dbo].[Post_Import] AS

-- Calls Spocs that should be run after data is imported. - KTB 6/8/05
-- These can be run at anytime without harm to the initial data.
-- Could take up to anhour to run.
PRINT 'Resetting Dober Formula Names to Defaults...'
EXEC Set_Dober_Formula_Codes
PRINT 'Fixing Invalid Next BOF Dates...'
EXEC Fix_Next_BOF_Dates
PRINT 'Building tables for Side-by-Side Formula Comparison...'
EXEC GenSBSTables
GO

When I EXEC Post_Import in QA, I want the PRINT statements to appear as they are occuring. Can I do that?

X002548
Not Just a Number

15586 Posts

Posted - 2005-06-08 : 16:21:35
Make sure it runs in text mode, not grid mode

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2005-06-08 : 16:24:52
And how does one determine that?
Go to Top of Page

shebert
Yak Posting Veteran

85 Posts

Posted - 2005-06-08 : 16:29:38
under the word query at the top of query analyser select print to text
Go to Top of Page

shebert
Yak Posting Veteran

85 Posts

Posted - 2005-06-08 : 16:30:55
OH yeah dont create PROC just run in query analyser
Go to Top of Page

KLang23
Posting Yak Master

115 Posts

Posted - 2005-06-08 : 17:23:02
"Print" is accumulated until the output buffer is full.
You really never get a real-time, synchronous output.

Try "RaisError". The "WITH NOWAIT" parameter forces the text out without waiting for the output buffer to fill.

The drawback is that it is limited to ~400 characters.


RAISERROR('Your Text Here', 0, 1) WITH NOWAIT
Go to Top of Page

jaymedavis
Starting Member

12 Posts

Posted - 2005-06-08 : 17:50:27
If you are just analyzing data, looks like you could look into sp_outputbuffer and DBCC OUTPUTBUFFER as well.

Jayme
Go to Top of Page

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2005-06-09 : 08:42:54
Thanks all. I thought about RaiseError and will probably try that.
Go to Top of Page
   

- Advertisement -