• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

Corrupt Table, Cant Delete, Truncate ...

I have a SQL Server 2000 Table that seems to be corrupt.

I first noticed this when attempting to Delete all records from the table.  The operation ran for 8 min without completing.  I then tried:
Truncating
Drop Table
Delete using EM Console

All of these operations will run for several minutes without completing.  I have a current backup of that table that works fine, but I need to get rid of the current one first.  I have never encountered this issue before.  Can someone lend a hand.
Thanks,
0
BillPowell
Asked:
BillPowell
  • 3
  • 3
  • 2
  • +1
3 Solutions
 
ptjcbCommented:
Are you sure it is corrupt?  Are other users using the table that you are trying to delete?
0
 
BillPowellAuthor Commented:
Im pretty sure no one else is using it.  I should also mention that I cannot even perform selects againts that table.
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
run

DBCC CHECKTABLE ('urtablename')
GO
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
as ptjcb stated you need to be sure it is corrupt.  You need to find out how it is corrupted and act depending on how it would be corrupted...You may use dbcc checktable statement to find out.
0
 
ptjcbCommented:
Ok...sp_who2  or check the activity monitor.

see if anyone else is using the table. Check for exclusive locks, etc. You may be blocking yourself if you have several processes trying to do the same thing.
0
 
BillPowellAuthor Commented:
Your right.  Its not corrupt.  Theres a previous process running.  Its my process, so using KILL wont work to stop it.  How do I stop it.
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Close  that Query analyzer window ...

or try to kill from another QA
0
 
ptjcbCommented:
If this is a process outside of SQL (extended procedure, etc) then SQL Server will not kill it with a KILL command. It runs in the memory space but SQL has no control over it. You will have to stop and start the SQL Server service to kill it.
0
 
BillPowellAuthor Commented:
I had to kill the process from another computer.  Not sure why it got hung up, but its fixed anyway.
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now