Showing posts with label buffer. Show all posts
Showing posts with label buffer. Show all posts

Tuesday, March 27, 2012

Foreach Loop, Data Flow task buffer failed

I have a package that runs fine by itself.But when I run it inside a Foreach Loop container on a parent package, I got a buffer error after a few loops.Here are a couple of the error lines:

A buffer failed while allocating 49085616 bytes.

The attempt to add a row to the Data Flow task buffer failed with error code 0x8007000E.

I already played around with the Data Flow task’s DefaultBufferMaxRows and DefaultBufferSize properties, and I am still getting the error. Just wondering if there is a memory leak or something with the Foreach Loop task.I haven’t install SP1.Maybe SP1 fixes this issue?

Could be that not the Foreach loop itself is leaking, rather one or multiple components inside that dataflow were the culprit.

I highly recommend you install SP1 to see whether that helps, since I know there were some memory issues addressed in SP1.

thanks

wenyang

|||I have SP1 installed and I have a similar issue. I do not get an error but the DataFlow hangs at 33 in OnProgress/Pre-execute event (Datacode=33 in sysdtslog90). My package executes another package from within the 'ForEach' loop. The child package contains the DataFlow task. When I run the child package standalone (i.e. not from the parent package containing the 'ForEach' loop) with the same variables as in the parent, the DataFlow works fine.

Foreach Loop, Data Flow task buffer failed

I have a package that runs fine by itself.But when I run it inside a Foreach Loop container on a parent package, I got a buffer error after a few loops.Here are a couple of the error lines:

A buffer failed while allocating 49085616 bytes.

The attempt to add a row to the Data Flow task buffer failed with error code 0x8007000E.

I already played around with the Data Flow task’s DefaultBufferMaxRows and DefaultBufferSize properties, and I am still getting the error. Just wondering if there is a memory leak or something with the Foreach Loop task.I haven’t install SP1.Maybe SP1 fixes this issue?

Could be that not the Foreach loop itself is leaking, rather one or multiple components inside that dataflow were the culprit.

I highly recommend you install SP1 to see whether that helps, since I know there were some memory issues addressed in SP1.

thanks

wenyang

|||I have SP1 installed and I have a similar issue. I do not get an error but the DataFlow hangs at 33 in OnProgress/Pre-execute event (Datacode=33 in sysdtslog90). My package executes another package from within the 'ForEach' loop. The child package contains the DataFlow task. When I run the child package standalone (i.e. not from the parent package containing the 'ForEach' loop) with the same variables as in the parent, the DataFlow works fine.

Monday, March 26, 2012

Forcing display of QA's buffer

