Re: Table with no owner

From: Dave (anonymous_at_discussions.microsoft.com)
Date: 05/26/04


Date: Wed, 26 May 2004 06:56:17 -0700

Thank You, this worked.

>-----Original Message-----
>Hi,
>
>You have to update the system tables. Please be very
careful in doing the
>below steps.
>
>How to do:-
>
>use <dbname> -- Replace actual database name
>go
>sp_configure 'allow updates',1
>go
>reconfigure with override
>go
>update sysobjects
>set uid=1
>where name='table_name' -- replace actual table name
>go
>sp_configure 'allow updates',0
>go
>reconfigure with override
>go
>select * from <table_name> -- replace actual table name
>
>After this you can do all sort of DMLs and DDLs against
this table like
>(DROP, Truncate, Insert, select , ALter , ...). You can
also change the
>object owner using
>sp_changeobjectowner..
>
>Thanks
>Hari
>MCDBA
>
>
>
>
>
>"D" <anonymous@discussions.microsoft.com> wrote in
message
>news:1246e01c442a3$2865a8f0$a401280a@phx.gbl...
>> We have two tables that somehow got created with no
owner
>> listed. When I try to delete the table, I get the
>> message "Error 21776:[SQL-DMO]The name "tablename" was
>> not found in the (null) collection."
>> I can't change the object owner without a current
owner.
>> How can I delete these tables?
>
>
>.
>