Solved

Corrupt Table, Cant Delete, Truncate ...

Posted on 2006-07-06
9
366 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
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

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!

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

729 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