sp_changeobjectowner | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sp_changeobjectowner

Hi there I have one table "employee" owned by ‘xyz’, and this xyz is member of sysadmin,
db_securityadmin and db_owner. I login to a database as ‘xyz’ and I tried to change the owner of the table "employee" to be sa, but when I execute the procedure:
exec sp_changeobjectowner ’employee’, ‘sa’ it gives an error:
Object ’employee’ does not exist or is not a valid object for this operation. I login to DB as sa and I run the same procedure but it still gives the same errror. Any Idea….? please Regards..
Try to refer the table as dbo.tablename or xyz.tablename. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
You don’t want to make sa the owner. You shouldn’t be using sa for anything. Make dbo the owner. You have your syntax wrong also. EXEC sp_changeobjectowner ‘xyz.employee’,’dbo’
MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Thanks derrickleggett… I run EXEC sp_changeobjectowner ‘xyz.employee’,’dbo’ It works fine now.. Reagrds..
]]>