Stubborn records can't be deleted!.

  • Hi All

    I have a table with a number of records which i need to delete. The problem that i am having is that when i execute the delete statement in QA it never completes.I have also tried to delete the row from within EM with the same non completion. I have looked at the processes running while the delete statement is being executed and my process is not being blocked by anything but is blocking any other process trying to access the particular table i am trying to delete from. I have deleted all the foreign key references for these rows from other tables and in the past i have been able to delete from this table. Is there a way to forceable delete? I was concerned that there may be some sort of corruption in the database. Dbcc checkdb and dbcc checktable revealed nothing.

    I am using SQL server 2000 enterprise edition SP3 on W2k platform

    Any help would be much appreciated

    thank you

  • hi,

    have you tried setting the rowcount to delete a small number of rows (say 10) to see if that works ?

    Paul

  • Check for triggers as well.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/

    http://www.dkranch.net

  • Have you got the table open in EM while trying to delete it in QA? This sometimes causes problems...

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • Is there a delete Trigger on the Table ?

    JL


    JL

  • Have you looked at the execution plan? If there is alot of RIs that are not indexed in 'target' tables, there can be ALOT of table scans even if you are sure your rows do not cotain any RI violations...

    Regards, Hans!

  • Run sp_lock to see if the table/rows which you are trying to delete are being locked by any other user . You delete will wait until the other user frees the rows.

    Just a thought

    _ Jay

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply