|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
1205 deadlock error when not in a transactionWe're getting a deadlock error from our application. The error occurs on an
UPDATE, using a unique key with a clustered index. The table is large with over 20m rows. The statement isn't in an explicit transaction (maybe an implicit transaction?). We've also had the same problem on other UPDATE statements which are not in transactions. Given that it's not in an explicit transation, should this occur? Any ideas? SQL Server 2000 SP3. App uses ODBC. If you are running multiple statements in a single BEGIN ... END block, they
are run as a batch, which is very much like a transaction in many ways. You need to look at what is causing the deadlock, outside of your update, and see if you can use locking hints to avoid locks on the other side of the deadlock. -- Show quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "MrTim" wrote: > We're getting a deadlock error from our application. The error occurs on an > UPDATE, using a unique key with a clustered index. The table is large with > over 20m rows. The statement isn't in an explicit transaction (maybe an > implicit transaction?). We've also had the same problem on other UPDATE > statements which are not in transactions. Given that it's not in an explicit > transation, should this occur? Any ideas? > > SQL Server 2000 SP3. App uses ODBC. > Not running multiple statements in a BEGIN/END block. Have enable 1204
though, will just have to wait for it to occur again. Still seems strange that this should occur outside of a transaction. I've read of a bug with OLEDB, Linked Servers and deadlocks which is fixed in SP4. Could there possibly be a similar problem here? Show quote "Cowboy (Gregory A. Beamer) - MVP" wrote: > If you are running multiple statements in a single BEGIN ... END block, they > are run as a batch, which is very much like a transaction in many ways. You > need to look at what is causing the deadlock, outside of your update, and see > if you can use locking hints to avoid locks on the other side of the deadlock. > > -- > Gregory A. Beamer > MVP; MCP: +I, SE, SD, DBA > > *************************** > Think Outside the Box! > *************************** > > > "MrTim" wrote: > > > We're getting a deadlock error from our application. The error occurs on an > > UPDATE, using a unique key with a clustered index. The table is large with > > over 20m rows. The statement isn't in an explicit transaction (maybe an > > implicit transaction?). We've also had the same problem on other UPDATE > > statements which are not in transactions. Given that it's not in an explicit > > transation, should this occur? Any ideas? > > > > SQL Server 2000 SP3. App uses ODBC. > > |
|||||||||||||||||||||||