Solved

Corrupt Table, Cant Delete, Truncate ...

Posted on 2006-07-06
9
353 Views
Last Modified: 2008-03-06
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
Comment
Question by:BillPowell
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 27

Expert Comment

by:ptjcb
ID: 17051650
Are you sure it is corrupt?  Are other users using the table that you are trying to delete?
0
 
LVL 11

Author Comment

by:BillPowell
ID: 17051692
Im pretty sure no one else is using it.  I should also mention that I cannot even perform selects againts that table.
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17051716
run

DBCC CHECKTABLE ('urtablename')
GO
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 23

Assisted Solution

by:Racim BOUDJAKDJI
Racim BOUDJAKDJI earned 50 total points
ID: 17051717
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
 
LVL 27

Assisted Solution

by:ptjcb
ptjcb earned 100 total points
ID: 17051733
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
 
LVL 11

Author Comment

by:BillPowell
ID: 17051808
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
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 250 total points
ID: 17051913
Close  that Query analyzer window ...

or try to kill from another QA
0
 
LVL 27

Expert Comment

by:ptjcb
ID: 17051920
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
 
LVL 11

Author Comment

by:BillPowell
ID: 17053897
I had to kill the process from another computer.  Not sure why it got hung up, but its fixed anyway.
Thanks
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSIS Conditional Split 7 31
SQL Server 2012 - Merge Replication Issue 1 19
sql select record as one long string 21 22
T-SQL: New to using transactions 9 22
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question