Solved

Corrupt Table, Cant Delete, Truncate ...

Posted on 2006-07-06
9
352 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
 
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

864 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now