Strange Database Deadlock

Jul 20, 2005

Hi,

I had a deadlock situation on SQLServer 2000. When I look at the
Locks / process ID screen on Enterprise Manager, for one of the
session, I see the object being one table and the index is on another
totally unrelated table's primary key. This is really odd since there
are no foreign keys tying these two tables together. They don't even
reference the same parent tables. These two tables are quite
dis-joint. Does anyone know why I will get this kind of lock?

Thanks,

Maggie :)

View 2 Replies


ADVERTISEMENT

Strange Deadlock

Sep 15, 2006

We have a client-server architecture in development in which clients synchronize their data tables with the server. If we try to sync two clients at the same time we often get a deadlock - which would make sense except for the resource that gets deadlocked: stored procedure xp_regdeletevalue, which is used by SQL Server to delete keys from the Windows registry.

According to the trace (capturing all events listed in Profiler + the 1204 flag) right before the deadlock takes place xp_regdeletevalue gets locked and released about 500(!) times in a row (nothing happens between the Lock:Acquires and Lock:Releases). We're not invoking this procedure directly although one of the frameworks we're using (Spring or Hibernate) might be, but I found no reference to it in their documentations.

The 1204 trace flag's output:

Deadlock encountered .... Printing deadlock information
spid4
spid4 Wait-for graph
spid4
spid4 Node:1
spid4 KEY: 9:1950629992:1 (5b00bcc5c531) CleanCnt:1 Mode: X Flags: 0x0
spid4 Grant List::
spid4 Owner:0x197ef1c0 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:54 ECID:0
spid4 SPID: 54 ECID: 0 Statement Type: SELECT Line #: 1
spid4 Input Buf: RPC Event: sp_execute;1
spid4 Requested By:
spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:58 ECID:0 Ec:(0x1e3914f8) Value:0x197f0e00 Cost:(0/114)
spid4
spid4 Node:2
spid4 KEY: 9:1950629992:1 (5a00d9a27989) CleanCnt:1 Mode: X Flags: 0x0
spid4 Grant List::
spid4 Owner:0x197ec580 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:58 ECID:0
spid4 SPID: 58 ECID: 0 Statement Type: SELECT Line #: 1
spid4 Input Buf: RPC Event: sp_execute;1
spid4 Requested By:
spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:54 ECID:0 Ec:(0x198ad4f8) Value:0x197ecba0 Cost:(0/114)
spid4 Victim Resource Owner:
spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:54 ECID:0 Ec:(0x198ad4f8) Value:0x197ecba0 Cost:(0/114)

Spid4 is a system thread (as far as I know it's the read-ahead manager) and 1950629992 corresponds to xp_regdeletevalue according to dbo.sysobjects. The system is written in Java, based on Hibernate and Spring (using Spring's transaction model) and runs on a Windows XP test server with SQL Server 2000.

What could possibly be the reason for this?

Thanks,
Peter

View 1 Replies View Related

SSIS Transaction Management && Strange Deadlock When Using XLOCK, ROWLOCK

Jun 7, 2007

I have a SSIS package that is run from one job, nowhere else. The package has TransactionOption NotSupported.



In the SSIS package I first have a sequence container that has TransactionOption Required (Serializable). The sequence container contains several Execute SQL tasks that access the same SQL Server 2005 database. The Execute SQL tasks have TransactionOption supported / Serializable. The first SQL statement is:



select p.column_name

from table_name p with (XLOCK, ROWLOCK)

where p.second_column_name = 'COLUMN_VALUE'



After this there are a couple of SQL tasks, and finally a task containing the following SQL:



select p.third_column_name

from table_name p

where p.second_colomn_name = 'COLUNM_NAME'



The idea is that the first query exclusively locks the row in the table_name-table for mutual exclusion purposes, i.e. so that if for some reason the SSIS package would be executed simultaneously two or more times, only one package execution could lock the row and proceed and the other executions will have to wait. There's an index on column second_column_name in the table to avoid the select locking other rows in addition to the required row.



Some questions:

1) Is it so in my setup that when SSIS runtime executes the sequence container it creates a transaction in the beginning of the sequence container and commits the transaction in the end of the sequence container? And in my setup the Execute SQL tasks in the sequence containar are executed under the same transaction?

2) I have a problem that the second query sometimes gives this error:"ErrorCode: -1073548784. ErrorDescription: Executing the query "XXXXX" failed with the following error: "Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

The 1st query has locked the row for the transaction. How can the second query be deadlocked, shouldn't the transaction have a lock on the row? I'd understand if the 1st query failed sometimes, but don't understand how the 2nd quey can fail.



