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)
 EXCEPTION_ACCESS_VIOLATION

Author  Topic 

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2004-08-27 : 11:11:27
I wrote a SPROC last week that uses the CSVTOINT UDF. It worked flawlessly. Now I get this error:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 54 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

Connection Broken

When running this...

SET @CList = '11568,14311'
SET @SDate = '1/1/2004'
SET @EDate = '7/31/2004'

--exec Get_Load_Weights @CList,@SDate,@Edate
SELECT Customer_No,Washer,BOF_Date,WR_ID,Actual_WT,LF_WT_Target
FROM Washrun
JOIN dbo.CsvToInt(@CList) CSV ON CSV.IntValue = WashRun.Customer_No
WHERE BOF_Date BETWEEN @SDate and @EDate
AND (WashRun.EOF_Date IS NOT NULL OR WashRun.Actual_WT > 0) /* Valid Load? */
ORDER BY BOF_Date,Customer_No,Washer,WR_ID

If I get rid of the JOIN the statement works. What's this error message telling me?

TIA

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2004-08-27 : 12:45:51
Upon a search in SQLTeam I note that this could be a SQL bug. Will reboot server this weekend to see if it goes away. As another note, I am using the CSVToInt UDF in another SP that has alot more joins and it works just fine. Odd.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-27 : 12:46:02
Got sp3a and the latest security patch installed (818)?

And joining on UDF? Could you post the UDF?

Tara
Go to Top of Page

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2004-08-27 : 12:50:29
This server is running 8.00.194

Here's the UDF. It's from the article.
Create Function dbo.CsvToInt ( @Array varchar(1000))
returns @IntTable table
(IntValue int)
AS
begin

declare @separator char(1)
set @separator = ','

declare @separator_position int
declare @array_value varchar(1000)

set @array = @array + ','

while patindex('%,%' , @array) <> 0
begin

select @separator_position = patindex('%,%' , @array)
select @array_value = left(@array, @separator_position - 1)

Insert @IntTable
Values (Cast(@array_value as int))

select @array = stuff(@array, 1, @separator_position, '')
end

return
end



Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-27 : 12:52:47
8.00.194! That's SQL Server 2000 without any service packs. A ton of access violations have been corrected since then. You need to install sp3a then the latest security patch (which contains bug fixes as well as security patches). I wouldn't even bother rebooting.

Tara
Go to Top of Page

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2004-08-27 : 12:57:49
Thanks Tara. Sending this info to my Sys Admin.
Go to Top of Page

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2004-08-30 : 09:13:50
Applying SP3a fixed the problem. Now using 8.00.760. Where is the .818 security patch?
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-30 : 10:26:42
http://www.microsoft.com/downloads/details.aspx?FamilyID=9814AE9D-BD44-40C5-ADD3-B8C99618E68D&displaylang=en

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Ken Blum
Constraint Violating Yak Guru

383 Posts

Posted - 2004-08-30 : 10:33:02
I thought that was it but wasn't sure, since MS doesn't make it easy to tell what version you will end up with after applying the patch. Thanks Derrik. BTW, if you have time, can you take a quick look at my other posting that we were taliking about? I just put it at the top of the list again in the admin forum - Setting Up Same DB's on one server. TIA!
Go to Top of Page
   

- Advertisement -