Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table that won't go - even though it exists?

Status
Not open for further replies.

CInman

IS-IT--Management
Joined
Mar 15, 2001
Messages
81
Location
GB
I have a table in a SQL 7 d/b that, although shows under the Tables branch in Enterprise Manager, I am unable to delete, rename, view, etc. I cannot do anything with it, as it claims it is not a member of the tables collection - so something has clearly "corrupted" but I need to know "where" all references to a table could exist, so I can manually remove it - can anyone help?
 

Before attempting to mannually delete records, run

DBCC Checkdb

to see if the corruption can be corrected. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Thanks Terry, much appreciated.
 
I have seen this and it seems as if Enterprise Manager is still showing the table when it does not exist.

If Terry's solution does not solve the problem.
I would do the following:

select * from sysobjects where name like '%tablename%' to see if the table exists.

If it exist I would try to delete it with the following:
drop table tablename

If it does not exist I have had to stop and start the SQL Server to get rid of it from Enterprise Manager.

 
That makes sense ... I'll review and feedback, thanks for your thoughts and time - much appreciated.
 

If the problem is only in Enterprise Manager, you can try to refresh. Right-click the database and select refresh. If that doesn't work (from my experience it doesn't work very often) then disconnect from the Server and reconnect or stop and restart EM. You shouldn't have to restart SQL Server in this case. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top