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

Can not drop table

Apprantly a table has become corrupt my SQL Server 2000 database. I can't delete rows out of it, drop it, rename it... nothing. Any ideas how I can get rid of this sucker?
0
davidsanderson
Asked:
davidsanderson
  • 7
  • 5
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
I think you dont have enough permissions to do this, What error message you are getting
0
 
MikeWalshCommented:
How do you know this table is corrupt? Are you receiving an error message indicating that? have you done a DBCC CHECKDB () within the database that table is in?

Can you select data from the table?

0
 
MikeWalshCommented:
I am with aneesh on that one. That is where I was heading once he suggested the error message. It may very likely be a permissions issue. It could be an integrity constraint issue.. It could be a few things, but I doubt it is a "corrupt table"
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
davidsandersonAuthor Commented:
I just dropped some other related tables that I created along with the one that I can not delete. When I try to select rows from it, delete it, rename it, it just hangs and I have to end the sql server manager task.

DBCC CheckDB:
CHECKDB found 0 allocation errors and 0 consistency errors in database 'SeaGateContracts'

DBCC CheckTable:
There are 0 rows in 4114 pages for object 'TL_tblInvoiceJob'

0
 
MikeWalshCommented:
I doubt you have corruption. How many rows are in this table? (Select count(*) from table).. do you have an foreign/primary key integrity setup with this table?
0
 
davidsandersonAuthor Commented:
Mike, nothing happens, it just hangs when I try to select rows.
0
 
MikeWalshCommented:
How long does it hang for? Run "SELECT COUNT(*) FROM table" and wait for results and report them back here.

Stop and Restart SQL if nothing critical is running on the server as well. Verify through enterprise manager that you have proper permissions on the table also.
0
 
davidsandersonAuthor Commented:
I think I waited up to 15 minutes so far with no results. It hangs when I try to look at current activity too.... maybe I just need to reboot the server.
0
 
MikeWalshCommented:
I would strongly reccomend that. What SP are you on also? You should be on the latest. If you are in SQL Server 2000 that is SP4.
0
 
MikeWalshCommented:
At this point, it seems like corruption is not likely your problem. I wonder if you have some locking/blocking going on causing issues. I would reboot and restart..

You can also run "SP_WHO2" from query analyzer and look at the blocking column..
0
 
davidsandersonAuthor Commented:
Actually the current activity eventually came up.
0
 
MikeWalshCommented:
ok.. it sounds like you are having issues with your server, not your table. I would suggest the reboot, and then look at your activity and then try and drop the table.
0
 
davidsandersonAuthor Commented:
Well I feel dumb now, there was just a block on the drop table command. As soon as I cleared the block, the table dropped. Thanks for helping me anyway Mike.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now