How can I force the contents of Query Analyzer's buffer to display to the
screen?
A stored proc has some debug PRINT statements in it. The proc takes a long
time to execute and the PRINT statements don't display until execution is
complete.
Is it possible to force them to display immediately? If so, how?How about RAISERROR WITH NOWAIT? Watch the messages pane:
PRINT 'foo'
WAITFOR DELAY '00:00:05'
GO
RAISERROR('foo', 11, 1) WITH NOWAIT
WAITFOR DELAY '00:00:05'
GO
http://www.aspfaq.com/
(Reverse address to reply.)
"Dave" <dave@.nospam.ru> wrote in message
news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> How can I force the contents of Query Analyzer's buffer to display to the
> screen?
> A stored proc has some debug PRINT statements in it. The proc takes a
long
> time to execute and the PRINT statements don't display until execution is
> complete.
> Is it possible to force them to display immediately? If so, how?
>|||Thanks Aaron
That works and it also prints out any unprinted PRINT statements previous to
the RAISERROR.
THe red error messages are a distraction but I can live with that.
Thank you.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>
> PRINT 'foo'
> WAITFOR DELAY '00:00:05'
> GO
> RAISERROR('foo', 11, 1) WITH NOWAIT
> WAITFOR DELAY '00:00:05'
> GO
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Dave" <dave@.nospam.ru> wrote in message
> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> > How can I force the contents of Query Analyzer's buffer to display to
the
> > screen?
> >
> > A stored proc has some debug PRINT statements in it. The proc takes a
> long
> > time to execute and the PRINT statements don't display until execution
is
> > complete.
> >
> > Is it possible to force them to display immediately? If so, how?
> >
> >
>|||Even better, use a severity of 10 or lower to emulate what PRINT does (i.e.,
no error condition raised)...
--
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>
> PRINT 'foo'
> WAITFOR DELAY '00:00:05'
> GO
> RAISERROR('foo', 11, 1) WITH NOWAIT
> WAITFOR DELAY '00:00:05'
> GO
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Dave" <dave@.nospam.ru> wrote in message
> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> > How can I force the contents of Query Analyzer's buffer to display to
the
> > screen?
> >
> > A stored proc has some debug PRINT statements in it. The proc takes a
> long
> > time to execute and the PRINT statements don't display until execution
is
> > complete.
> >
> > Is it possible to force them to display immediately? If so, how?
> >
> >
>|||Good point, just in the habit of using 11.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:egrs6xbHFHA.720@.TK2MSFTNGP10.phx.gbl...
> Even better, use a severity of 10 or lower to emulate what PRINT does
(i.e.,
> no error condition raised)...
> --
> Adam Machanic
> SQL Server MVP
> http://www.sqljunkies.com/weblog/amachanic
> --
>
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> > How about RAISERROR WITH NOWAIT? Watch the messages pane:
> >
> >
> > PRINT 'foo'
> > WAITFOR DELAY '00:00:05'
> > GO
> > RAISERROR('foo', 11, 1) WITH NOWAIT
> > WAITFOR DELAY '00:00:05'
> > GO
> >
> >
> > --
> > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >
> >
> > "Dave" <dave@.nospam.ru> wrote in message
> > news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> > > How can I force the contents of Query Analyzer's buffer to display to
> the
> > > screen?
> > >
> > > A stored proc has some debug PRINT statements in it. The proc takes a
> > long
> > > time to execute and the PRINT statements don't display until execution
> is
> > > complete.
> > >
> > > Is it possible to force them to display immediately? If so, how?
> > >
> > >
> >
> >
>|||> THe red error messages are a distraction but I can live with that.
Just follow Adam's advice and lower the severity level.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Dave" <dave@.nospam.ru> wrote in message news:emHu5xbHFHA.3780@.TK2MSFTNGP10.phx.gbl...
> Thanks Aaron
> That works and it also prints out any unprinted PRINT statements previous to
> the RAISERROR.
> THe red error messages are a distraction but I can live with that.
> Thank you.
>
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
>> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>>
>> PRINT 'foo'
>> WAITFOR DELAY '00:00:05'
>> GO
>> RAISERROR('foo', 11, 1) WITH NOWAIT
>> WAITFOR DELAY '00:00:05'
>> GO
>>
>> --
>> http://www.aspfaq.com/
>> (Reverse address to reply.)
>>
>>
>> "Dave" <dave@.nospam.ru> wrote in message
>> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
>> > How can I force the contents of Query Analyzer's buffer to display to
> the
>> > screen?
>> >
>> > A stored proc has some debug PRINT statements in it. The proc takes a
>> long
>> > time to execute and the PRINT statements don't display until execution
> is
>> > complete.
>> >
>> > Is it possible to force them to display immediately? If so, how?
>> >
>> >
>>
>|||Got it.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uj4f94bHFHA.3624@.tk2msftngp13.phx.gbl...
> > THe red error messages are a distraction but I can live with that.
> Just follow Adam's advice and lower the severity level.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Dave" <dave@.nospam.ru> wrote in message
news:emHu5xbHFHA.3780@.TK2MSFTNGP10.phx.gbl...
> > Thanks Aaron
> >
> > That works and it also prints out any unprinted PRINT statements
previous to
> > the RAISERROR.
> >
> > THe red error messages are a distraction but I can live with that.
> >
> > Thank you.
> >
> >
> > "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> > news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> >> How about RAISERROR WITH NOWAIT? Watch the messages pane:
> >>
> >>
> >> PRINT 'foo'
> >> WAITFOR DELAY '00:00:05'
> >> GO
> >> RAISERROR('foo', 11, 1) WITH NOWAIT
> >> WAITFOR DELAY '00:00:05'
> >> GO
> >>
> >>
> >> --
> >> http://www.aspfaq.com/
> >> (Reverse address to reply.)
> >>
> >>
> >>
> >>
> >> "Dave" <dave@.nospam.ru> wrote in message
> >> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> >> > How can I force the contents of Query Analyzer's buffer to display to
> > the
> >> > screen?
> >> >
> >> > A stored proc has some debug PRINT statements in it. The proc takes
a
> >> long
> >> > time to execute and the PRINT statements don't display until
execution
> > is
> >> > complete.
> >> >
> >> > Is it possible to force them to display immediately? If so, how?
> >> >
> >> >
> >>
> >>
> >
> >
>|||did you try using "results in text" instead of "results in grid"?
Dave wrote:
> How can I force the contents of Query Analyzer's buffer to display to the
> screen?
> A stored proc has some debug PRINT statements in it. The proc takes a long
> time to execute and the PRINT statements don't display until execution is
> complete.
> Is it possible to force them to display immediately? If so, how?|||SQL Server doesn't send its output to the client immediately as it is generated by the engine. This
is to consume less network resources. And this is the reason why we don't see things like PRINT
immediately after they have been performed. SQL Server will wait until its output buffer is full, or
until the batch has ended. The trick with RAISERROR and NOWAIT is that it forces SQL Server to flush
the output buffer.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"ch" <ch@.dontemailme.com> wrote in message news:42237E8F.7DC18B52@.dontemailme.com...
> did you try using "results in text" instead of "results in grid"?
>
> Dave wrote:
>> How can I force the contents of Query Analyzer's buffer to display to the
>> screen?
>> A stored proc has some debug PRINT statements in it. The proc takes a long
>> time to execute and the PRINT statements don't display until execution is
>> complete.
>> Is it possible to force them to display immediately? If so, how?|||> The trick with RAISERROR and NOWAIT is that it forces SQL Server to flush
> the output buffer.
Right, this is why you usually see the PRINT and the RAISERROR come to the
messages pane at roughly the same time, even if the PRINT is issued before a
delay and the RAISERROR comes after.
--
http://www.aspfaq.com/
(Reverse address to reply.)

