BUG: Repeated Execution of Stored Proc May GP Fault ServerLast reviewed: May 5, 1997Article ID: Q94596 |
The information in this article applies to:
SYMPTOMSA 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).)
WORKAROUNDTo 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 STATUSMicrosoft 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:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |