Re: Table with no owner

From: Hari (hari_prasad_k_at_hotmail.com)
Date: 05/26/04


Date: Wed, 26 May 2004 14:34:07 +0530

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?



Relevant Pages

  • Re: Table with no owner
    ... >reconfigure with override ... >> I can't change the object owner without a current ...
    (microsoft.public.sqlserver.security)
  • Re: Restoring from MDF and LDF
    ... reconfigure with override ... where name = 'BADDBNAME' ... Start database in emergency mode ...
    (microsoft.public.sqlserver.server)
  • Re: sp_configure (RECONFIGURE)
    ... Sounds like you have the option "allow updates" enabled and are on SQL 2005. ... "with override". ... You should now be able to use reconfigure without encountering errors. ... system administrator. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Replication errors - vicious circle
    ... reconfigure with override ... > When I try to create a transactional publication, ... > does not have a primary key column. ...
    (microsoft.public.sqlserver.replication)
  • Re: Using whole 4GB
    ... RECONFIGURE WITH OVERRIDE; ... I just upgraded memory in the server and did not touch boot.ini. ...
    (microsoft.public.sqlserver.server)