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

  • Are there any triggers defined on the table for delete? Maybe one of those is blocking the statement.

  • Could you try deleting the records after disabling the FK constraints referring this particular table. This could be an issue if there are lot of referrences to the table from which you are trying to delete the records and the volume of data in these tables are very high. Also check on the indexes.

  • Are you looking at the table data in an EM window while running the delete statement elsewhere?

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

  • I suggest that you verify that the DELETE where clause is doing what you think. When ever I use QA to directly manipulate production data I always first verify the where clause arguments first in a select. Then just copy them into the Delete or Update. (measure twice, cut once)

    If your delete is blocking processes your arguments may not be correct. Or you have one or more triggers that first need to be disabled. If it was a FK, or other constraint, you should get an immediate error.

    But in general, you should only use QA as a last resort when manipulating production data. But I'm sure you know that.

    What's the business problem you're trying to solve?


    What's the business problem you're trying to solve?

Viewing 5 posts - 1 through 4 (of 4 total)

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