BUG: Repeated Execution of Stored Proc May GP Fault Server

Last reviewed: May 5, 1997
Article ID: Q94596

The information in this article applies to:
  • Microsoft SQL Server versions 4.2 and 4.2a for OS/2
BUG# OS/2: 1562 (4.2)

SYMPTOMS

A stored procedure doing a select in conjunction with the count and distinct functions may cause a general protection fault (GP fault) on SQL Server. Furthermore, the stored procedure may have executed multiple times on the server without its actually bringing the server down every time.

The stored procedure definition must be like the following:

   create procedure test_proc as
   select count(distinct  column1+column2) from table1 where ...

(Assume that both column1 and column2 are defined as char(2).)

WORKAROUND

To avoid potential GP faults with the above stored procedure, it may be recoded by selecting into a temporary table and then performing the "distinct" on the temporary table (the 'distinct column1+column2' is the source of the problem):

   create procedure test_proc as
   begin

   create table #temp_sum (sum1 char(4))

   insert into #temp_sum
   select column1+column2
   from table1

   select count(distinct sum1)
   from #temp_sum
   end

STATUS

Microsoft has confirmed this to be a problem in SQL Server versions 4.2 and 4.2a for OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words:
Keywords : kbbug4.20 kbbug4.20a kbprg SSrvGPF SSrvServer
Version : 4.2 4.2a
Platform : OS/2
Issue type : kberrmsg


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.