Just check in sysobjects table whether those tables are there or not and
if the entries are there check the corresponding uid for the tables and
do a
Select user_name(uid) from sysobjects where name = 'OBJECT_NAME'
Think this should help you..
Arijit
-----Original Message-----
From: Sean Rodgers [mailto:[Email Address Removed]
Sent: Friday, September 05, 2003 5:42 PM
To: LazyDBA.com Discussion
Subject: tables with no owner
Hi All...........
I have been asked to investigate a problem on a clients database. Using
enterprise manager, looking at the tables list within a database, there
are
many tables with no owner assigned to them. The owner is blank. How the
user
got to this situation I do not know. I have tried to drop these tables
as
they are not needed, but I get an error back:
error 21776: the name was not found in the null collection.
I cannot drop through QA either.
Also tried to use sp_changeobjectowner procedure, but the error came
back
the same. It seems that these tables do not exist but somehow still
appear
in the table list.
So my question is how do I get rid of these tables or stop the names
appearing in the table list?
I have thought about exporting the tables with an owner, dropping the
database, recreating and re-importing those tables back, but it does
seem a
little OTT.
Any ideas gratefully received...
Regards,
Sean Rodgers
MS Sql Server LazyDBA home page