Re: Table with no owner
From: Hari (hari_prasad_k_at_hotmail.com)
Date: 05/26/04
- Next message: JLFleming: "Windows Authentication"
- Previous message: SqlJunkies User: "Re: Blocking UDP Port 1434"
- In reply to: D: "Table with no owner"
- Next in thread: Dave: "Re: Table with no owner"
- Reply: Dave: "Re: Table with no owner"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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?
- Next message: JLFleming: "Windows Authentication"
- Previous message: SqlJunkies User: "Re: Blocking UDP Port 1434"
- In reply to: D: "Table with no owner"
- Next in thread: Dave: "Re: Table with no owner"
- Reply: Dave: "Re: Table with no owner"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|