Showing posts with label na_web_subs_hits. Show all posts
Showing posts with label na_web_subs_hits. Show all posts

Tuesday, February 14, 2012

Change ownership

Hello I'm trying to change the ownership using this command :

sp_changeobjectowner'govern.NA_WEB_SUBS_HITS','dbo'

and then I received this following error message :

Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 75
Object 'govern.NA_WEB_SUBS_HITS' does not exist or is not a valid object for this operation.

Can anyone help please?

Thanks,

Stanley

You need to speicify the current owner on this object to change:

sp_changeobjectowner 'Dbobject', 'dbo'

|||

NOTE: sp_changeobjectowner has been deprecated in SQL Server 2005. I strongly recommend using the new DDL designed for changing ownership: ALTER AUTHORIZATION.

For more information please refer to BOL:

· ALTER AUTHORIZATION (Transact-SQL) http://msdn2.microsoft.com/en-us/library/ms187359.aspx

· sp_changeobjectowner (Transact-SQL) http://msdn2.microsoft.com/en-us/library/ms177519.aspx

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

|||

What if the "current owner" does not exist? After a total system crash we made a db restore. All the objects belong to a sql user that does not exist anymore (different sid). What can we do now? http://support.microsoft.com/kb/275312/en-us has a good script generator but we got stuck "oldOwner.dbObject" does not exist!!!

Change ownership

Hello I'm trying to change the ownership using this command :

sp_changeobjectowner 'govern.NA_WEB_SUBS_HITS' , 'dbo'

and then I received this following error message :

Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 75
Object 'govern.NA_WEB_SUBS_HITS' does not exist or is not a valid object for this operation.

Can anyone help please?

Thanks,

Stanley

You need to speicify the current owner on this object to change:

sp_changeobjectowner 'Dbobject', 'dbo'

|||

NOTE: sp_changeobjectowner has been deprecated in SQL Server 2005. I strongly recommend using the new DDL designed for changing ownership: ALTER AUTHORIZATION.

For more information please refer to BOL:

· ALTER AUTHORIZATION (Transact-SQL) http://msdn2.microsoft.com/en-us/library/ms187359.aspx

· sp_changeobjectowner (Transact-SQL) http://msdn2.microsoft.com/en-us/library/ms177519.aspx

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

|||

What if the "current owner" does not exist? After a total system crash we made a db restore. All the objects belong to a sql user that does not exist anymore (different sid). What can we do now? http://support.microsoft.com/kb/275312/en-us has a good script generator but we got stuck "oldOwner.dbObject" does not exist!!!