Question

if i apply a sql query statement to this table "select * from context.tablename", all i see is the "Executing query.." message and nothing else hapens. I also can not truncate or drop this table. It prevents me from even dropping vhole database.

Is it possible, that this problem is caused by inserted data into this table???

I'm using MS Sql server 2005

Was it helpful?

Solution

Have you tried restarting the SQL Server service?

OTHER TIPS

Are there any open connections to the database while trying to drop the table? Have you tried closing all connections before dropping it?

Use SSMS to detach the database. Delete the MDF files manually.

I had this same exact problem with a table that only contained 3 records. I had several query tabs open in MS SQL Server Mgmt Studio that each referenced the target table in some way, but none of which had any queries executing.

Selecting from this table would just execute endlessly as would Dropping the table. I could run sp_spaceused and see it was only using 86k of space so it wasn't huge.

I disconnected all of the tabs including the one I was using to Select from and to Drop the table. I then reconnected just that window and ran 'Select * from' my table and it worked. I was also able to then Drop the table successfully.

It seems there was an open connection holding the table hostage somehow and preventing my Select and Drop from working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top