Forcing display of QA's buffer

How can I force the contents of Query Analyzer's buffer to display to the
screen?
A stored proc has some debug PRINT statements in it. The proc takes a long
time to execute and the PRINT statements don't display until execution is
complete.
Is it possible to force them to display immediately? If so, how?
How about RAISERROR WITH NOWAIT? Watch the messages pane:
PRINT 'foo'
WAITFOR DELAY '00:00:05'
GO
RAISERROR('foo', 11, 1) WITH NOWAIT
WAITFOR DELAY '00:00:05'
GO
http://www.aspfaq.com/
(Reverse address to reply.)
"Dave" <dave@.nospam.ru> wrote in message
news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> How can I force the contents of Query Analyzer's buffer to display to the
> screen?
> A stored proc has some debug PRINT statements in it. The proc takes a
long
> time to execute and the PRINT statements don't display until execution is
> complete.
> Is it possible to force them to display immediately? If so, how?
>
|||Even better, use a severity of 10 or lower to emulate what PRINT does (i.e.,
no error condition raised)...
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>
> PRINT 'foo'
> WAITFOR DELAY '00:00:05'
> GO
> RAISERROR('foo', 11, 1) WITH NOWAIT
> WAITFOR DELAY '00:00:05'
> GO
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Dave" <dave@.nospam.ru> wrote in message
> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
the[vbcol=seagreen]
> long
is
>
|||Thanks Aaron
That works and it also prints out any unprinted PRINT statements previous to
the RAISERROR.
THe red error messages are a distraction but I can live with that.
Thank you.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>
> PRINT 'foo'
> WAITFOR DELAY '00:00:05'
> GO
> RAISERROR('foo', 11, 1) WITH NOWAIT
> WAITFOR DELAY '00:00:05'
> GO
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Dave" <dave@.nospam.ru> wrote in message
> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
the[vbcol=seagreen]
> long
is
>
|||Good point, just in the habit of using 11.
http://www.aspfaq.com/
(Reverse address to reply.)
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:egrs6xbHFHA.720@.TK2MSFTNGP10.phx.gbl...
> Even better, use a severity of 10 or lower to emulate what PRINT does
(i.e.,
> no error condition raised)...
> --
> Adam Machanic
> SQL Server MVP
> http://www.sqljunkies.com/weblog/amachanic
> --
>
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> the
> is
>
|||> THe red error messages are a distraction but I can live with that.
Just follow Adam's advice and lower the severity level.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Dave" <dave@.nospam.ru> wrote in message news:emHu5xbHFHA.3780@.TK2MSFTNGP10.phx.gbl...
> Thanks Aaron
> That works and it also prints out any unprinted PRINT statements previous to
> the RAISERROR.
> THe red error messages are a distraction but I can live with that.
> Thank you.
>
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> the
> is
>
|||Got it.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uj4f94bHFHA.3624@.tk2msftngp13.phx.gbl...
> Just follow Adam's advice and lower the severity level.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Dave" <dave@.nospam.ru> wrote in message
news:emHu5xbHFHA.3780@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
previous to[vbcol=seagreen]
a[vbcol=seagreen]
execution
>
|||did you try using "results in text" instead of "results in grid"?
Dave wrote:
> How can I force the contents of Query Analyzer's buffer to display to the
> screen?
> A stored proc has some debug PRINT statements in it. The proc takes a long
> time to execute and the PRINT statements don't display until execution is
> complete.
> Is it possible to force them to display immediately? If so, how?
|||SQL Server doesn't send its output to the client immediately as it is generated by the engine. This
is to consume less network resources. And this is the reason why we don't see things like PRINT
immediately after they have been performed. SQL Server will wait until its output buffer is full, or
until the batch has ended. The trick with RAISERROR and NOWAIT is that it forces SQL Server to flush
the output buffer.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"ch" <ch@.dontemailme.com> wrote in message news:42237E8F.7DC18B52@.dontemailme.com...[vbcol=seagreen]
> did you try using "results in text" instead of "results in grid"?
>
> Dave wrote:
|||> The trick with RAISERROR and NOWAIT is that it forces SQL Server to flush
> the output buffer.
Right, this is why you usually see the PRINT and the RAISERROR come to the
messages pane at roughly the same time, even if the PRINT is issued before a
delay and the RAISERROR comes after.
http://www.aspfaq.com/
(Reverse address to reply.)