r,

JM

View 3 Replies View Related

Mirroring :: Email Deadlock Information When A Deadlock Occurs

Nov 10, 2015

Is there a way to send out an email woth deadlock information (victim query, winner query, process id's and resources on which the deadlock occurred) as soon as a deadlock occurs in a database or at instance level?I currently has trace flag 1222 turned on. And also created an alert that send me an email whenever a deadlock occurs. but it just says that a deadlock occurred and I log into sql server error log and review the information.

View 5 Replies View Related

Strange Database Problem

Jan 7, 2008

I built an ASP.NET application that works with SQL Server Express 2005.  I am using Typed Datasets to interact with the database, and everything works well on my staging server (Windows 2003). 
However, when I deployed the application to the clients server, no updates actually work!  I try adding new items through the interface to no avail.  I try updating data through the interface and nothing works.  The strange thing is, I get no errors! 
Has anyone ever encountered this before?
Karls

View 1 Replies View Related

Database Acting Strange

Jan 20, 2004

MY DATABASE FOR SHOPPING CART IS ACTING STRANGE IT HAS AUTOMATICALLY DESTOYED ALL PRIMARY KEYS. AND HAS CREATED 4 DUPLICATE RECORDS FOR EACH RECORD SO AT THIS STAGE I HAVE AROUNG 15000 RECORDS IN EACH TABLE IT MEANS 15 TIMES 4 60000 RECORDS. CAN ANYONE UPDATEME WHY THIS HAS HAPPENED AND WHAT CAN BE DONE TO DELETE EXISTING DUPLICATES. I NEED FAST REPLY IN THIS MATTER AS THIS IS URGENT. IF POSSIBLE KINDLY WRITE QUERIES TRIGGERS FOR FUTURE PROBLEMS AS WELL AS THESE DAYS I AM SICK SO MY BRAIN AINT WORKING IN THIS MATTER. URGENT URGENT URGENT THANKS ALOT I HAVE PREVIOUSLY POSTED AND HAVE GOT A GOOD RESPONSE. AND HOPE A GOOD ONE AGAIN. ONE MORE THING IS THAT I HAVE A BACKUP HERE AT MY OFFICE SYSTEM IT ALSO HAS DONE THE SAMETHING. I MADE A NEW DATABASE AND TRYED TO IMPORT DATA WITH DISTINCT KEYWORD BUUT IT IS NOT COPYING IT AS WELL. URGENT RESPONSE REQUIRED IF ANYONE CAN DO.

View 9 Replies View Related

Strange Database Problem

Aug 23, 2005

Hello,At work we have various servers, therefore we have various DTS Interfaceswhich transfer data between them.However when trying to save a new View to one server which gets its datafrom another server nothing happens, I get an hourglass and nothing else.Then I have to exit out of SQL Enterprise Manager and then no-one can accessthe database on that server, so we had to restore from backup!The query to create the view resides on server AThe query is getting its data from server BBut the query does need to reside on server A for other reasons.What does this sound like to you?I am suspecting connection problems between server A and B but the queryruns, its only when I save the view that this happens.I am puzzled.Thanks,Jayne

View 1 Replies View Related

Can't Copy Database, Strange Error

Sep 25, 2006

I'm trying to copy a database from my web host to local Sql Server 2005 instance using the Copy Database wizard.  I get this error:An exception occurred while executing a Transact-SQL statement or batch. Server user 'celestine' is not a valid user id database 'db2'.However, 'db2' isn't the database I was trying to copy!  I am trying to copy db1, but this error is complaining about db2, which is in fact somebody else's database that I don't have a login for.  Why am I getting an error about db2 when I'm not trying to do anything with db2???I can however export the tables from db1 just fine using Export.  But then I have to go back and generate script to re-create the stored procs, views, etc., so it is rather tedious to do it that way.  

View 4 Replies View Related

Strange Error When Connecting To Database.

May 11, 2008

 Hello,
I'm tyring a simple piece of code to conenct to my database: SqlConnection con = new SqlConnection("Data Source=localhost; Initial Catalog=OrderingSystem; Integrated Security=SSPI");
try
{
// Try to open the connection.
con.Open();
label1.Text = "&lt;b>Server Version:</b> " + con.ServerVersion;
label1.Text += "&lt;br /><b>Connection Is:</b> " + con.State.ToString();
}
catch (Exception err)
{
// Handle an error by displaying the information.
label1.Text = "Error reading the database. " + err.Message;
}
finally
{
// Either way, make sure the connection is properly closed.
// Even if the connection wasn't opened successfully,
// calling Close() won't cause an error.
con.Close();
label1.Text += "&lt;br /><b>Now Connection Is:</b> " +
con.State.ToString();
}
When I try this, I get an error:"Error reading the database. Cannot open database "OrderingSystem" requested by the login. The login failed. Login failed for user 'NT AUTHORITYNETWORK SERVICE'."
The strange thing is, this code works perfectly If I use it in a Windows Forms application.
Is it a problem with SQL server, IIS or my code?I'm using SQL Server 2005 (SP2) 32bit developer edition + IIS 6.0 + Visual Studio 2008 Pro all runnign on my Windows XP x64 PC.
Thankyou

View 2 Replies View Related

Strange Problem ! Connect To Database !

Oct 29, 2005

Hey u guys.I have a strange problem and non of myfriends can solve it.The story is like this:I want to connect to my database at my hosting from SQL Query Analyser.With the same SQL server, username and password.But there is only me who can not connect by that way.This is the error of that problem, i made a screenshot for it.Please click here: http://www.xhnguyen.info/sql.JPGAnyone had this problem before ?Could anyone please help me solve it?Thank you very much.Joesy

View 1 Replies View Related

Strange Error Restoring Database

Jul 9, 2001

Hi all.

I was just restoring one database and creating another concurrently on the same server. The restore took longer than the create due to the respective sizes.
After the create had finished (done in Query Analyzer) I went back to the restore to see how it was getting on (running in Enterprise Manager).
There was an error (which I didn't record exactly - DOH!) along the lines of "could not obtain a lock on the model database, restore terminating abnormally."
I guess the create had model locked while it was creating the default objects, but what was a *restore* doing needing the model database anyway?

Any comments would be interesting.

Andy Tynan

View 1 Replies View Related

Strange Error For Database Integrity Check Maintenance Job

May 16, 2008

Hi gurus:

I met a very strange problem recently. I set up a database integrity check maintenance plan. But this job failed every time. I looked into the logs, the error message was that Databases that have a compatibility level of 70 (SQL Server version 7.0) will be skipped. I used the sp_helpdb to check the version of the databases included in my maintenance plan. The sp result shows that all the databases are above version 80....

Even more strange, i can successfully run the dbcc check query on each database.

Any comment and suggestion will be very appreciated.

View 1 Replies View Related

Strange Error On Linked Server - Cannot Open Default Database

Apr 16, 2007

Hi,We have 2 servers. Server1 is a 2000 box, with SP3 (yes I know it isnot up to date). Server2 is a 2005 box, SP2.I set up Server1 (2000) to have a linked server to Server2 (2005). Thereason I did this is because we are using a stored procedure onServer2 to send mail, as we have found that using mail on 2000 doesn'talways work as advertised.When I set up the linked server on the 2000 box, for security I justset it up to use a SQL Server user on the 2005 box. The SQL Serveruser on the 2005 box has permissions to run the stored procedure forsending mail.Here's the weird thing though. When calling the stored procedure onthe 2005 box from the 2000 box, sometimes we get an error that "Thedefault database cannot be opened", and the query does not run on the2005 box. However, it only happens *sometimes*. Other times, the queryruns fine.Since the problem seeemed to be with the default database, I changedthe SQL Server user on 2005 default database to the SAME database thatcontains the stored procedure.However, I just don't understand why it's even TRYING to open thedefault database, since when we called the linked server we are doingso as, and it's referencing the default database in the name:EXEC Server2.DefaultDatabase.dbo.StoredProcedureNameHowever, after changing the user's default database to"DefaultDatabase" as shown above, the query runs fine.Why are we having this problem? That is, if I change the defaultdatabase to something other than "DefaultDatabase", then the querydoesn't run, even though the database name is referenced in the abovequery??Obviously, this is not desireable, because that means we can only runqueries that are in "DefaultDatabase", which may not always be thecase.Thanks much

View 2 Replies View Related

Strange, Very Strange (BIDS)

Jul 19, 2006

Hi everyone,

I€™m suffering a queer behaviour when I use BIDS. Concretely, when I open a dtsx from my project (it has 10 packages) many times Sequence Container and Data Flow tasks are invisible. I mean, its lines are not visible at all whereas its titles are. I mean, what you see is just a white box€¦

Then, I€™m gonna Data Flow layer and I have to do double-clik over the tasks and are visible but on Control Flow I don€™t see how to solve.

Curiously in our development and production server such behaviour doesn€™t happen (we are accessing by mean Terminal Server from our workstations)

How odd!. Everything is fine except this.

I want to remark you that such project has been copied from the server, this is, these packages are been built on the server

Thanks for your thougts or ideas,

View 5 Replies View Related

Web App SQL Deadlock

Apr 26, 2008

Hello everyone,Can you please help me on the following problem that i have.I am using the microsoft web stress tools to simulate 100 concurrent users for one min, and the database will go into a deadlock for large part of the 100 concurrent users.Please help...i've been stuck for many days already. Thanks...Error 5: Transaction (Process ID 497) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction..Here is my code.My connection string:<connectionStrings><add name="Connection_String" connectionString="Data Source=123.123.123.123;Initial Catalog=DBName;MultipleActiveResultSets=true;User ID=uname;Password=upass;connection timeout=60" providerName="System.Data.SqlClient"/> </connectionStrings>My web apps will call the below function. And the deadlock always occurs at the update statement (error 5). I believe it's probably the select statement above locked up the row. I've put in (UPDLOCK) for the select statement, and it still didn't work.private void UpdateLogTables(string Station_ID, string ContentFileName, string FileSize, string IP){ContentFileName = Regex.Replace(ContentFileName, "'", "''");string AdFileName = "";string AdFileNameClause = "";string DownloadCount = "";string TotalFileSize = "";string DownloadDate = "";string currentDate = "";string tempDate = "";string MyString = "";SqlConnection MyConnection = new SqlConnection(System.Configuration.ConfigurationMa nager.ConnectionStrings["Connection_String"].ConnectionString);SqlCommand myCommand = null;SqlDataReader myReader = null;try{MyConnection.Open();MyString = "SELECT AdFileName FROM tblContentRef WHERE Station_ID = '" + Station_ID + "' AND ContentFileName = '" + ContentFileName + "'";myCommand = new SqlCommand(MyString, MyConnection);myCommand.CommandTimeout = 60;myReader = myCommand.ExecuteReader();if (myReader.Read()) {AdFileName = myReader["AdFileName"].ToString();} }catch (Exception e){Response.Write("Error 2: " + e.Message + ".<br><br>Please email abc@abc.com.<br><br>Thank you.");} finally{if (myReader != null){myReader.Close();}}if (AdFileName != ""){AdFileName = "'" + AdFileName.Replace("'", "''") + "'";AdFileNameClause = "AdFileName = " + AdFileName;}else{AdFileName = "NULL";AdFileNameClause = "AdFileName IS NULL";}InsertDetailsLogTable(Station_ID, ContentFileName, AdFileName, FileSize, IP, MyConnection);SqlDataReader myReader2 = null;SqlCommand myCommand2 = null;bool Readable = false;try{MyString = "SELECT DownloadCount, TotalFileSize, DownloadDate FROM tblSummaryLog (UPDLOCK) WHERE Station_ID = '" + Station_ID + "' AND ContentFileName = '" + ContentFileName + "' AND " + AdFileNameClause + " ORDER BY DownloadDate DESC";myCommand2 = new SqlCommand(MyString, MyConnection);myCommand2.CommandTimeout = 60;myReader2 = myCommand2.ExecuteReader();if (myReader2.Read()){DownloadCount = myReader2["DownloadCount"].ToString();TotalFileSize = myReader2["TotalFileSize"].ToString();DownloadDate = myReader2["DownloadDate"].ToString();currentDate = DateTime.Now.ToString("M/d/yyyy");string[] inDate = DownloadDate.Split(new char[] { ' ' });tempDate = inDate[0];Readable = true;}if (myReader2 != null){myReader2.Close();} if (Readable){if (tempDate == currentDate){DownloadCount = Convert.ToString(Convert.ToInt32(DownloadCount) + 1);TotalFileSize = Convert.ToString(Convert.ToInt32(TotalFileSize) + Convert.ToInt32(FileSize));UpdateSummaryLogTable(DownloadCount, TotalFileSize, Station_ID, ContentFileName, AdFileNameClause, DownloadDate, MyConnection);}else{InsertSummaryLogTable(Station_ID, ContentFileName, AdFileName, FileSize, MyConnection);}}else{InsertSummaryLogTable(Station_ID, ContentFileName, AdFileName, FileSize, MyConnection);} }catch (Exception e){Response.Write("Error 3: " + e.Message + ".<br><br>Please email abc@abc.com.<br><br>Thank you.");}finally{ if (MyConnection != null){ MyConnection.Close();} }}private void InsertDetailsLogTable(string Station_ID, string ContentFileName, string AdFileName, string FileSize, string IP, SqlConnection MyConnection){string MyString = @"INSERT INTO tblDetailsLog ( Station_ID, ContentFileName, AdFileName, FileSize, IP, DateTime ) VALUES ( '" + Station_ID + "', '" + ContentFileName + "', " + AdFileName + ", '" + FileSize + "', '" + IP + "', getdate() )";try{ SqlCommand MyCmd = new SqlCommand(MyString, MyConnection);MyCmd.CommandTimeout = 60;MyCmd.ExecuteNonQuery(); }catch (Exception e){Response.Write("Error 4: " + e.Message + ".<br><br>Please email abc@abc.com.<br><br>Thank you.");}finally{} }private void UpdateSummaryLogTable(string DownloadCount, string TotalFileSize , string Station_ID , string ContentFileName , string AdFileNameClause, string DownloadDate, SqlConnection MyConnection){string MyString = @"UPDATE tblSummaryLog SET DownloadCount = '" + DownloadCount + "', TotalFileSize = '" + TotalFileSize + "', DownloadDate = getdate() WHERE Station_ID = '" + Station_ID + "' AND ContentFileName = '" + ContentFileName + "' AND " + AdFileNameClause + " AND (CONVERT(CHAR(19), DownloadDate) = CONVERT(CHAR(19), CAST('" + DownloadDate + "' AS datetime)))";try{ SqlCommand MyCmd = new SqlCommand(MyString, MyConnection); MyCmd.CommandTimeout = 60;MyCmd.ExecuteNonQuery(); }catch (Exception e){Response.Write("Error 5: " + e.Message + ".<br><br>Please email abc@abc.com.<br><br>Thank you.");}finally{} }private void InsertSummaryLogTable(string Station_ID , string ContentFileName , string AdFileName , string TotalFileSize, SqlConnection MyConnection){string MyString = @"INSERT INTO tblSummaryLog ( Station_ID, ContentFileName, AdFileName, DownloadCount, TotalFileSize, DownloadDate ) VALUES ( '" + Station_ID + "', '" + ContentFileName + "', " + AdFileName + ", '1', '" + TotalFileSize + "', getdate() )";try{ SqlCommand MyCmd = new SqlCommand(MyString, MyConnection);MyCmd.CommandTimeout = 60;MyCmd.ExecuteNonQuery();}catch (Exception e){Response.Write("Error 6: " + e.Message + ".<br><br>Please email abc@abc.com.<br><br>Thank you.");}finally{} }

View 5 Replies View Related

Deadlock

Jul 9, 2005

In a high traffic environment, deadlocks eventually occur as number of data processes increase. How can deadlocks be avoided, minimized and resolved. Please kindly provide scenario examples and samples of T-SQL code. Thanks much.

View 3 Replies View Related

Deadlock

May 7, 2001

SQL 7.0
Hi All

Iam trying to bcp a table(residing on my prod server to my local machine from command prompt) .Actually the table iam trying to bcp has heavy updates and selects, from users (70 users).
The users complain that system becomes slow.Is it got anything to do with my trying to bcp the mentioned table(table has 170,000 records).Also whenever i try to bcp this table, only after being chosen as the deadlock victim by Sql server,for 3 or 4 times that iam able to bcp the table.

Any help regarding this will be very much appreciated
TIA
kinnu

View 2 Replies View Related

DEADLOCK

Jul 27, 2000

I am unable to control the granularity of locks in our queries.
We are running queries through MTS and are getting deadlocks.

The batch includes two inserts and one select query - all are hitting on
only one table. This table has a unique clustered and a unique nonclustered index as well
as a primary key.

Within the batch, I have given a table hint to set transaction isolation level
to READCOMMITTED, ROWLOCK for the insert statements, like this

INSERT INTO ib_price with (READCOMMITTED,ROWLOCK)........

and the same for the Select statement.

SELECT retail_price, price_status_id FROM ib_price with (READCOMMITTED,ROWLOCK)

When I run sp_lock on the spid, I get output indicating that
SS7 is placing a IX lock on the table. I'm pretty sure this is
a big contributor to the deadlock.

I get the deadlock when I try to run more than one client with similar insert parameters.

How can I control the granularity to just rowlocks?

All help is appreciated.
Thanks

Brett

View 4 Replies View Related

Deadlock

May 12, 2000

How can I reproduce a deadlock in 7.0?

View 1 Replies View Related

Deadlock

Nov 4, 2002

Hi,

I am getting deadlock running a stored procedure from two machines. Looking at the error log (generated using trace flag 1204 and 3605), it seems the deadlock is on a key. But what I fail to understand is how come sql server granted exclusive lock on the key to both connections. The grant list shows that lock with Mode X is granted to both connection.

Deadlock encountered .... Printing deadlock information
2002-11-04 14:34:26.33 spid4
2002-11-04 14:34:26.33 spid4 Wait-for graph
2002-11-04 14:34:26.33 spid4
2002-11-04 14:34:26.33 spid4 Node:1

2002-11-04 14:34:26.33 spid4 KEY: 11:1205683443:11 (da00d1f77328) CleanCnt:1 Mode: X Flags: 0x0
2002-11-04 14:34:26.33 spid4 Grant List::
2002-11-04 14:34:26.33 spid4 Owner:0x2ffa89c0 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:179 ECID:0

2002-11-04 14:34:26.33 spid4 SPID: 179 ECID: 0 Statement Type: SELECT INTO Line #: 44
2002-11-04 14:34:26.33 spid4 Input Buf: Language Event: EXEC dbo.PROC_RVM_CALCULATE 22567, 'centreAVashista'
2002-11-04 14:34:26.33 spid4 Requested By:
2002-11-04 14:34:26.33 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:166 ECID:0 Ec:(0x6f02568) Value:0x85146480 Cost:(0/14E0)
2002-11-04 14:34:26.33 spid4

2002-11-04 14:34:26.33 spid4 Node:2
2002-11-04 14:34:26.33 spid4 KEY: 11:1205683443:11 (df001773794a) CleanCnt:1 Mode: X Flags: 0x0

2002-11-04 14:34:26.33 spid4 Grant List::
2002-11-04 14:34:26.33 spid4 Owner:0x85147ee0 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:166 ECID:0

2002-11-04 14:34:26.33 spid4 SPID: 166 ECID: 0 Statement Type: SELECT INTO Line #: 44
2002-11-04 14:34:26.33 spid4 Input Buf: Language Event: EXEC dbo.PROC_RVM_CALCULATE 22562, 'centreJTtest4'
2002-11-04 14:34:26.33 spid4 Requested By:
2002-11-04 14:34:26.33 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:179 ECID:0 Ec:(0x7dd0568) Value:0x3a24f920 Cost:(0/39BC)
2002-11-04 14:34:26.33 spid4 Victim Resource Owner:
2002-11-04 14:34:26.33 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:166 ECID:0 Ec:(0x6f02568) Value:0x85146480 Cost:(0/14E0)

Any pointer is much appreciated.

Thanks
Shailesh

View 2 Replies View Related

Deadlock

Dec 10, 1999

Help !!

How would you handle the deadlocks that happen often? Since the victim users complained about the disconnection.

Thank you ahead of time

View 2 Replies View Related

DeadLock

Apr 27, 2004

Can anyone help me resolve deadlock with following text

Parallel Query worker thread Involved in deadlock.

I am particularly interested in resolving details of above mentioned line,as I started getting dead lock
more frequently now and when I look
into query involved blocking and victim
I see nothing that can cause deadlock
they are update insert and select statement which were fine for long and all of sudden started giving problem.


Thanks in advance,
for any knowledge share
my mail id scraval@hotmail.com

View 5 Replies View Related

Deadlock And MTS

Aug 4, 1999

Hi,
When many users run some stored procedures I 've got some deadlocks. How to avoid that?
We run large stored procedures code which are using sometime the same table.
What is the best way for using the transaction isolation level, fillfactor indexes, procedure cache configuration ...etc to avoid that.

In addition, I am using MTS and sometimes the Tempdb is also locked, is it a Microsoft bug (again) ?

Herve Meftah

View 1 Replies View Related

Deadlock

Mar 30, 2001

We had a dead lock every night 9:00pm. I found out Server/Current Activity --Object Locks :
The error log showing error 17824, severity:10, state 0 DNCC TRACEON 208, SPID 28 DBCCTRACEOFF 208, SPID 28 In current activity --object locks and reapetedly showing "tempdb.dbo.sysobjects/sysindexes/syscolumns" 28:sa.master.dbo /INSERT /SQL_servername (MS SQLEW)

Any help will be appreciated.

View 2 Replies View Related

Deadlock !!!! :(

Apr 1, 2004

Hi

Sorry for bombading the forum with all these questions, but i am relatively new to sql 2000.

I am getting dead lock on the following procedure.

important background information
1. this is a multi user web-based call centre application
2. this procedure loads up a new contact based on priority

I see no reason how a dead lock could occur.
does any one have any idea. could it be something else that is locking up resource used by this procedure?


CREATE PROCEDURE topcat.getNewContactInfo
(
@contact_id int
)
AS
BEGIN
begin transaction

declare @id int

set @id = (SELECT TOP 1 _id FROM class_contact WHERE (status IS NULL OR status='New Contact' OR status = 'No Connect' OR status='callback') AND (checked_in IS NULL OR checked_in <> 1) AND (callback_date >= (getdate() + 1) OR callback_date IS NULL ) ORDER BY priority DESC)

UPDATE class_contact SET checked_in = 1 WHERE _id = @id
SELECT TOP 1 * FROM class_contact
WHERE _id = @id

commit
END
GO



wat i dont' get is that, this procedure only has one update statement, this is the only statement that could possibly hold a lock on another resource (i think) , i can't see how a dead lock can happen in this case since this procedure doesn't hold up 2 resources at a time.


James :(

View 6 Replies View Related

Deadlock

Jun 19, 2007

Can anyone help me to solve this deadlock?

2007-06-17 22:42:34.18 spid4 Wait-for graph
2007-06-17 22:42:34.18 spid4
2007-06-17 22:42:34.18 spid4 Node:1
2007-06-17 22:42:34.18 spid4 PAG: 66:1:26187 CleanCnt:1 Mode: IX Flags: 0x2
2007-06-17 22:42:34.18 spid4 Grant List 2::
2007-06-17 22:42:34.18 spid4 Owner:0x69f19520 Mode: IX Flg:0x0 Ref:2 Life:02000000 SPID:349 ECID:0
2007-06-17 22:42:34.18 spid4 SPID: 349 ECID: 0 Statement Type: UPDATE Line #: 1
2007-06-17 22:42:34.18 spid4 Input Buf: RPC Event: sp_prepexec;1
2007-06-17 22:42:34.18 spid4 Requested By:
2007-06-17 22:42:34.18 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:348 ECID:33 Ec:(0x5996C098) Value:0x2f8d2aa0 Cost:(0/0)
2007-06-17 22:42:34.18 spid4
2007-06-17 22:42:34.18 spid4 Node:2
2007-06-17 22:42:34.18 spid4 PAG: 66:1:3051 CleanCnt:1 Mode: SIU Flags: 0x2
2007-06-17 22:42:34.18 spid4 Grant List 1::
2007-06-17 22:42:34.18 spid4 Owner:0x65c57560 Mode: S Flg:0x0 Ref:0 Life:00000001 SPID:348 ECID:33
2007-06-17 22:42:34.18 spid4 SPID: 348 ECID: 33 Statement Type: UPDATE Line #: 22
2007-06-17 22:42:34.18 spid4 Input Buf: Language Event: exec [Extracts].dbo.asp_SPCUpdateDRPFieldsIR @Name = 'SPCExecStep B05-ASP'
2007-06-17 22:42:34.18 spid4 Grant List 2::
2007-06-17 22:42:34.18 spid4 Requested By:
2007-06-17 22:42:34.18 spid4 ResType:LockOwner Stype:'OR' Mode: IX SPID:349 ECID:0 Ec:(0x5425B500) Value:0x674a2160 Cost:(0/5FD8)
2007-06-17 22:42:34.18 spid4 Victim Resource Owner:
2007-06-17 22:42:34.18 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:348 ECID:33 Ec:(0x5996C098) Value:0x2f8d2aa0 Cost:(0/0)

=============================
http://www.sqlserverstudy.com

View 12 Replies View Related

Why Does This Deadlock?

Jul 23, 2005

Using SQL Server 2000 SP3a, I run the following in 2 query analizerwindows on the Northwind database, the second one always gets thedeadlock Msg 1205:Window 1:declare @cnt intselect @cnt = 5while @cnt > 0beginbegin transactionselect * from orders (updlock) where employeeid = 1update orders set employeeid = 1 where employeeid = 1waitfor delay '00:00:03'commitselect @cnt = @cnt -1endWindow 2:declare @cnt intselect @cnt = 5while @cnt > 0beginbegin transactionselect * from orders (updlock) where employeeid = 1 and customerid ='ERNSH'waitfor delay '00:00:02'commitselect @cnt = @cnt -1endThe query in the first window gets 123 rows and places update locks onthem, then updates them and commits. The query in the second windowgets a subset (about 5) of the results that window 1 gets also tryingto place update locks on the same rows. Shouldn't the query in window 2just wait for the transaction in window 1 to finish? why would itdeadlock?you can also get rid of the delay in the second window and it willdeadlock faster.thanks in advance.Eugene

View 11 Replies View Related

Can You Tell Me Why This Causes A Deadlock?

Feb 4, 2006

Hi.create table joe(c1 integer not null, c2 integer not null)Two sessions:Session 1:BEGIN TRANinsert into joe (c1,c2) values (1,2)Session 2:BEGIN TRANinsert into joe (c1,c2) values (3,4)Session 1:select * from joeSession 2:select * from joeOne of the sessions gets a deadlock victim message.thanks,Joe

View 8 Replies View Related

Deadlock

Jun 6, 2007

Hi,How we can detect deadlock from a database.Rahul

View 1 Replies View Related

Deadlock Help Please

Jun 15, 2007

I have a table that every 30 minutes needs to be repopulated fromanother table that is recreated from scratch just before.What I did was this:CREATE PROCEDURE BatchUpdProducts ASbegin transactiondelete productsinsert into productsselect * from productsTempcommit transactionGOThis takes about 30 seconds to run. I tried it doing it with a cursor,row by row, but it took like 30 minutes to run instead. The problemis with the fast approach is, once in a while I get a deadlock errorin different areas trying to access the products table. Using SQLServer 2000 by the way.Any ideas?

View 3 Replies View Related

Help With Deadlock

Jul 20, 2005

HiI have a deadlock situation and I am trying to debug my Trace Log. How do Ifind out what is the cause ?I can see from the trace I have an exclusive lock on a RID, but how can Ifind out what/where 'RID: 7:1:431830:13 ' is ?RegardsSteve:TraceLog2003-08-20 15:15:45.28 spid4Deadlock encountered .... Printing deadlock information2003-08-20 15:15:45.29 spid42003-08-20 15:15:45.29 spid4 Wait-for graph2003-08-20 15:15:45.29 spid42003-08-20 15:15:45.29 spid4 Node:12003-08-20 15:15:45.29 spid4 RID: 7:1:431830:13 CleanCnt:1Mode: X Flags: 0x22003-08-20 15:15:45.29 spid4 Grant List 0::2003-08-20 15:15:45.29 spid4 Owner:0x193e3400 Mode: X Flg:0x0Ref:0 Life:02000000 SPID:52 ECID:02003-08-20 15:15:45.31 spid4 SPID: 52 ECID: 0 Statement Type: UPDATELine #: 442003-08-20 15:15:45.31 spid4 Input Buf: RPC Event: ams_Load_Stock;12003-08-20 15:15:45.31 spid4 Requested By:2003-08-20 15:15:45.31 spid4 ResType:LockOwner Stype:'OR' Mode: USPID:55 ECID:0 Ec:(0x1A0DF5A0) Value:0x193e1800 Cost:(0/E58)2003-08-20 15:15:45.32 spid42003-08-20 15:15:45.32 spid4 Node:22003-08-20 15:15:45.32 spid4 RID: 7:1:431830:14 CleanCnt:1Mode: X Flags: 0x22003-08-20 15:15:45.32 spid4 Grant List 1::2003-08-20 15:15:45.32 spid4 Owner:0x193e3360 Mode: X Flg:0x0Ref:0 Life:02000000 SPID:55 ECID:02003-08-20 15:15:45.32 spid4 SPID: 55 ECID: 0 Statement Type: UPDATELine #: 522003-08-20 15:15:45.34 spid4 Input Buf: Language Event: DECLARE @RCintDECLARE @strResult varchar(8)DECLARE @strErrorDesc varchar(512)EXEC @RC = [msmprim].[msm].[ams_Populate_PSM_Stockrequest] @strResult OUTPUT, @strErrorDesc OUTPUTDECLARE @PrnLine nvarchar(4000)PRINT 'Stored Procedure: msmprim.msm2003-08-20 15:15:45.34 spid4 Requested By:2003-08-20 15:15:45.34 spid4 ResType:LockOwner Stype:'OR' Mode: USPID:52 ECID:0 Ec:(0x198A5558) Value:0x193e2e80 Cost:(0/94)2003-08-20 15:15:45.35 spid4 Victim Resource Owner:2003-08-20 15:15:45.35 spid4 ResType:LockOwner Stype:'OR' Mode: USPID:52 ECID:0 Ec:(0x198A5558) Value:0x193e2e80 Cost:(0/94)

View 1 Replies View Related

Deadlock Victim

Jul 10, 2006

Here is the exception I am getting, any idea why this might be happening:
 
Exception: ThisMethod is done: let this go: Exception:    
Transaction (Process ID 74) was deadlocked on lock |
communication buffer resources with another process and has been chosen as the deadlock victim.
Rerun the transaction.    Stack Trace:     at

View 2 Replies View Related

Tracing The Deadlock

Jul 12, 2006

Hi,
I need to trace deadlock, one of article was mentioning “QL Server Profiler's Create
Trace Wizard to run the "Identify The Cause of a Deadlock" for SQL Server 7.0, is there any way I can do this in Sql Server 2000?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved