Re: MSSQL vs. SYBASE
From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 08/10/04
- Next message: Partha Mandayam: "Re: Linked Servers"
- Previous message: Hugo Kornelis: "Re: Formatting a Phone number"
- In reply to: Lewis Howell: "Re: MSSQL vs. SYBASE"
- Next in thread: Erland Sommarskog: "Re: MSSQL vs. SYBASE"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 19:24:55 +0000 (UTC)
Lewis Howell (lou_junkmail@yahoo.com) writes:
> Confirmed.
>
> I actually have an infinitely running stored proc that is a monitoring
> utility and works fine in SYBASE. In SQL Server I have to stop or cancel
> the stored proc to get any results. On occasion I get PRINT returns to
> different workstations using the ADO Connection message, but this is very
> inconsistent.
Here is variation:
SET NOCOUNT ON
DECLARE @i int
SELECT @i = 1000
WHILE @i > 0
BEGIN
SELECT i = @i
IF @i % 100 = 0 WAITFOR DELAY '00:00:02'
SELECT @i = @i - 1
END
If you run this in QA, you will see that you get the result sets in
batches, but the batches are not even hundreds due to the buffering.
I also played with this with other client libraries. A DataReader in
ADO .Net did just fine, that is I got the result as soon as SQL Server
produced them.
In ADO, you have to be careful. The default cursor location is
adUseServer, but normally there is a recommendation to use client-side
cursor, but that is not possible in your case. You need a server-side
cursor. With client-side ADO waits until all data has arrived.
I've directed a question to my contacts at Microsoft to find out if there
is a way to unbuffer the output completely without using RAISERROR WITH
NOWAIT.
-- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
- Next message: Partha Mandayam: "Re: Linked Servers"
- Previous message: Hugo Kornelis: "Re: Formatting a Phone number"
- In reply to: Lewis Howell: "Re: MSSQL vs. SYBASE"
- Next in thread: Erland Sommarskog: "Re: MSSQL vs. SYBASE"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|