Friday, March 23, 2012

Forcing display of QA's buffer

How can I force the contents of Query Analyzer's buffer to display to the
screen?
A stored proc has some debug PRINT statements in it. The proc takes a long
time to execute and the PRINT statements don't display until execution is
complete.
Is it possible to force them to display immediately? If so, how?How about RAISERROR WITH NOWAIT? Watch the messages pane:
PRINT 'foo'
WAITFOR DELAY '00:00:05'
GO
RAISERROR('foo', 11, 1) WITH NOWAIT
WAITFOR DELAY '00:00:05'
GO
http://www.aspfaq.com/
(Reverse address to reply.)
"Dave" <dave@.nospam.ru> wrote in message
news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
> How can I force the contents of Query Analyzer's buffer to display to the
> screen?
> A stored proc has some debug PRINT statements in it. The proc takes a
long
> time to execute and the PRINT statements don't display until execution is
> complete.
> Is it possible to force them to display immediately? If so, how?
>|||Even better, use a severity of 10 or lower to emulate what PRINT does (i.e.,
no error condition raised)...
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>
> PRINT 'foo'
> WAITFOR DELAY '00:00:05'
> GO
> RAISERROR('foo', 11, 1) WITH NOWAIT
> WAITFOR DELAY '00:00:05'
> GO
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Dave" <dave@.nospam.ru> wrote in message
> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
the[vbcol=seagreen]
> long
is[vbcol=seagreen]
>|||Thanks Aaron
That works and it also prints out any unprinted PRINT statements previous to
the RAISERROR.
THe red error messages are a distraction but I can live with that.
Thank you.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> How about RAISERROR WITH NOWAIT? Watch the messages pane:
>
> PRINT 'foo'
> WAITFOR DELAY '00:00:05'
> GO
> RAISERROR('foo', 11, 1) WITH NOWAIT
> WAITFOR DELAY '00:00:05'
> GO
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Dave" <dave@.nospam.ru> wrote in message
> news:uyWPdkbHFHA.2784@.TK2MSFTNGP09.phx.gbl...
the[vbcol=seagreen]
> long
is[vbcol=seagreen]
>|||Good point, just in the habit of using 11.
http://www.aspfaq.com/
(Reverse address to reply.)
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:egrs6xbHFHA.720@.TK2MSFTNGP10.phx.gbl...
> Even better, use a severity of 10 or lower to emulate what PRINT does
(i.e.,
> no error condition raised)...
> --
> Adam Machanic
> SQL Server MVP
> http://www.sqljunkies.com/weblog/amachanic
> --
>
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> the
> is
>|||> THe red error messages are a distraction but I can live with that.
Just follow Adam's advice and lower the severity level.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Dave" <dave@.nospam.ru> wrote in message news:emHu5xbHFHA.3780@.TK2MSFTNGP10.phx.gbl...[vbcol
=seagreen]
> Thanks Aaron
> That works and it also prints out any unprinted PRINT statements previous
to
> the RAISERROR.
> THe red error messages are a distraction but I can live with that.
> Thank you.
>
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:uVVzjnbHFHA.4048@.TK2MSFTNGP15.phx.gbl...
> the
> is
>[/vbcol]|||Got it.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uj4f94bHFHA.3624@.tk2msftngp13.phx.gbl...
> Just follow Adam's advice and lower the severity level.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Dave" <dave@.nospam.ru> wrote in message
news:emHu5xbHFHA.3780@.TK2MSFTNGP10.phx.gbl...
previous to[vbcol=seagreen]
a[vbcol=seagreen]
execution[vbcol=seagreen]
>|||did you try using "results in text" instead of "results in grid"?
Dave wrote:
> How can I force the contents of Query Analyzer's buffer to display to the
> screen?
> A stored proc has some debug PRINT statements in it. The proc takes a lon
g
> time to execute and the PRINT statements don't display until execution is
> complete.
> Is it possible to force them to display immediately? If so, how?|||SQL Server doesn't send its output to the client immediately as it is genera
ted by the engine. This
is to consume less network resources. And this is the reason why we don't se
e things like PRINT
immediately after they have been performed. SQL Server will wait until its o
utput buffer is full, or
until the batch has ended. The trick with RAISERROR and NOWAIT is that it fo
rces SQL Server to flush
the output buffer.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"ch" <ch@.dontemailme.com> wrote in message news:42237E8F.7DC18B52@.dontemailme.com...[vbcol=s
eagreen]
> did you try using "results in text" instead of "results in grid"?
>
> Dave wrote:|||> The trick with RAISERROR and NOWAIT is that it forces SQL Server to flush
> the output buffer.
Right, this is why you usually see the PRINT and the RAISERROR come to the
messages pane at roughly the same time, even if the PRINT is issued before a
delay and the RAISERROR comes after.
http://www.aspfaq.com/
(Reverse address to reply.)sql