[Emerald] SQL 7 deadlocks

Josh Hillman ( (no email) )
Tue, 1 Feb 2000 17:26:35 -0500

When running a particular script in SQL 7 SP1, I am getting the following
error message quite often:

Server: Msg 1205, Level 13, State 61, Line 11
Your transaction (process ID #22) was deadlocked with another process and
has been chosen as the deadlock victim. Rerun your transaction.

What's causing this and how can I fix it? I never ran into this with SQL
6.5 SP5.
The server is a dual Pentium III 450 with 512MB RAM.
sp_spaceused calls:

rows reserved data index_size unused
----------- ------------------ ----------- ------------- ------
693092 131224 KB 129776 KB 1376 KB 72 KB

Here's the script:

/* Call summary for each month/user */
set nocount on
declare @begindate char(10), @enddate char(10)

select @begindate = '1/1/2000'
select @enddate = '2/1/2000'

set nocount off

Print 'Digital'
Select Username, Month=DateName(Month, CallDate),
Hours=Sum(convert (real, AcctSessionTime))/3600,
/* "Bytes Downloaded"=Sum(AcctOutputOctets),
"Bytes Uploaded"=Sum(AcctInputOctets), */
AccountType,
LoginLimit